On 12 Feb 2002, Oleg Goldshmidt wrote:
>
> I need to execute some commands each time a user logs in or out of the
> system, on a per-user basis. How can I do it regardless of which login
> method is used:
>
> a) a KDE/GNOME/whatever session from the usual graphical login
> as comes with RH;
> b) a console login;
> c) an ssh login from a remote computer;
> d) can't think of anything else at the moment...
>
> While (b) and (c) can be handled from sth like ~/.bashrc or
> ~/.bash_logout or whatever comes with the shell-of-the-day, (a) does
> not invoke any shell. On the other hand, X is already running by the
> time a user logs in via (a), I guess, so .xinitrc is not useful here.
No, but it goes through some of the X init scripts.
On my Mandrake everything goes through /etc/X11/Xsession (but it can be
overriden, you really have to look at the scripts mess there).
I believe that with all the distros the X server normally runs (using '.':
in the same shell) all the scripts under /etc/X11/xsession.d . You can add
there a script to run:
if test -x ${HOME}/some_file_name; then
. ${HOME}/some_file_name
fi
--
Tzafrir Cohen /"\
mailto:[EMAIL PROTECTED] \ / ASCII Ribbon Campaign
Taub 229, 972-4-829-3942, X Against HTML Mail
http://www.technion.ac.il/~tzafrir / \
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]