-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SuSE 9.0 KDE Is there a way to execute a command when a user logs in? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAvI8IjeziQOokQnARAsNHAKCuWCW73s1C0CU4eggyBfn03y9esgCffF3J pr2JhYYrPyzBajypOLtXysI= =XMJM -----END PGP SIGNATURE-----
On Tuesday 01 June 2004 15:13, Michael Satterwhite wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes - several ways, I think, and depending on things like their login shell. One way that works in pdksh, for example, is to put exec [your command] in .profile. In SuSE, they're probably using bash, and you have to figure out what dotfile to use for your particular case, and I can't remember. I recently saw a good summary - the Unofficial FAQ? Sorry this is vague, but at least it's prompt ... Cheers Fergus
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAvI8IjeziQOokQnARAsNHAKCuWCW73s1C0CU4eggyBfn03y9esgCffF3J pr2JhYYrPyzBajypOLtXysI= =XMJM -----END PGP SIGNATURE-----
-- Fergus Wilde Chetham's Library Long Millgate Manchester M3 1SB Tel: +44 161 834 7961 Fax: +44 161 839 5797 http://www.chethams.org.uk
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 01 June 2004 09:25, Fergus Wilde wrote:
On Tuesday 01 June 2004 15:13, Michael Satterwhite wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes - several ways, I think, and depending on things like their login shell. One way that works in pdksh, for example, is to put
exec [your command] in .profile. In SuSE, they're probably using bash, and you have to figure out what dotfile to use for your particular case, and I can't remember. I recently saw a good summary - the Unofficial FAQ?
Thanks, but that one wouldn't work. The file is .bashrc, but that also runs when I open a console session. I do appreciate the help, though. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAvJMejeziQOokQnARAsAzAJ9lydyjcm8sChtI6YOKa9qFWVP3lQCghF46 stmUdVdcg19v+VfEQrAlnY0= =/nDu -----END PGP SIGNATURE-----
* Fergus Wilde; <fwilde@chethams.org.uk> on 01 Jun, 2004 wrote:
On Tuesday 01 June 2004 15:13, Michael Satterwhite wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes - several ways, I think, and depending on things like their login shell. One way that works in pdksh, for example, is to put
exec [your command] in .profile. In SuSE, they're probably using bash, and you have to figure out what dotfile to use for your particular case, and I can't remember. I recently saw a good summary - the Unofficial FAQ?
http://susefaq.sourceforge.net/howto/bash.html and look for ~/.bash_login also maybe ~/.bash_logout ~/.bash_login doesn't exist by default. You can create it and put custom commands here that you only want to happen once when you first login. If this file exists, then the ~/.profile will not run. Normally, this is not a problem since ~/.profile does not do much and the ~/.bashrc gets sourced from /etc/profile. -- Togan Muftuoglu | Unofficial SuSE FAQ Maintainer | Please reply to the list; http://susefaq.sf.net | Please don't put me in TO/CC. Nisi defectum, haud refiecendum
In a previous message, Michael Satterwhite <michael@weblore.com> wrote:
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes. What do you actually want to do? If there's a GUI app you want started, you can either run it manually and save the session (if the app supports sessions) or put a shortcut into a ~/Desktop/Autostart directory. If it's a command-line thing then you can either put it into ~/Desktop/Autostart or add it to your ~/.profile or similar. HTH John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Knossos: escape the ever-changing labyrinth before the Minotaur catches you!
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 01 June 2004 09:27, John Pettigrew wrote:
In a previous message, Michael Satterwhite <michael@weblore.com> wrote:
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes.
What do you actually want to do? If there's a GUI app you want started, you can either run it manually and save the session (if the app supports sessions) or put a shortcut into a ~/Desktop/Autostart directory. If it's a command-line thing then you can either put it into ~/Desktop/Autostart or add it to your ~/.profile or similar.
That's what I was looking for; thanks. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAvJNEjeziQOokQnARAuLxAJ9eSaevYYEbuoeZZg1CzCsB7LdBDQCgiyjZ B1HSFbUeyfvJCExYzc42Aws= =woRz -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 01 June 2004 09:27, John Pettigrew wrote:
In a previous message, Michael Satterwhite <michael@weblore.com> wrote:
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Yes.
What do you actually want to do? If there's a GUI app you want started, you can either run it manually and save the session (if the app supports sessions) or put a shortcut into a ~/Desktop/Autostart directory. If it's a command-line thing then you can either put it into ~/Desktop/Autostart or add it to your ~/.profile or similar.
Thanks. That was exactly what I was looking for. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAvJYojeziQOokQnARAjuuAJ40i66bG7lZqUIEy1SemRErTKu/mwCeJWqW D5aLAc13qPh/2CYSCF8dwmI= =4pP8 -----END PGP SIGNATURE-----
On Tue, 2004-06-01 at 10:13, Michael Satterwhite wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
I have found that creating a link to application in the ~/.kde/Autostart does is for me. However this is because I am using KDE as my primary GUI. I believe that you can edit your .bashrc file and have it work that way as well. BTW I'm sure there's no need to tell you that you ought to keep a working (backup) copy of this file, sans any changes. Mike
El Martes, 1 de Junio de 2004 16:13, Michael Satterwhite escribió:
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Hello Michael: I have cut out this extract from $HOME/.bashrc: # There are 3 different types of shells in bash: the login shell, normal shell # and interactive shell. Login shells read ~/.profile and interactive shells # read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all # settings made here will also take effect in a login shell. # # NOTE: It is recommended to make language settings in ~/.profile rather than # here, since multilingual X sessions would not work properly if LANG is over- # ridden in every subshell. Hope this will help. Greetings.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 02 June 2004 09:51, MANU wrote:
El Martes, 1 de Junio de 2004 16:13, Michael Satterwhite escribió:
SuSE 9.0 KDE
Is there a way to execute a command when a user logs in?
Hello Michael: I have cut out this extract from $HOME/.bashrc:
Thanks for the suggestion. I did know about .bashrc and gave some thought to it, but it wouldn't have done the job as it executes everytime you start a command shell; I just wanted the command to run when the user logged in, not on each invocation of a console. John gave me what I needed with the Autostart directory. Thanks again. It's great the way people here help out. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAvJwVjeziQOokQnARAkxoAJ45/Li4udrVuKKpYlQ+NJKQdcA5nQCfQLmG 0lceA/QEiV2QoZVjZllI3Xc= =2nTL -----END PGP SIGNATURE-----
In a previous message, Michael Satterwhite <michael@weblore.com> wrote:
I did know about .bashrc and gave some thought to it, but it wouldn't have done the job as it executes everytime you start a command shell
As has been mentioned, one-liners are probably better off in ~/.profile, which is executed when you log in. ~/Desktop/Autostart is really for GUI apps. But as long as it works, that's the main thing :-) John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Knossos: escape the ever-changing labyrinth before the Minotaur catches you!
participants (6)
-
Fergus Wilde
-
John Pettigrew
-
MANU
-
Michael Satterwhite
-
Mike McMullin
-
Togan Muftuoglu