LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-18-2007, 07:24 AM   #1
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
HAL documentation


Does anybody know where to find some good documentation for HAL?

All I came up with was snippets from mailing lists and some stuff that sounds like whoever wrote it was smoking something good

Background is that I want to avoid having my cellphone mounted as mass storage and the usb simply forwarded to a virtual xp machine to use the Nokia PC Suite.
 
Old 06-18-2007, 07:47 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If your hal package is like mine, look in /usr/share/doc/packages/hal/spec/hal-spec.html

Besides hal, there is udev and maybe hotplug. How they are pieced together is distro specific. For example, some distro use hotplug to automount a usb drive, while my distro relies on hal helper programs. Also, there is a KDE or Gnome component involved, so you need to keep that in mind as well.

I'm not familiar with the "t2" distro. You may try locating a wiki for your distro.

The starting point may be in learning about udev rules. Uniquely identify the device in a udev.d/ rule and use a RUN+="yournokiascript.sh" entry to dispatch a script to kick off the process.

Last edited by jschiwal; 06-18-2007 at 08:01 AM.
 
Old 06-18-2007, 10:07 AM   #3
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Original Poster
Rep: Reputation: 47
I did look at the specifications on the freedesktop site and although they are nice there isn't much of a description on how you would get started about doing anything at all there.

From looking at it this seems a too big can of worms to open up - especially with udev,hot- or coldplug,maybe pmount,kernel drivers and who knows what else getting into the party.

I don't really use t2 it's Debian at the moment- just give it a try about every other month to fail miserably :-)
 
Old 06-19-2007, 04:09 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I don't think that you have to bother configuring HAL at all. If you use udevinfo (udevinfo -q env -n </dev/sd#>)
you can obtain information unique to the device and add a RUN+=<script.sh> entry to launch a script in the background to start the syncing process.

The tricky part is determining where to write the rule. Also, a script run by udev can't run too long. That is why I said in the background. Alternatively, you could run a script the sends a signal to an already running script signaling that the transfer should begin. Such as "killall -SIGUSR1 phonesync.sh". The phonesync.sh script would already be running and waiting to trap the SIGUSR1 signal. Then the udev launched script would be finished. The phonesync.sh script could launch the Nokia PC suite program (Although I don't know how that is done).

Does your virtual environment handle usb devices? That was a problem in the past.
 
Old 06-19-2007, 04:31 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
I also think there is a lack of info about hal. At least last time, I was not able to find a solution to my problem.
HAL and udev are two different things. For example udev does not mount the device, it's hal that gets notified from udev through dbus that the node has been created in /dev and hal will mount the device.
If I understood well

I wanted to change the mounting options but never managed..
Also, in KDE whether pmount is called or mount is called is not so clear for me.

Last edited by nx5000; 06-19-2007 at 04:33 PM.
 
Old 06-19-2007, 07:23 PM   #6
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Original Poster
Rep: Reputation: 47
The virtual machine (virtualbox) does work with usb - just how it handles it exactly is a different question.
Might be limited to mice and keyboards.Couldn`t get it to see the thing at all.But then - I either connect in data transfer mode and then hal grabs and mounts it as mass storage or I connect in PC Suite mode and nothing shows up anywhere.I`ll check with udev as you suggested and see if I get anywhere with it.

@nx5000 Nothing is clear to me either anymore.I think I am getting too old for this :-)

Probably wont get anywhere soon with this since it seems I have a job coming up.Those people have to hassle me every 3 month??

Last edited by crashmeister; 06-19-2007 at 07:33 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use HAL wesd Linux - Software 1 06-11-2007 04:00 PM
HAL documentation RommeDeSerieux Fedora 0 03-12-2006 12:33 PM
hal package ronzoid Linux - General 4 01-18-2006 05:30 PM
hal krusty_lab Fedora 3 10-10-2005 10:23 AM
Hal gamehack Programming 7 12-16-2004 02:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration