Copyright (C) 2009 Chris Vine

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    A copy of the GNU General Public License version 2 is set out below.
    You can also obtain a written copy from the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


                              OVERVIEW

This program is a front end for pmount. It provides a means of
mounting devices with pmount through a graphical interface.

It is principally intended for use where (i) the user does not want to
make use of the automounting facilities of say, nautilus, as and when
removable media are inserted in or removed from a computer, (ii) the
removable media are not recognised by nautilus (or whatever else is
used for automounting), (iii) the user wants to be able to mount
filesystems on user demand which are not removable media, such as
network filesystems, or (iv) the user just prefers pmount.


                                USE

A graphical table of devices which may be mounted is provided by the
program.  These comprise the conventional device (eg /dev/hdc) and
label (eg cdrom) pair.  Normal pmount rules apply - the device will be
mounted in the /media directory on a mount point with the label name
which has been given unless the device appears in /etc/fstab, in which
case mounting will be handed off to the normal mount executable and
will be mounted at the point specified in /etc/fstab (in effect the
label will be ignored).  Network filesystems may be specified as a
device in the mount-gtk table, but as they are not block devices in
/dev they must also be specified (and stated as user mountable) in
/etc/fstab - specifying the network address in /etc/pmount.allow is
neither necessary nor sufficient.  Where a non-removable block device
in /dev is to be mounted such as a second internal hard disk, then the
user must either specify it in /etc/fstab or allow it to be mounted by
pmount in /etc/pmount.allow.  These normal overarching system policy
rules are not overriden by mount-gtk.  See 'man pmount' for further
details.

The program is built as a single-instance program - if the user
attempts to start it when another instance of it is already running,
the existing instance will be brought up on the current desktop.  It
will therefore not usually be necessary to mark it as displayable on
all desktops - instead a normal program launcher for mount-gtk can be
placed in the desktop panel and clicked on when the user wants it
presented, or (if the tray icon option is chosen) the user can
left-click on the tray_icon to bring up an already running instance of
the program.

The program displays current mount state (if a mount button has a
green tag, then the device concerned is not mounted, and if it shows a
red tag it is already mounted).  Mount status is monitored using
glib's gio.


                             DEPENDENCIES

Dependences are:

pmount
glib >= 2.16.0
gtk+ >= 2.10.0
dbus-glib >= 0.70

It is also recommended, but not required, that libnotify >= 0.4.1 is
installed so that if there is a mounting error or some other problem,
an appropriate message can be displayed conveniently to the user.  If
libwnck >= 2.1.1 is installed, that will also be used to move the
program window to the current workspace if the user tries to start
another instance (but the program will still compile and work without
libwnck).


                                 DBUS

For the program to operate as a single-instance program, a dbus
session bus must be running.  Most recent distributions using GNOME,
KDE or Xfce do this anyway, but if your X environment does not start a
session bus, you may need to start one yourself in the script which
starts your X session.  To do this you can put the following in the
script (this will often be a xinitrc file in /etc/X11/xinit, but might
be ~/.xsession or ~/.Xclients):

  if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
    echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
  fi

However, before amending your scripts test whether this is necessary,
either by launching the program and then launching it again, or by
bringing up a terminal (such as xterm, gnome-terminal or konsole) and
seeing if 'echo $DBUS_SESSION_BUS_ADDRESS' reports anything.  (Usually
it won't be necessary to amend your scripts.)


                                 UDEV

With removable media, it is often convenient to give the media a
particular device name (say /dev/ipod instead of /dev/sdb2).  udev can
do this with an appropriate rule - see
http://reactivated.net/writing_udev_rules.html for information on how
to write udev rules.
