other versions
- wheezy 0.9~git20110731-1
gnome-mount(1) | General Commands Manual | gnome-mount(1) |
NAME¶
gnome-mount - Mount drives and volumes using HAL and read settings from the GNOME desktop configuration system gconf.SYNOPSIS¶
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]DESCRIPTION¶
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.SPECIFYING THE TARGET¶
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.DETERMINING SETTINGS¶
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.- FILE SYSTEM DEFAULTS
- First, default mount options are read from
/system/storage/default_options/FS_TYPE for the probed file system
type of the volume. The option uid=, is treated specially by
gnome-mount and will be replaced by uid=UID_OF_USER to cope
with the fact that the uid is a function of the user calling it.
- PER DRIVE
- Second, the gconf tree at
/system/storage/drives/UDI_OF_DRIVE is consulted for options that
depend on what drive the volume belongs to. For example, this is useful
for configuring that volumes inserted into a given drive is always mounted
at the same location. For example, this can be used to emulate
/etc/fstab behaviour by where CD media is always mounted at e.g.
/media/cdrom
- PER VOLUME
- Third, the gconf tree at
/system/storage/volumes/UDI_OF_VOLUME is consulted for options that
are specific to a particular piece of media and as such depends on either
the file system label (e.g. EOS_DIGITAL ) or the file system UUID
(e.g. E18B_10EC ) or both.
- COMMANDLINE OPTIONS
- Users can pass --mount-point ,
--mount-options or --fstype on the commandline to override
settings.
- EXTRA COMMANDLINE OPTIONS
- Finally, if mount options are passed via
--extra-mount-options these are not replacing the mount options,
they are simply added. This is useful for doing e.g.
gnome-mount --extra-mount-options remount,exec -d /dev/sda1
PASSWORDED 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.PRIVILEGES¶
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.LABEL=MyVolume /mnt/myvolume auto user,defaults 0 0
OPTIONS¶
Options available for the gnome-mount command:- -v, --verbose
- Verbose operation, shows debug messages.
- -n, --no-ui
- Don't show any dialogs the user needs to dismiss. If X11 is
available, gnome-mount may pop up transient notification bubbles
e.g. suggesting the user to remount a volume with different options to
streamline access to file systems with ownership attributes. This is the
option that storage policy daemons such as gnome-volume-manager
should invoke gnome-mount in. File managers, however, such as
Nautilus , should never use this option as the user should get e.g.
an error dialog if he tries to access a volume with a missing, unsupported
or unknown file system.
- -b, --block
- Allow gnome-mount to block even if an error occured.
By default, gnome-mount will daemonize so it can return control to
the invoking application as soon as possible (e.g. when an operation
either fails or succeeds ) while still showing an error dialog to the end
user. Useful when debugging.
- -u, --unmount
- Use this for unmounting rather than mounting. If
gnome-mount is invoked as gnome-umount (a symlink to
gnome-mount ) then this option is automatically selected.
- -e, --eject
- Use this for ejecting rather than mounting. If
gnome-mount is invoked as gnome-eject (a symlink to
gnome-mount ) then this option is automatically selected.
- -d, --device
- Specify target volume by the special device file.
- -h, --hal-udi
- Specify target volume by HAL UDI (Unique Device
Identifier).
- -p, --pseudonym
- Specify target volume by pseudonym. See above for how this
works.
- -t, --text
- Never use X11 dialogs or notification bubbles even if an
X11 server is available. Also prohibits the use of gnome-keyring to
retrieve pass phrases for passworded media because this might require
unlocking the keyring which happens through an X11 dialog out of process.
Useful for command line operation.
- -m, --mount-point
- Specify mount point to use; don't include /media as
this is automatically appened by the mechanism used to mount, e.g. the
HAL methods.
- -o, --mount-options
- Specify mount options. Separate by comma.
- -f, --fstype
- Specify file system type. This is useful for using e.g. the
msdos file system instead of the vfat file system.
- --write-settings
- Instead of mounting a drive, specify what options to store
in the gconf database. Can be used on both drives and volumes. Be careful
using this with the --device option as optical drives (among
others) use the same special device file for both the drive and the
volume. One trick is to ensure the optical drive has no media when
configuring it via this option. Another possibility is to use the
HAL UDI instead.
- --display-settings
- Display settings for a drive or volume.
- --erase-settings
- Erase settings for a drive or volume.
RETURN CODES¶
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.EXAMPLE¶
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 workgnome-mount --write-settings
--device /dev/hdc
--mount-point cdrecorder