HOWTO gnome-volume-manager
From Gentoo Linux Wiki
|
Installation
Configuration Tips Administration |
| edit |
Contents |
[edit] Introduction
This HOWTO lists the steps required for getting Gnome Volume Manager working in Gentoo. This application, along with sys-apps/hal and sys-apps/dbus allows you to plug in external media and have Linux immediately recognize it. Yes it does work, and it's very nice when you finally get it working!
[edit] Objective
Have your USB flash drive, ieee1394 (external harddrive), CD-ROM, or other external media automatically mount transparently.
[edit] Requirements
This HOWTO makes a couple of assumptions. Please make sure your system meets these requirements before you attempt to install Gnome Volume Manager.
- That UDEV is properly configured for your system. If you need more information, please read the official Gentoo guide on installing UDEV or the Gentoo-Wiki UDEV support article.
- That you are using a 2.6 series Linux kernel. Moreover a kernel >=2.6.13 is needed for hal and other dependencies.
- The necessary file systems, here's what's recommended:
| Linux Kernel Configuration: Required and Optional File Systems |
File systems ---> DOS/FAT/NT Filesystems --> [*] VFAT (Windows-95) fs support Native Language Support ---> (iso8859-1) Default NLS Option <*> Codepage 437 (United States, Canada) <*> NLS ISO 8859-1 (Latin 1; Western European Languages) <*> NLS UTF8 Miscellaneous filesystems ---> [*] Apple Extended HFS file system support |
For maximum interoperability between Windows (Win98 and later), OS X, and Linux, partitioning your device as VFAT (FAT32) is recommended. You can also compile the file systems as modules (udev will pick them up).
There are other times when you may want to mount a Macintosh OS X file system in Linux. An example of why you may want this is if you, say, have a bootable OS X environment on some removal media but want to easily transfer the drive around and/or load it up in PearPC. Enable Apple Extended HFS file system support if you think you'll need it.
Now compile and install your kernel.
[edit] Gnome-Volume-Manager
Ensure that you have the "hal" USE flag in /etc/make.conf, otherwise gnome-volume-manager won't automatically display an icon on your desktop when you plug in an external device. You will also need to ensure that you've built gnome-vfs with the hal flag as well.
Now install:
emerge gnome-volume-manager rc-update add dbus default rc-update add hald default
Now, start dbus and hald with the following command and when you plug in your USB drive, it should show up in your Nautilus computer window.
/etc/init.d/dbus start /etc/init.d/hald start
To verify it was mounted, use this while mounting:
tail -f /var/log/messages
This command reads the tail of your log messages to see what is going on with your system. If you see something similar to fstab-sync: added mount point /media/usbdisk for /dev/sdc1 then the automounting should be successful.
To configure gnome-volume-properties or use System > Preferences > Removable Drives and Media
In the input tabs when entering commands to execute when media/devices are inserted, %d will be replaced with the device name and %m will be replaced with the path to the mounted volume.
[edit] Access Rights
As of gnome 2.12, users must be a member of the plugdev group in order for removable media to be mounted on insertion. To add via commandline:
sudo gpasswd -a user plugdev
Or through the GUI System > Administration --> Users and Groups and checking the "Enable access to external storage devices automatically" option in "Properties" User privileges tab.
You may need to restart dbus to make the change effective.
sudo /etc/init.d/dbus restart
[edit] TroubleShooting
If there are any issues here are a some ideas:
[edit] Permissions
If you receive this message : "You are not privileged to mount the volume '...'" when you insert a cd, remove(or comment) the lines about your cdroms in /etc/fstab [1]
[edit] Unwanted Mounts
If you specify in your /etc/fstab the option "noauto" drives should not mount on the desktop. This is a known-bug. Gnome-volume-manager may fail to recognize these as drives and rather as removable media. To fix uncheck "Mount removable media when inserted" in Removable Drives and Media". This will mean that you may have to manually mount drives, CD's... however.
[edit] Older Macintosh Filesystems
As of 2.6.11, HFS (which is used by older macs) is available experimentally and UFS (which is used on some OS X machines for greater UNIX compatibility) is available in read-only.
[edit] Automount Fails
If you find that it doesn't automount your USB drive, open up your GNOME menu, select Preferences followed by Sessions. Switch to the Startup programs tab, click Add and enter
gnome-volume-manager
[edit] USB fails without error
The file /usr/share/hal/fdi/policy/gparted-disable-automount.fdi will cause hal to ignore USB events.
