Running an application at startup for a specific user
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
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.
Running an application at startup for a specific user
Hi all,
How can I run an application automatically, when a user just logs in?
But I couldn't edit /etc/rc.local as I'm not a root user.
Whatever I do for this shouldn't affect any other user account.
If you use a XWindow session there is a file called .xsession in your home from which you can start applications.
If you are in a console window there i salways the old method in .bashrc.
If you are speaking about a Desktop manager (Gnome, Kde) there are frendly interfaces to configure which application to start at login: for Gnome there is Menu->Resorces->Preferences->Session->Startup.
If it's at login only, add something to .bash_login (create if it does not exist). If it must run for every shell that you open, add it to .bash_profile (again, create if it does not exists). On my slackbox, profile overrides login.
PS 1) please note the dot at the beginning of the filename(s)
PS 2) rc.local applies to every user
If you use a XWindow session there is a file called .xsession in your home from which you can start applications.
If you are in a console window there i salways the old method in .bashrc.
If you are speaking about a Desktop manager (Gnome, Kde) there are frendly interfaces to configure which application to start at login: for Gnome there is Menu->Resorces->Preferences->Session->Startup.
Mark,
Thanks for your reply!
I'm using fluxbox. As you've mentioned for GNOME/KDE, I tried the same thing editing my $HOME/.fluxbox/startup. But went in vain!
But regarding .xsession file, I tried out this file for starting up my fluxbox to start after logging in, placing exec /usr/local/bin/fluxbox. It didn't worked, so I put the above command in .Xclients-default. BTB I'm using RHEL.
Please help me in doing:
> just after a user logs in all wm dockapps should be started. dockapps like wmxmms, wmcpuload, etc.,
> xscreensaver should also be started, so that I can lock the screen later using xscreensaver-command -lock
The login window I'm using is GNOME. And the window manager is fluxbox.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.