Custom responses to HAL events

Boyan Tabakov blade.alslayer at gmail.com
Thu Nov 16 12:46:42 GMT 2006


On 16.11.2006 01:10, Paul Worrall wrote:
> Thanks Boyan... that got me thinking.  The solution I have come up with is
> to use a udev rule.  When I plug in my PDA, a network interface called usb0
> is created for it, so I created a file /etc/udev/rules.d/85-PDA.rules
> containing:
>
>     KERNEL=="usb0", RUN+="/home/paul/bin/PDA"
>
> and a /home/paul/bin/PDA script containing:
>
> #! /bin/sh
> case "$ACTION" in
>     "add")
>     cp /home/paul/PDA.desktop /home/paul/Desktop
>     ;;
>     "remove")
>     rm -f /home/paul/Desktop/PDA.desktop
>     ;;
> esac
>
> This needs a bit of polishing, but it seems to do what I wanted.
>
> Thanks again

Great! Your idea is even better! I just forgot what you can do with udev 
rules:) Good luck...

-- 
Blade hails you...

I am the dark side of you
              --Nightwish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde/attachments/20061116/ca50a70b/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list