Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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 :-)
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.