LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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
  Search this Thread
Old 02-11-2010, 06:35 AM   #1
archer_faye09
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Autorun on linux?


Is it possible to automatically run a program on a USB Flash drive upon plugging it on a computer?

the program should create a text file inside the USB flash drive as i plug it on the computer? Is this possible? how can i do this? autorun.inf doesn't work. Are there any solutions? by the way, i am using kernel 1.0 on my computer...
 
Old 02-11-2010, 06:48 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A) That is a terrible idea. The program on a USB flash drive could be anything. Autorun in windows is a major vector for malware.
B) Use "uname -r" to find out your kernel version. 1.0 is not right.

You would need to launch the a program using custom udev rules which would in turn run the program on the USB after it is mounted. You may want to use the UUID of the filesystem of a flash drive in your udev rule, so that you know you prepared it yourself for this to be relatively save (provided someone else didn't modify the contents).
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
autorun in lInux mili Linux - Newbie 5 10-10-2012 05:59 AM
CD autorun scripts for FC3 or any other new linux distros cpraveen84 Fedora 1 09-30-2005 10:00 AM
autorun for linux mili Linux - Newbie 4 09-24-2005 11:11 PM
How to create autorun CDs in Linux shivanand Linux - General 5 04-04-2005 07:13 PM
Linux burnt cd doesn't autorun in windows TelemachusMPH Linux - Newbie 1 08-19-2003 06:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:39 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