Re: Custom responses to HAL events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpTAdK8LLEOv.pgp
Description: PGP signature

___________________________________________________
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.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux