RE: How can I bring up a dialogue window when a usb device plugged?

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

 



Hi Greg,
 
Thanks for the advice.
 
For the mechanism you mentioned, does it mean that I should create a daemon with libudev to keep on tracking the event coming out and bringing the gui window from there?
Is it the method employed in current kernel for the file explore auto pop up when usb hard drive plug in?

 
Thanks,
Andy 
----------------------------------------
> Date: Mon, 11 May 2009 14:43:15 -0700
> From: greg@xxxxxxxxx
> To: andychen_ca@xxxxxxxxxxx
> CC: linux-hotplug@xxxxxxxxxxxxxxx
> Subject: Re: How can I bring up a dialogue window when a usb device plugged?
>
> On Mon, May 11, 2009 at 02:28:32PM -0700, Andy Chen wrote:
>>
>> Hi There,
>>
>> I need someone kind help on config udev module for auto pop up
>> dialogue window when device plugged via the rule define. Here is
>> simple rules I defined but not working. Can someone point out what
>> should be for the proper setting:
>>
>> ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="1004", RUN+="Xdialog --title "INFO BOX"& "
>
> This will not work as you do not have a x session from this context.
>
> Try writing a program that either ties into libudev to catch these kinds
> of events, or uses dbus to watch for HAL events. Then you can create
> your own dialog box when specific devices show up as you wish.
>
> Hope this helps,
>
> greg k-h

_________________________________________________________________
Create a cool, new character for your Windows Live™ Messenger. 
http://go.microsoft.com/?linkid=9656621--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux