LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2009, 05:55 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Bash script to start another script when USB is inserted?


Since "autorun" seems to be only made for Windows users, I was wondering how to make a script that invokes a script on my USB?
Basically-I insert my USB-which invokes the script and starts the other script.
Example-
I have DSL/Qemu on my USB-I want the qemu script to "autostart" when I insert the USB.
So how do I make a script that autostarts Qemu from USB??
Oh-also-both scripts need to be on my USB-so I can just insert the usb inot almost any PC and Qemu starts
Possible?

Last edited by linus72; 04-16-2009 at 05:56 AM.
 
Old 04-16-2009, 06:19 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Nope. Not trivially, anyway. Scripts that trigger on plug-n-play
events need to be known to the udev subsystem, rules for which
reside under /etc/udev/rules.d ... not on your stick (unless you've
already booted of it - in which case the question is moot).
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run script to copy usb drive when inserted actmnophn Linux - Newbie 1 11-19-2008 09:00 AM
pause bash script unitil blank cd inserted in burner? frieza Linux - General 6 11-16-2008 11:35 AM
bash - start remote script from local script? babag Programming 7 04-06-2008 06:46 PM
How to start running a script once a CD is inserted garagestudios Programming 14 12-26-2007 04:22 PM
howto auto-launch a script when usb key inserted? adamrosspayne Linux - Newbie 3 09-22-2006 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration