LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-13-2012, 05:39 AM   #1
layr
Member
 
Registered: Jan 2011
Location: Estonia
Distribution: Debian Wheezy
Posts: 38

Rep: Reputation: 0
How to run script automatically when mouse is connected/disconnected?


This is the case: for reasons not described in this thread, I have window decorations disabled by default (using Compiz). Don't miss them either, if there's mouse to use. Other thing is, when mouse is disconnected - keyboard + mouse keycombos are now missing and window management is crippled.

How to accomplish, that specific command is started, when mouse is disconnected, and other when it's connected?
PS, mouse in question has a Bluetooth connection.
Thanks!
 
Old 02-13-2012, 09:41 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,676
Blog Entries: 1

Rep: Reputation: 204Reputation: 204Reputation: 204
Take a look at using udev for this --> http://reactivated.net/writing_udev_...l#external-run
 
  


Reply


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run a shell script with super user privs when my network get disconnected!!! sd|| Linux - Newbie 1 12-02-2009 05:14 AM
how to run a shell script automatically? ceantuco Linux - Newbie 4 12-16-2008 10:16 AM
net get disconnected automatically tasnim Linux - Networking 0 08-28-2008 11:10 AM
Automatically run script on file? paddyjoy Linux - Software 3 10-03-2006 04:29 PM
Run script automatically shipon_97 Linux - Newbie 2 08-20-2006 12:13 AM


All times are GMT -5. The time now is 02:43 AM.

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