LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-02-2008, 08:13 AM   #1
jonnyhashem
Member
 
Registered: Jul 2005
Location: usa
Distribution: csac
Posts: 36

Rep: Reputation: 15
Running a program automatically after loging in Fedora core 5


Hi:
Iam trying make my computer with Fedora core 5 to run a program automatically right after logging in ,any body have an idea?

Thanks in advance;
Jonny
 
Old 02-02-2008, 10:37 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Are you logging into KDE, GNOME or the CLI?
 
Old 02-02-2008, 02:27 PM   #3
jonnyhashem
Member
 
Registered: Jul 2005
Location: usa
Distribution: csac
Posts: 36

Original Poster
Rep: Reputation: 15
Running a program automatically after loging in Fedora core 5

Hi:
Iam using Gnome .

Thank you for your reply.
 
Old 02-02-2008, 03:39 PM   #4
shadow5277
Member
 
Registered: Aug 2005
Location: Texas
Distribution: Redhat FC4, Fedora 8 and AIX 5.3, AIX 6.1
Posts: 39

Rep: Reputation: 16
Hello Jonnyhashem,

You can do this one of to ways you can have init start the program for you by doing the following:

# who -r
run-level 5 2008-02-02 15:13 last=S
^^^^^^^^^^^ <- this tells you your current run level that you are in while you are in regular startup mode.

So if your who -r comes back as 5 then you will need to go to

cd /etc/rc5.d

Then in that did you will see several files that start with an S and K the S is for a start script and the K if for a kill script
you can look at them to see how the are formed really strait forward from a shell scritpitng point of view. So you will just need to create one of each for you prorgram and it will start and stop each time the run level is for run level 5 if you need for it to be at other run levels then you will go to the rc#.d dir and just copy your K and S scripts.

The other way which I have see several people do it is to just added the name of your program to their /home/<username>/.bash_profile
then just have it start that way because the shell will run the program for you if it is in the .bash_profile.

I would go with using init since that is really what its design to do.
 
Old 02-04-2008, 05:30 PM   #5
The_Trooper
Member
 
Registered: Jan 2008
Distribution: Fedora Core 9
Posts: 33

Rep: Reputation: 15
To make a program run when you log in, simply make a link to it in the directory
~/.config/autostart

(~ means /home/<your username>/)
An example is have a file browser go to ~/.config/autostart then click on (in the gnome menu) Applications/Accessories and drag a menu item into that folder.
 
  


Reply



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
Fedora automatically opens program after rebooting tkt Linux - Newbie 4 11-05-2006 11:33 PM
how can mount automatically Home dicrectory for fedora core 5 masudur_iiu Linux - Newbie 3 08-25-2006 04:19 PM
quick q: KDE + KDM: automatically running a program after login atom Linux - Software 2 04-12-2005 08:50 AM
automatically starting process in Fedora Core 2 by using script falkesgaard Programming 1 07-29-2004 10:11 AM
Running a program automatically by the clock? orange400 Linux - General 4 07-12-2004 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:29 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
Open Source Consulting | Domain Registration