aspose file tools*
The moose likes Linux / UNIX and the fly likes CD Auto Run in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "CD Auto Run in Linux" Watch "CD Auto Run in Linux" New topic
Author

CD Auto Run in Linux

venkat paruchuri
Greenhorn

Joined: Aug 15, 2001
Posts: 28
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

Joined: Jun 25, 2001
Posts: 16065
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: CD Auto Run in Linux