LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Running an application at startup for a specific user (https://www.linuxquestions.org/questions/linux-general-1/running-an-application-at-startup-for-a-specific-user-485532/)

wittyguysuku 09-21-2006 12:39 AM

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.

Thanks,
Sukumar

Mark2 09-21-2006 01:27 AM

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.

Wim Sturkenboom 09-21-2006 01:33 AM

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

wittyguysuku 09-21-2006 01:45 AM

Quote:

Originally Posted by Mark2
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.

Thanks,
Sukumar

wittyguysuku 09-21-2006 03:44 AM

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.


All times are GMT -5. The time now is 07:41 PM.