LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2007, 09:17 AM   #1
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Rep: Reputation: 16
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
 
Old 09-28-2007, 09:58 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 09-28-2007, 10:15 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Quote:
Originally Posted by ASTRAPI View Post
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.
 
Old 09-28-2007, 04:55 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 09-28-2007, 08:02 PM   #5
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Thanks i will try both ways.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
autorun cd file..help please!!! anretal Programming 1 05-31-2006 06:39 AM
How to write an autorun.inf file Digital Surgeon Programming 6 04-04-2006 04:46 PM
SETUP.EXE/autorun.exe don't run in wine mst3kman Linux - Games 3 01-22-2006 03:20 PM
Autorun a .html file on inserting a DVD ilhbutshm Linux - Software 10 04-20-2005 12:07 PM
Autorun.sh script to mount CD and run .bin file kulkarni08 Linux - General 2 06-24-2003 02:01 PM


All times are GMT -5. The time now is 01:13 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration