LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04:55 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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 04:56 AM.
 
Old 04-16-2009, 05:19 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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



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 08:00 AM
pause bash script unitil blank cd inserted in burner? frieza Linux - General 6 11-16-2008 10:35 AM
bash - start remote script from local script? babag Programming 7 04-06-2008 05:46 PM
How to start running a script once a CD is inserted garagestudios Programming 14 12-26-2007 03:22 PM
howto auto-launch a script when usb key inserted? adamrosspayne Linux - Newbie 3 09-22-2006 04:21 AM

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

All times are GMT -5. The time now is 10:50 AM.

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
Open Source Consulting | Domain Registration