Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions
User Name
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.


  Search this Thread
Old 08-20-2009, 07:19 AM   #1
Registered: Aug 2009
Posts: 32

Rep: Reputation: 15
USB insertion notification


How do my user space application get the notification of USB device insertion / removal from the USB core? I don't want UDEV rule to be used to get the notification.

Thanks in advance.

Old 08-20-2009, 09:09 AM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
System notification is handled via D-BUS on Linux. UDEV is used to create device nodes for connected hardware, which is a separate issue entirely.
Old 08-20-2009, 09:30 AM   #3
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
You may be able to use the 'libhal_ctx_set_device_added' to set a callback function at the hal layer (see tutorial here).
Old 08-21-2009, 05:32 AM   #4
Registered: Aug 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi neonsignal,

Thanks a lot, this link helps me a lot.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creation of device node after USB insertion paldebojyoti Linux - Distributions 6 08-20-2009 06:01 AM
usb device detection, manual insertion card(smart card) reader problem, zapkhiel Linux - Hardware 4 07-17-2009 08:50 AM
Running a script when auto-mounter detects USB thumb-drive insertion... Bane73 Linux - Desktop 4 10-24-2008 03:08 AM
How to detect insertion/removal of flash card in usb reader? logularjason Linux - Hardware 9 06-24-2006 03:11 AM
SuSe Linux 9.2 Freezes After Insertion of USB Flash Drive deepgrewal SUSE / openSUSE 13 04-13-2005 01:55 AM > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration