HAL in Slackware 12

From SlackWiki
Jump to navigation Jump to search

Preface

This page was started to provide documentation and examples of the "new" HAL feature in Slackware 12. Before reading or implementing anything that you've read here, be sure to first read the following two paragraphs from the CHANGES_AND_HINTS text file:

The /dev/cdrom line in /etc/fstab is commented out by default, as it interferes with HAL.
HAL defaults to on, so if you do not wish to use it, you will need to
chmod -x /etc/rc.d/rc.hald and uncomment the /dev/cdrom line in /etc/fstab

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.

Enabling HAL for Your Users

First, add your users to the secondary groups: cdrom, plugdev, power
Second, restart the HAL and messagebus services with the following two commands (as root):
 # /etc/rc.d/rc.messagebus restart
 # /etc/rc.d/rc.hald restart

About the /etc/fstab Entry

The line that typically mounts the CDROM drive in /etc/fstab is commented out by default. Also, only root can give the command to mount /dev/cdrom by default. The original line looks something like

#/dev/cdrom       /mnt/cdrom     auto        noauto,owner,ro     0   0

CHANGES_AND_HINTS suggests that you leave this line commented out in order for HAL to work. It may be necessary, however, to uncomment this line for certain programs which expect the cdrom device to be mounted to a specific place (games running via WINE come to mind). To allow this, change the cdrom entry in /etc/fstab to look like

/dev/cdrom       /mnt/cdrom     auto        noauto,user,owner,ro     0   0

Using HAL

Your users should now be able to take advantage of Autofs, KDE's Storage Media settings and programs like ivman in order to mount removable media to the appropriate places.

Other Reading

See rworkman's thread on LinuxQuestions.org about 12.0 and HAL: http://www.linuxquestions.org/questions/slackware-14/12.0-and-hal-read-this-566862/