From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Mon, 11 May 2009 22:54:48 +0000 Subject: Re: How can I bring up a dialogue window when a usb device plugged? Message-Id: <20090511225448.GA1383@kroah.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, May 11, 2009 at 03:53:52PM -0700, Andy Chen wrote: > > 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? Yes. > Is it the method employed in current kernel for the file explore auto > pop up when usb hard drive plug in? The kernel does no such thing, that is up to the desktop infrastructure. I think Gnome uses HAL and dbus to do this currently, KDE uses much the same thing as well. I suggest you go look at their code if you have questions. good luck, greg k-h