GNOME automount requires nautilus to be running

Asked by Ryan Thompson

Binary package hint: nautilus

If a user has the gconf key /apps/nautilus/preferences/show_desktop set to false, and has no file browser windows open, then no instance of Nautilus will be running at all on the desktop. In this case, removable media that are inserted will not be automounted, since Nautilus is responsible for the automounting. Is there any way to automount media without Nautilus running, or else is there a way to run Nautilus in the background without having it draw the desktop?

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/bin/nautilus
NonfreeKernelModules: nvidia
Package: nautilus 1:2.24.1-0ubuntu2
ProcEnviron:
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: nautilus
Uname: Linux 2.6.27-14-generic x86_64

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ryan Thompson (rct86) said :
#1
Revision history for this message
Chris Coulson (chrisccoulson) said :
#2

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs#When%20not%20to%20file%20a%20bug.

Revision history for this message
Luke H (luke-h) said :
#3

Unfortunately I think not.

Revision history for this message
Joe Edmonds (joee) said :
#4

You can use udev to do this. I'm not an expert on udev, but I pieced a configuration together from:

http://www.reactivated.net/writing_udev_rules.html

Here's a rough sketch of what I did. No warranty; use your own common sense, etc.

Plug in your device.

ls /dev/disks/by-uuid

Add to /etc/fstab:

  UUID=<disk uuid> /media/my-device vfat user 0 0

/sbin/udevadm info -a -p /sys/block/sdc

Create a file /etc/udev/rules.d/my.rules:

  SUBSYSTEM=="block", ATTRS{model}=="<model string>", RUN+="/usr/local/bin/mount-my-device"

Create /usr/local/bin/mount-my-device:

  /bin/mount /media/my-device

Revision history for this message
Johannes Mockenhaupt (mockenh-deactivatedaccount) said :
#5

With karmic this problem can be easily solved by unchecking a newly added gconf-key:

/apps/nautilus/preferences/exit_with_last_window

"If set to true, then Nautilus will exit when all windows are destroyed. This is the default setting. If set to false, it can be started without any window, so nautilus can serve as a daemon to monitor media automount, or similar tasks. "

So, in addition to unchecking the show_desktop key, uncheck exit_with_last_window key too and you'll have a desktop without icons and automounting will still work.

Revision history for this message
Joe Edmonds (joee) said :
#6

Or put this in /usr/local/bin/mount-my-device instead, if you want to modify the filesystem without a lot of sudoing:

  /bin/su -c "/bin/mount /media/my-device" <your username>

Can you help with this problem?

Provide an answer of your own, or ask Ryan Thompson for more information if necessary.

To post a message you must log in.