How to get automatic volume management on Fedora 14 without Gnome
One of the nice things about a modern Linux machine is that if you plug in a USB key or stick a CD-ROM into your DVD drive, it will automatically get noticed and mounted for you. Well, let me amend that; this is what happens if you run Gnome or KDE (and possible XFCE as well), because they take care of all of the necessary magic for you. If you are crazy enough to run some sort of hand-crafted environment, you get to set up something to do this yourself.
In the old days you could just run
the Gnome program that did all of this magic and everything worked.
By the time Fedora 10 rolled around, this no longer worked for me
and I had to find another solution. The best one that I found is
a program called halevt
.
Halevt basically works just like gnome-volume-manager
used to.
You start it during your session initialization (backgrounded) and
it automatically mounts new volumes that show up for you. The only
difference is that you use halevt-umount
to unmount volumes, instead
of gnome-umount
, and it has slightly different command line options.
However, there is a hitch. Halevt is packed for Fedora 14, but
unfortunately the package is broken by default because it no longer
includes a necessary configuration file. The version of halevt
packaged for Fedora jumped significantly between Fedora 13 and Fedora
14, and I don't think the packaging has caught up; the Fedora 13 version
packaged and used a suitable default configuration file, and the Fedora
14 version doesn't really.
Fortunately we can fix this in a relatively simple way; we just need
to extract the configuration file from the Fedora 13 version of the
halevt
RPM and then put it where halevt
will find it. The procedure
for that goes like this:
- make sure that you have the
yum-utils
RPM installed so that you have theyumdownloader
command. - get a copy of the Fedora 13 RPM:
cd /tmp
yumdownloader --releasever 13 halevt
(I will pause to sing the praises of
--releasever
some more, because it's made trivial something that would otherwise be a huge pain in the rear.) - extract the file:
rpm2cpio halevt-* | cpio -id ./usr/share/halevt/halevt.xml
- copy it to where
halevt
expects to find it:mkdir $HOME/.halevt
cp usr/share/halevt/halevt.xml $HOME/.halevt/
You can modify the halevt.xml
configuration file if you want to.
Personally, I changed the mount options by taking out 'sync
' and
adding 'relatime,shortname=lower
'.
(I hate having MS-DOS filesystems shout at me, even if it is theoretically their natural state.)
|
|