NOTE: This post has been edited to place all of the thread's high points in one place.
First, this post assumes knowledge of what's in CHANGES_AND_HINTS.TXT -- if you haven't read that yet, go do that before you even bother with this thread...
Many people have figured this out by now, but there's one "gotcha" with automounting removable devices using HAL.
Console users are automatically added to the cdrom and plugdev groups at login via /etc/login.defs
Code:
# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting). Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...
#
CONSOLE_GROUPS floppy:audio:video:cdrom:plugdev
The idea behind doing this was that it would "just work" without the need for admins to manually add users to the plugdev and cdrom groups, but due to the way dbus functions, it didn't work out that way.
When the messagebus service is started, it reads the content of /etc/group and then determines whether users have rights to mount removable devices based on that. This is why the 'reload' option was added to /etc/rc.d/rc.messagebus, as you need to make it aware of any changes to /etc/group if you happen to edit that file to add users to plugdev, cdrom, power, or video groups while dbus is running.
Long story short, you will need to manually add users to the affected groups - do not rely on the output of groups(1) to determine whether a user is in the appropriate group as it pertains to dbus and HAL.
For those interested in further reading, note that this is not a Slackware-specific problem - it's being discussed in various other distribution forums as well.
http://www.debian-administration.org.../308#comment_7
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377689
http://www.mail-archive.com/debian-d...msg240793.html
Note that the "solutions" presented in the first two links are *ugly* - so my recommendation is to not even consider them, but of course, it's *your* system. The *best* way until/unless something changes in the dbus code (which doesn't seem to be easy to do in an effective and secure manner) is to manually add users to the needed groups in /etc/group.
---------------------------------------------------------------------
Re: hal-device-manager
/usr/bin/hal-device-manager needs PyGTK and a few things from gnome in order to work. Pat elected to leave the binary in the package due to the fact that some users will elect to install one of the third-party gnome builds, and any of those should provide the necessary dependencies for hal-device-manager to work.
--------------------------------------------------------------------
Re: entries in /etc/fstab
Okay, here's another hot topic that seems to be troubling a lot of people. From CHANGES_AND_HINTS.TXT:
Code:
Note that HAL will honor settings in /etc/fstab if a device is
present there, so you could technically have removable devices
defined in /etc/fstab, but if the fstab settings do not allow normal
users to mount them (with the "user" or "users" option), then HAL/dbus
will not allow them to be mounted either.
Also note that you will need to run "/etc/rc.d/rc.messagebus reload"
after adding any users to plugdev, power, or video groups so that it
re-reads the /etc/group file.
Put yourself in the cdrom and plugdev groups regardless, but here's an example to hopefully clarify what's written above.
Without a custom udev rule and an fstab entry, my Sandisk Cruzer Micro will be automatically assigned the next available /dev/sd* node by udev, and then I can mount it using HAL (well, actually DBUS via either KDE or XFCE, but that's inconsequential details for now) at /media/CRUZER_1024 (note that "CRUZER_1024" is the filesystem label that I put on it). The device will be mounted in /media with whatever name the filesystem label has.
Suppose I like for the device to be mounted in some other location for whatever reason. I would create a custom udev rule (how to do that is left as an exercise to the reader - there's ample documentation available on the subject) to assign a persistent /dev/cruzer1024 symlink to the device node, and then I would add the device to /etc/fstab like this:
Code:
/dev/cruzer1024 /mymountpoint vfat noauto,user,rw,dmask=0022,fmask=0133 0 0
At this point, I can mount/unmount the device from a command line *exactly* like I could in Slackware 11.0, or I can *still* use HAL (subject to same "actually" comment as above) to mount the device, and it will be mounted to the place and with the options specified in /etc/fstab.
---------------------------------------------------------------------
Re: Mounting devices in console (not in X)
For those using a desktop environment other than KDE, GNOME, or Xfce and still want to make use of HAL, have a look at
http://slackbuilds.org/repository/12.0/system/ivman/ and
http://slackbuilds.org/repository/12.0/system/pmount/.
I have not really messed with these much (aside from building and basic testing), so configuration is up to you. I also have binary packages on my site (see signature).
---------------------------------------------------------------------
Re: Using ntfs-3g instead of the in-kernel ntfs driver for NTFS filesystems
First, install ntfs-3g (I'll put in a plug for
http://slackbuilds.org on this one) :-)
Note: policy files in /etc/hal/* override the defaults in /usr/share/hal/*
Next, create /etc/hal/fdi/policy/10-ntfs-policy.fdi with the following content:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="volume.fstype" string="ntfs">
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<merge key="volume.fstype" type="string">ntfs-3g</merge>
<merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
<append key="volume.mount.valid_options" type="strlist">locale=</append>
</match>
</match>
</device>
</deviceinfo>
Next, restart the HAL service: /etc/rc.d/rc.hald restart
All should be well.
Note: this information was gleaned from
http://wiki.archlinux.org/index.php/HAL
---------------------------------------------------------------------
Other Notes:
Use one of the generic kernels.
Do not report bugs until/unless you have verified that they are also present when using one of the generic kernels - otherwise, I (and presumably others) will ignore you.
Whatever user account you are using (yes, even root, if you're using that account) must be a member of the plugdev group in order to mount devices using HAL/DBUS.
---------------------------------------------------------------------