Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CD Auto Run in Linux

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27933
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic