LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to make HAL *work* on Slackware 12-rc ?? (https://www.linuxquestions.org/questions/slackware-14/how-to-make-hal-%2Awork%2A-on-slackware-12-rc-562113/)

Yalla-One 06-15-2007 04:33 PM

How to make HAL *work* on Slackware 12-rc ??
 
Hi,

Having recently converted yet another family member to Slackware, the old method of su; mount /dev/cdrom;exit to mount a CD is no longer an option. Allowing the user him/herself to mount from command line isn't a whole lot better.

Enter HAL..

But wait - has anyone actually gotten HAL to work ?

I'll be the first to admit that English is not my first language, so having read the HAL documentation up and down I have probably missed something. For the life of me I simply cannot get the beast to work.

I have removed the /dev/cdrom and /dev/ipod entries from fstab. I have created a fresh new KDE user to experiment with, and regardless what I do, I cannot for the life of me get HAL, KDE or anyone else for that sake to mount the CD, get Amarok to find the iPod, or get Konqueror to read the memory stick.

If anyone who has made this work, could spare a minute to share some insight, I can assure you it will be greatly appreciated!!

Thanks in advance!

-y1

erklaerbaer 06-15-2007 05:19 PM

*cough* plugdev *cough*

EDIT:
Quote:

PACKAGE NAME: hal-0.5.9-i486-3.tgz
PACKAGE LOCATION: ./slackware/l
PACKAGE SIZE (compressed): 713 K
PACKAGE SIZE (uncompressed): 2310 K
PACKAGE DESCRIPTION:
hal: hal (The HAL Hardware Abstraction Layer)
hal:
hal: HAL is a piece of software that provides a view of the various
hal: hardware attached to a system. HAL keeps detailed metadata for each
hal: piece of hardware and provides hooks so that system and desktop
hal: software can react to changes in the hardware configuration (such as
hal: the insertion of a DVD, or a USB flash memory stick). Users in the
hal: "plugdev" or "cdrom" group will be able to use such devices on the
hal: desktop without the need to mount/umount them manually.
hal:
hal: For more info, see: http://www.freedesktop.org/Software/hal

Eternal_Newbie 06-15-2007 06:23 PM

I followed the instructions in post 30 in this thread and added myself to the plugdev, cdrom, video and power groups and HAL works for me. Remember to restart messagebus afterwards.

mobilemonkey 06-15-2007 07:37 PM

im probably missing something here, but couldnt you just write a small script incorporating the 'su' command, the mount command, and whichever program you need to access the information on the device? (e.g , xmms, which could enque all the songs on the cd into its playlist) then drop a shortcut to it on the desktop?

Yalla-One 06-16-2007 01:46 AM

Quote:

Originally Posted by erklaerbaer
*cough* plugdev *cough*

Thanks a bunch erklaerbaer - plugdev did the trick! I read the text too literally where it said "plugdev or cdrom" - I guess the correct would be to say "plugdev and cdrom" ..

Anyway - that fixed it - much appreciated - thanks!

-Y1

Daedra 06-16-2007 01:55 AM

could someone direct me to a guide on setting up HAL, I never had a need for it, but I kind of want to try it out.

iiv 06-16-2007 03:13 AM

Quote:

Originally Posted by Daedra
could someone direct me to a guide on setting up HAL, I never had a need for it, but I kind of want to try it out.

You'll need packages messagebus and hal from -current, also grab .new files for your /etc/passwd /etc/grop to look at what you should add. Then just add yourself to groups plugdev and power and restart messagebus /etc/rc.d/rc.messagebus restart
If everithing went the right way then try to plug your some kind of flash drive into usb or so and in your favorite file manager a device will popup(i talk about Xfce of KDE, and they should be compiled against HAL).

Daedra 06-16-2007 05:31 AM

Quote:

Originally Posted by iiv
also grab .new files for your /etc/passwd /etc/grop to look at what you should add. Then just add yourself to groups plugdev.

I have D-Bus and HAL installed and I am running slack-current with the KDE packages compiled with HAL support. The quote above is where I get lost. What do you mean by "grab" the .new files? Where are these files and what is plugdev?

Thanks

Yalla-One 06-16-2007 06:05 AM

Here's (roughly) what I did to get it working:
  1. Make sure you're on -current (12rc1)
  2. Remove the entries you want automagically mounted from /etc/fstab
  3. Add yourself (and other relevant users) to ALL the groups cdrom, plugdev and power
  4. Restart hald and messagebus after these changes
  5. Make sure udev, hal and the messagebus are started automagically (make rc.udev, rc.hald and rc.messagebus eXecutable)
If you need help getting -current, I suggest you read some of the various other excellent threads here, or read the UPGRADE.TXT file that comes with it.
The .new files referred to in the previous post are configuration files changed during the upgrade process. This is well documented in the upgrade documentation.

-Y1

Edit: Broken list formatting...

mobilemonkey 06-16-2007 02:28 PM

is HAL able to call 3rd party programs (music players, file managers etc) when it detects a new device?

erklaerbaer 06-16-2007 03:43 PM

do your own research! anyway
Quote:

When a new device is added to the system, an asynchronous signal is broadcast on the system message bus detailing what kind of device was added. Any desktop application can connect to the message bus to discover the hardware.

mobilemonkey 06-16-2007 06:44 PM

Quote:

Originally Posted by erklaerbaer
do your own research!

:eek: :D :study:

MS3FGX 06-16-2007 10:57 PM

Quote:

is HAL able to call 3rd party programs (music players, file managers etc) when it detects a new device?
HAL itself is only a method of detecting and reporting hardware changes, it does not directly interact with the user.

On the other hand, your WM/DE can listen for HAL events and react accordingly to do a number of different things. In XFCE for example, you can configure it to do exactly what you were referring to, opening up the file manager when a USB flash drive is connected, automatically playing audio CDs, etc, etc.

mobilemonkey 06-17-2007 11:38 AM

it does sound interesting, although i have the worring picture in my mind of the way xp automatically mounts cd's, and then opens the program of choice, just when your trying to do something else, i really hate that. maybe HAL is designed with the ubuntu user in mind? i could be way off on that so dont flame me :p also the xp method doesnt give you enough options to configure exactly what you want to do with a particular cd either, its like a one size fits all thing. hopefully HAL is more configurable, ive yet to research it properly, ill check it out in the next slackware release. just a noob thinking out loud ;)

erklaerbaer 06-17-2007 03:20 PM

hal just signals the messagebus. what applications do with that is up to them.
if you want to disable that feature altogether, run this once:
Quote:

hal-disable-polling --device /dev/cdrom
one's laptop should run longer, too :)


All times are GMT -5. The time now is 07:48 PM.