public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usb hotplug and hooking
@ 2009-03-02 13:39 Oguz Yarimtepe
  2009-03-02 14:13 ` Oliver Neukum
  2009-03-02 15:34 ` Sitsofe Wheeler
  0 siblings, 2 replies; 6+ messages in thread
From: Oguz Yarimtepe @ 2009-03-02 13:39 UTC (permalink / raw)
  To: linux-kernel

Hi,

I want to run an application when an external usb flash disk is plugged to
my box machine that has STLinux installed in it. My aim is to check some
issues on usb disk, whether it has an official software or not. I am not
sure how will i hook my own application that will check usb device
when it is plugged. I don't want the application run at the
background, but run only when a plug is occured.

Will be happy if you guide a little.

Thanx.

--
Oğuz Yarımtepe
www.loopbacking.info

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: usb hotplug and hooking
  2009-03-02 13:39 usb hotplug and hooking Oguz Yarimtepe
@ 2009-03-02 14:13 ` Oliver Neukum
  2009-03-02 14:33   ` Oguz Yarimtepe
  2009-03-02 15:34 ` Sitsofe Wheeler
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2009-03-02 14:13 UTC (permalink / raw)
  To: Oguz Yarimtepe; +Cc: linux-kernel

Am Montag 02 März 2009 14:39:41 schrieb Oguz Yarimtepe:
> Hi,
>
> I want to run an application when an external usb flash disk is plugged to
> my box machine that has STLinux installed in it. My aim is to check some
> issues on usb disk, whether it has an official software or not. I am not
> sure how will i hook my own application that will check usb device
> when it is plugged. I don't want the application run at the
> background, but run only when a plug is occured.

Have you looked at writing a udev script? Do you need a GUI?

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: usb hotplug and hooking
  2009-03-02 14:13 ` Oliver Neukum
@ 2009-03-02 14:33   ` Oguz Yarimtepe
  2009-03-02 14:48     ` Xavier Bestel
  0 siblings, 1 reply; 6+ messages in thread
From: Oguz Yarimtepe @ 2009-03-02 14:33 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel

I will look at the udev scripting. I don't need a GUI, yet. I will
just communicate with the usb device, check its files and if an
authorized software is found (will use asymmetric cryptography) will
load it.  I can write the software that will do the mentioned things.
I just don't know the hooking part. But udev is a good start. Thanks.

2009/3/2 Oliver Neukum <oliver@neukum.org>
>
> Am Montag 02 März 2009 14:39:41 schrieb Oguz Yarimtepe:
> > Hi,
> >
> > I want to run an application when an external usb flash disk is plugged to
> > my box machine that has STLinux installed in it. My aim is to check some
> > issues on usb disk, whether it has an official software or not. I am not
> > sure how will i hook my own application that will check usb device
> > when it is plugged. I don't want the application run at the
> > background, but run only when a plug is occured.
>
> Have you looked at writing a udev script? Do you need a GUI?
>
>        Regards
>                Oliver
>



--
Oğuz Yarımtepe
www.loopbacking.info

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: usb hotplug and hooking
  2009-03-02 14:33   ` Oguz Yarimtepe
@ 2009-03-02 14:48     ` Xavier Bestel
  0 siblings, 0 replies; 6+ messages in thread
From: Xavier Bestel @ 2009-03-02 14:48 UTC (permalink / raw)
  To: Oguz Yarimtepe; +Cc: Oliver Neukum, linux-kernel

On Mon, 2009-03-02 at 16:33 +0200, Oguz Yarimtepe wrote:
> I will look at the udev scripting. I don't need a GUI, yet. I will
> just communicate with the usb device, check its files and if an
> authorized software is found (will use asymmetric cryptography) will
> load it.  I can write the software that will do the mentioned things.
> I just don't know the hooking part. But udev is a good start. Thanks.

Have a look at halevt:
http://www.environnement.ens.fr/perso/dumas/halevt.html

HTH,
	Xav



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: usb hotplug and hooking
  2009-03-02 13:39 usb hotplug and hooking Oguz Yarimtepe
  2009-03-02 14:13 ` Oliver Neukum
@ 2009-03-02 15:34 ` Sitsofe Wheeler
  2009-03-02 15:46   ` Oguz Yarimtepe
  1 sibling, 1 reply; 6+ messages in thread
From: Sitsofe Wheeler @ 2009-03-02 15:34 UTC (permalink / raw)
  To: Oguz Yarimtepe; +Cc: linux-kernel

Hello,

On Mon, Mar 02, 2009 at 03:39:41PM +0200, Oguz Yarimtepe wrote:
> I want to run an application when an external usb flash disk is plugged to
> my box machine that has STLinux installed in it. My aim is to check some
> issues on usb disk, whether it has an official software or not. I am not
> sure how will i hook my own application that will check usb device
> when it is plugged. I don't want the application run at the
> background, but run only when a plug is occured.

I think these days that problem tends to be handled by HAL
http://www.freedesktop.org/wiki/Software/hal and some software listening
to HAL events on dbus . If you are using KDE or GNOME both of these have
tools for automatically running software when devices are detected
(GNOME uses gnome-volume-manager and I think KDE has media://ioslave).

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: usb hotplug and hooking
  2009-03-02 15:34 ` Sitsofe Wheeler
@ 2009-03-02 15:46   ` Oguz Yarimtepe
  0 siblings, 0 replies; 6+ messages in thread
From: Oguz Yarimtepe @ 2009-03-02 15:46 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: linux-kernel

I don't have hald installed at my platform. It is an embedded
platform. Checking the udev rules now.


>
> I think these days that problem tends to be handled by HAL
> http://www.freedesktop.org/wiki/Software/hal and some software listening
> to HAL events on dbus . If you are using KDE or GNOME both of these have
> tools for automatically running software when devices are detected
> (GNOME uses gnome-volume-manager and I think KDE has media://ioslave).
>
> --
> Sitsofe | http://sucs.org/~sits/
>



-- 
Oğuz Yarımtepe
www.loopbacking.info

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-02 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 13:39 usb hotplug and hooking Oguz Yarimtepe
2009-03-02 14:13 ` Oliver Neukum
2009-03-02 14:33   ` Oguz Yarimtepe
2009-03-02 14:48     ` Xavier Bestel
2009-03-02 15:34 ` Sitsofe Wheeler
2009-03-02 15:46   ` Oguz Yarimtepe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox