What is the purpose of HAL?

Thomas Ilnseher illth at gmx.de
Mon Dec 1 06:28:44 PST 2008


Am Sonntag, den 30.11.2008, 23:56 +0600 schrieb Mikhail Gusarov:
> Twas brillig at 18:45:04 30.11.2008 UTC+01 when peterk2 at coolmail.se did gyre and gimble:
> 
>  p> Afaict, HAL is a daemon used to handle hotplug/coldplug of hardware
>  p> devices. How is this different from what, for instance, udev handles
>  p> them?
I'm no expert in these things, but afaik udev is used to dynamically
create device nodes (which is important if linux switches to dynamic
major / minor allocation). udev is Linux specific. (udev can take some
extra actions when devices are hotplugged / coldplugged)

hal is a daemon that informs other clients (listening to hal) when
devices are cold / hotplugged. it can do other stuff like mounting /
unmounting upon client request. (the client doesn't need to be root
therefore). 

Now you could implement the mounting part with udev only, (automatically
mount partitions / disks when disk is hotplugged), but then:
* unomunting (w/o) root would not be (easily) possible
* you have to check the partition type / fs-type before mounting. This
means you end up hacking some fat bash script.
* with hal, you can set permissions (eg. for FAT fs) so that the user
working on the desktop has r/w access to the mountpoint.


> 
> Is this really the right mailing list to ask? Not mentioning that the
> answer is available on the HAL homepage (which you apparently did not
> check).
> 
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
-- 
Thomas Ilnseher <illth at gmx.de>




More information about the xorg mailing list