Comment 0 for bug 986269

Revision history for this message
bcbc (bcbc) wrote : Nautilus pops browser on bash partition mount

I first noticed this behaviour in Ubuntu 11.10. When I run my bash script that mounts partitions on my hard drive (e.g /dev/sda5), Nautilus pops up with a browser window. This is an illogical action, since I've not 'inserted a drive', it's already there, and it's just been manually mounted. This Nautilus action will interfere with the scripts operation since, when the script tries to unmount the drive (rapidly) it finds that Nautilus is still busy with it, producing it's browser window.

You wouldn't expect this if you mount a partition from the terminal - and for the most part this is correct (Nautilus does nothing), but not all the time. I've managed to trigger Nautilus to pop just with a simple terminal mount.

I have a workaround in my bash script that creates a udev rule and runs udevadm trigger to hide the partition, but this seems extreme. I believe it's a bug in Nautilus in how it responds to the signal that a partition has been mounted.

Please see this for complete details and discussion of possible solutions (and the bash script code): http://askubuntu.com/questions/121569/prevent-nautilus-showing-partition-mounted-in-bash-script

I understand you can prevent Nautilus responding to inserted drives etc., but this is definitely not the case here - the drive is already there, just the partition is being mounted.