LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-27-2004, 09:38 PM   #1
caicai
LQ Newbie
 
Registered: May 2004
Posts: 2

Rep: Reputation: 0
Question automatically startup a program after booting?


Hi,

I want to automatically startup some program after booting my Red Hat, say, evolution, how to config any files?

Thanks
 
Old 05-27-2004, 10:01 PM   #2
shaggz
Member
 
Registered: Dec 2002
Location: FuNkYToWN
Distribution: SuSe, Gentoo, Fedora
Posts: 64

Rep: Reputation: 15
Most of your startup scripts will be in /etc/rc.d/rcX.d where X = the runlevel it is started and or Killed in.


Lets say you have a script called startme in your home directory and you wanted it to run at runlevel 3.

You could simply copy the script over to /etc/init.d then create a symlink to that in /etc/rc.d/rc3.d as follows.


[root@blackrain /usr/bin]# cp ~/startme /etc/init.d/startme
[root@MARS /usr/bin]# ln -s /etc/init.d/startme /etc/rc3.d/S99startme


This should do the trick for you. Just make sure that if it is a script that accesses a service such as apache that you put it in a runlevel after apache so apache will be running.


Hope this helps.
 
Old 05-27-2004, 10:31 PM   #3
critch
LQ Newbie
 
Registered: May 2004
Distribution: SuSE 9.1
Posts: 15

Rep: Reputation: 0
to automatically start an application...

I believe the last post is not quite what you WANT to do if you are looking to start an APPLICATION automatically.

If you use KDE (Red Hat default is Gnome), simply copy the desktop icon to the ".kde/autostart" directory.

If you want to autostart in application in any X windows system (Gnome or KDE), I think all you have to do is add a line to your ".profile" script (in your home directory). In your case adding the line "evolution" should do it.

I hope this helps.
 
Old 05-28-2004, 12:11 AM   #4
shaggz
Member
 
Registered: Dec 2002
Location: FuNkYToWN
Distribution: SuSe, Gentoo, Fedora
Posts: 64

Rep: Reputation: 15
Good call critch I think I may make things too hard for myself at times eY.


Cheers

: >
 
Old 05-28-2004, 01:54 PM   #5
caicai
LQ Newbie
 
Registered: May 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,

Thank you guys for replying. I have found a different solution which is checking the "Save current setup" when logging off, and then I will have the same environment as before after relogging in.
 
Old 07-06-2004, 02:24 PM   #6
mjjzf
Member
 
Registered: Feb 2004
Location: Valby, Denmark / Citizen of the Web
Distribution: Slackware 14.1
Posts: 879

Rep: Reputation: 38
Yes, but restoring the environment is quite a capacity-consuming thing. Better to link to an autostarting app than restoring the environment - that also means you have to set up the environment the exact way you want it when you log off?
 
Old 08-12-2004, 03:51 AM   #7
kodaku
LQ Newbie
 
Registered: Mar 2004
Location: Xuzhou,China.
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by shaggz
Most of your startup scripts will be in /etc/rc.d/rcX.d where X = the runlevel it is started and or Killed in.


Lets say you have a script called startme in your home directory and you wanted it to run at runlevel 3.

You could simply copy the script over to /etc/init.d then create a symlink to that in /etc/rc.d/rc3.d as follows.


[root@blackrain /usr/bin]# cp ~/startme /etc/init.d/startme
[root@MARS /usr/bin]# ln -s /etc/init.d/startme /etc/rc3.d/S99startme


This should do the trick for you. Just make sure that if it is a script that accesses a service such as apache that you put it in a runlevel after apache so apache will be running.


Hope this helps.
Well this method seems to fit my needs but the question is if I don't have a scripts call startme then WHAT shall I do ? how to write a shell script to "shell" a program ?
 
Old 08-12-2004, 07:16 AM   #8
kodaku
LQ Newbie
 
Registered: Mar 2004
Location: Xuzhou,China.
Posts: 16

Rep: Reputation: 0
I did as what shaggz said but still can't start it!! somebody tell me what seems to be the problem???
 
  


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
How to automatically connect on startup? PerfectReign Linux - Wireless Networking 6 09-16-2005 01:44 AM
Any way to startup daemon automatically? Niceman2005 Linux - Newbie 2 01-12-2005 09:27 PM
Automatically run scripts on startup? Phaethar Fedora 10 09-24-2004 02:35 AM
redhat 8.0 cannot startup NIC automatically alvalee Linux - Networking 5 03-30-2004 11:36 PM
startup the service automatically ashley75 Linux - General 4 09-24-2003 02:14 AM


All times are GMT -5. The time now is 03:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration