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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-12-2002, 04:38 PM
|
#1
|
Member
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103
Rep:
|
Starting program automatically as logging in
Is there a script I can add a command to (or program) so that the program will start whenever I log on?
I've got Kmix in mind- so that I can control the volume all the time.
Thanks
Adam
|
|
|
03-13-2002, 07:01 AM
|
#2
|
LQ Newbie
Registered: Mar 2002
Location: Russia
Distribution: SuSE
Posts: 8
Rep:
|
if u want to start program when user foo is logged in, u should edit file /home/foo/.bashrc (if bash is foo's default shell, may be /home/foo/.profile will right choice).
if all users should start your script, u should change /etc/profile (in some systems the right way is to change /etc/profile.local. If u find in /etc/profile call of /etc/profile.local, than change /etc/profile.local)
if your script should be started when system starts, then u should edit /etc/rc.d/boot (or /etc/rc.d/boot.local)
but anyway read the doc about how system is started.
it's right to change *.local files because when u choose automatic upgrade of package files /etc/profile, /etc/rc.d/boot would be overwritten.
|
|
|
03-13-2002, 07:54 AM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well kmix is presumably a kde app (*COUGH*gnome*COUGH*) so you need to put it in ~/.xinitrc of ~/.Xclients depending on which one exists already. there's probaly a lame kde way to do it, but that's the hardcoded approach
|
|
|
03-13-2002, 08:11 AM
|
#4
|
LQ Newbie
Registered: Mar 2002
Location: Russia
Distribution: SuSE
Posts: 8
Rep:
|
hm... in kde, just on exit say "save session" with application u wish to start running and all will be ok
|
|
|
03-13-2002, 08:37 AM
|
#5
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
You can also, for KDE, open the directory ~/.kde/Autostart (or whatever it is) and link the program into it. If you're going to be using KDE then I would advise you use this method. I've had KDE getting a bit stroppy when I launch stuff from .xinitrc. Of course, if you're going to be using another WM/DE then use the .xinitrc way. As with all applications, KMix can be run in any WM/DE as long as you have the QT libraries installed (i.e. KDE is installed  ).
|
|
|
03-13-2002, 11:24 AM
|
#6
|
Member
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103
Original Poster
Rep:
|
thanks guys and lasses(?) - will give it a go.
My gllobal profile script sounds the best solution.
Adam
|
|
|
03-13-2002, 11:33 AM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally posted by adcripps
thanks guys and lasses(?) - will give it a go.
My gllobal profile script sounds the best solution.
Adam
|
the best solution? so you didn't actually bother reading the other replies then??
|
|
|
03-13-2002, 12:38 PM
|
#8
|
Member
Registered: Dec 2001
Location: chicago, IL
Distribution: Gentoo 1.4_rc1
Posts: 913
Rep:
|
If you are using a alternate Window Manager then you can just add the program name to the ~/.xinitrc file above the wm load line. But for kde/gnome all you need to do is go in and choose save session.
|
|
|
03-13-2002, 12:47 PM
|
#9
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
I thought that 'Save Session' was only really to save the state of your current session. If you need to log out quick and you've got konqueror running, then saving the state will ensure that konqueror loads up again when you log back in. For simply having the same program load on startup, this might not be helpful.
|
|
|
03-13-2002, 12:47 PM
|
#10
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally posted by therion12
If you are using a alternate Window Manager then you can just add the program name to the ~/.xinitrc file above the wm load line. But for kde/gnome all you need to do is go in and choose save session.
|
me...
"well kmix is presumably a kde app (*COUGH*gnome*COUGH*) so you need to put it in ~/.xinitrc of ~/.Xclients depending on which one exists already. there's probaly a lame kde way to do it, but that's the hardcoded approach"
dimonb
"hm... in kde, just on exit say "save session" with application u wish to start running and all will be ok"
any particular reason for just plain repeating what people had already said?
|
|
|
All times are GMT -5. The time now is 03:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|