LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 08-18-2009, 03:00 AM   #1
paldebojyoti
Member
 
Registered: Aug 2009
Posts: 32

Rep: Reputation: 15
Disable Automounting


Hi,

I am using Ubuntu 8.10, where I want to disable auto mounting of any USB Mass storage device when it is getting inserted. Could you please tell me how to do that?
Thanks in advance.

Regards,
Deb
 
Old 08-18-2009, 03:15 AM   #2
timvandijk039
Member
 
Registered: Jul 2009
Location: The Netherlands
Distribution: Debian/Ubuntu and RHEL/CentOS
Posts: 42

Rep: Reputation: 18
check this link on ubuntuforums :
http://ubuntuforums.org/showthread.php?t=13692
 
Old 08-18-2009, 04:57 AM   #3
paldebojyoti
Member
 
Registered: Aug 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,
Thanks a lot, but this is not working for me. I did the following:
1) gconf-editor
2) go to apps > nautilus > preferences.
3) Uncheck the "media_automount" option.
But after that, if I insert the USB pendrive, still it is auto mounted.
What I didn't do is restarting the system.

Regards,
Deb
 
Old 08-18-2009, 05:17 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Can you reboot and then try?

You may have some luck with this command as root, substituting an appropriate value for <usb device name>
Code:
hal-disable-polling --device /dev/<usb device name>
If that doesn't work you can try this method, tested on 8.04. It disables automounting of all removable media so you may want to tweak it a bit to disable USB automounts only. It comes from this page. Edit /etc/hal/fdi/policy/preferences.fdi, adding this section
Code:
<!-- 
Prevent automount 
--> 

  <device> 
    <match key="storage.policy.should_mount" bool="true"> 
      <merge key="storage.policy.should_mount" type="bool">false</merge> 
    </match> 
    <match key="storage.automount_enabled_hint" bool="true"> 
      <merge key="storage.automount_enabled_hint" type="bool">false</merge> 
    </match> 
      <match key="storage.media_check_enabled" bool="true"> 
        <merge key="storage.media_check_enabled" type="bool">false</merge> 
    </match> 
      <match key="volume.policy.should_mount" bool="true"> 
        <merge key="volume.policy.should_mount" type="bool">false</merge> 
    </match> 
      <match key="volume.ignore" bool="false"> 
        <merge key="volume.ignore" type="bool">true</merge> 
    </match> 
  </device>
 
Old 08-18-2009, 05:21 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Run polkit-gnome-authorization.

For the org.freedesktop.hal.storage.mount-removable change the policy for "console" from "yes" to "no".
 
Old 08-18-2009, 06:46 AM   #6
paldebojyoti
Member
 
Registered: Aug 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi catkin,

Thanks a lot. I change the /etc/hal/fdi/policy/preferences.fdi and add the following:
<device>
<match key="storage.hotpluggable" bool="true">
<match key="storage.removable" bool="true">
<merge key="storage.automount_enabled_hint" type="bool">false</merge>
</match>
</match>
</device>
It works fine. Thanks again.

I did the same in Fedora, but there it is not working. Any idea?

Regards,
Deb
 
Old 08-18-2009, 08:34 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks for letting us know what you did and that it worked.

Sorry, no idea about Fedora
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disable automounting Skaperen Ubuntu 3 07-17-2009 05:01 AM
How to disable automounting in SLAX? Albo74 Linux - Newbie 1 03-21-2009 04:41 PM
how to disable Text-to-speechmanager on startup, and disable fsck after 20 boots Kristian2 Slackware 2 02-25-2009 10:55 AM
dbx command for corrosponding commands disable or disable on gdb bshankha AIX 0 09-26-2006 09:38 AM
what are the services i can disable, also disable ads, banners in konqueror? greythorne SUSE / openSUSE 3 03-16-2005 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration