LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Autorun a exe file when ubuntu boots. (https://www.linuxquestions.org/questions/linux-newbie-8/autorun-a-exe-file-when-ubuntu-boots-587989/)

ASTRAPI 09-28-2007 08:17 AM

Autorun a exe file when ubuntu boots.
 
Hi
I am trying to autorun a exe file in Ubuntu when is loading the desktop.

In windows for example i put it in the start ->programs->Autorun folder.

How can i do the same in Linux?


Thanks

theNbomr 09-28-2007 08:58 AM

You can set up your executable as a service, probably in /etc/init.d/, and use chkconfig to specify what runlevels in which the service should start. This would be the convention for programs which are intended to run perpetually as daemons. The simpler alternative would be to run the program from /etc/rc.local, which is invoked last in the boot sequence.

man chkconfig
man init

--- rod.

marozsas 09-28-2007 09:15 AM

Quote:

Originally Posted by ASTRAPI (Post 2906478)
Hi
I am trying to autorun a exe file in Ubuntu when is loading the desktop.

To run a program when the desktop loads, well, this depends on what desktop you are running. On Ubuntu is, probably, GNOME.

On Gnome, on menu bar, go to System/Preferences/Personal/Sessions.
On sessions window, on startup tab, click on new button. Type a descriptive name and the command, with the complete path if possible and any flags or parameters if needed.

You may also load any programs you want, and save your current session. Next time you desktop start, it will load all programs was opened when you saved the session. To do that, on sessions window, go to Session Options tab, and click on Save the Current Session button. Not all programs can be saved by this way, so you may have to use the previous method.

theNbomr 09-28-2007 03:55 PM

Ahh. I only read your subject line, and didn't closely read the question in the body of your post. Note that you have actually asked two quite different questions. Booting Ubuntu is quite different from loading a desktop. marozsas seems to have identified your best approaches.

--- rod.

ASTRAPI 09-28-2007 07:02 PM

Thanks i will try both ways.


All times are GMT -5. The time now is 03:58 AM.