gnome-mount [-?|--help] [-v] [-n] [-t] [-b] [-d /dev/file | -h /org/fd/Hal/udi | -p nickname] [--unmount | --eject | --write-settings | --erase-settings | --show-settings] [--mount-point where-to-mount] [--mount-options opt1,opt2=foo,opt3] [--extra-mount-options opt4,opt5=bar] [--fstype fstype-to-use]
This program is used to mount and unmount file systems for GNOME desktop users. It can also be used to eject discs from CD drives and other devices that needs to be ejected. For example, iPod's needs this to make the "Do not disconnect" message go away.
Normally, this program is invoked by software in the GNOME stack (specifically gnome-vfs-daemon and gnome-volume-manager ). End users should never have to deal with gnome-mount directly on the command line, nor should they have to read this manual page.
Mounting a file system into the root file system involves a certain degree of configuration and as such is subject to whatever preferences an user might have. gnome-mount allows the user to control the mount point location, the mount options and what file system to use for mounting a file system. The settings are read from the gconf database (which is per-user) and can also be overridden on the command line using the appropriate parameters. See below.
The target (e.g. the partition or file system to mount, unmount or eject) can be specified using the HAL UDI (Unique Device Identifier), e.g. /org/freedesktop/Hal/devices/volume_uuid_E18B_10EC , the name of the special device file, e.g. /dev/sda1 or a pseudonym. The latter is a textual string used to locate the target and it makes gnome-mount search for the target by comparing the given textual string to the mount points and file system labels.
Settings (e.g. mount point, mount options, file system type) are read in the order below. Note that each option is treated individually; for example it is valid for a drive to only specify the mount point setting and not the mount options. Also note that the even if the drive specifies mount options, these can be overridden on a per-volume basis.
gnome-mount --extra-mount-options remount,exec -d /dev/sda1
to remount a volumes such that programs can be run from the media. This is useful for e.g. gnome-volume-manager if it discovers an autorun file on the media.
gnome-mount supports passworded media through the org.freedesktop.Hal.Device.Volume.Crypto interface supported by HAL and this includes volumes formatted in a way that adheres to the LUKS (Linux Unified Key Setup) specification. In addition, gnome-mount uses gnome-keyring to retrieve and store the pass phrase. If no key can be retrieved, gnome-mount will prompt the user for one. In addition, if the keyring is locked, the user may be prompted to unlock it via standard gnome-keyring mechanisms.
gnome-mount is intended for unprivileged users and HAL ultimately controls if the calling user is allowed to mount, unmount or eject volumes as well as what mount options are valid. As such, requests may be denied. See the (human readable) exception returned from HAL for details if a request fails.
Note that HAL has a notion of what mount options are valid for a given volume. They are listed in the HAL property volume.mount.valid_options on the device object representing the volume to mount. Consult lshal(1) for details. Also note that HAL by default appends the options nosuid and nodev to prevent privilege escalation.
In addition to using HAL as the mechanism for mounting file systems, the /etc/fstab file is also consulted as HAL will refuse to mount any file system listed in this file as it would violate system policy. If this is the case, gnome-mount will invoke mount(1) as the calling user rather than invoking the Mount method on the org.freedesktop.Hal.Device.Volume interface on the device object representing the volume / drive. This means that settings (mount point, mount options, file system type) read by gnome-mount are not passed along as these are already specified in the /etc/fstab file and there are no mechanism to override them. When parsing the /etc/fstab file, gnome-mount (and also HAL for that matter) resolves symbolic links and also respects the LABEL= and UUID= notations. For example, if this line is in /etc/fstab
LABEL=MyVolume /mnt/myvolume auto user,defaults 0 0
then gnome-mount mounts the file system with the label MyVolume via mount(1) and /etc/fstab rather than using the HAL mechanisms.
Options available for the gnome-mount command:
gnome-mount will return zero if the request succeeded or non-zero if it failed. Note that gnome-mount is specifically designed to run in a graphical user environment and as such all error reporting (and resolution) is through X11 dialogs. For example, if HAL reports that a volume could not be mounted because of a missing file system driver, gnome-mount might, one day, launch a tool to ask the user if he wants to download and install the driver. In a similar way, all error dialogs are presented via X11 dialogs to the user as well.
We want to make sure that the discs inserted into an optical drive are always mounted at /media/cdrecorder instead of using the default which is using the label specified in the iso9660 or udf file system header. Assuming that the drive is empty and the special device file for the drive is /dev/hdc the following command will work
This can be inspected via the --display-settings option and the settings can also be erased via the --erase-settings option. Also note that gconf-editor(1) can be used for tasks like these.
HAL polls most storage devices for media insertion / removal and maintains the list of devices exported. However, some hardware cannot be polled for media changes without making noise or for other reasons. PC floppy drives, Zip drives connected through an IDE interface and broken optical drives falls into this category.
For such hardware HAL only exports the drive and rather than exporting volume as childs of the drive, the org.freedesktop.Hal.Device.Volume interface is exported on the drive itself. gnome-mount supports this but it means that it is impossible to know ahead of time what file system is on the media in the problematic drive, so in this case gnome-mount passes auto as the file system type and passes the mount options uid=UID_OF_USER as most media in such devices are formatted with either the vfat , udf or iso9660 file systems.
This also means that per-volume settings are not possible; one can only specify settings per-drive.
gnome-mount was written by David Zeuthen <firstname.lastname@example.org>.
fstab(5), mount(8), umount(8), eject(1), cryptsetup(8), gconftool-2(1), gconf-editor(1), lshal(1)