Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CD Auto Run in Linux

 
venkat paruchuri
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have developed a swing application and made EXE using a thrid party software. I wrote autorun.ini file to extract my EXE automatically when CD is inserted into the CD Drive. The code to accomplish is
[autorun]
SHELL\CDStart=Start MyApp Setup
SHELL\CDStart\COMMAND=MyApp.exe
SHELL=CDStart
This particular code is working fine for windows OS.
Now I have created EXE of my application for Linux platform and has problem with auto extracting the EXE, like any other software for windows, when CD is inserted into CD drive. Is it possible to extract EXE automatically in Linux? I appreciate if anybody can help me out to fix this problem? Looking forward for immediate help..
thank you everybody
venkat
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18009
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, not in the literal sense, since files ending with ".EXE" are supposed to be DOS/Windows/OS/2 executables. Linux executables rarely have extensions.
However, in the wider sense, the answer is - sometimes.
If you're running Red Hat V7 or later with a GUI desktop such as Gnome or KDE the desktop will detect the insertion of a CD and automatically mount it, then look for a file named "autorun", which is usually a shell script. If the autorun file is found, it will be executed.
However if there's no GUI desktop, the CD will neither automount nor execute (which it can't, since it's not mounted).
So, in many popular cases, yes you can do what Windows, but it won't work everywhere and everytime.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic