[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logon/off scripts



Login scripts still fire off correctly if you login to XDM/GDM/KDE or any other session manager.
This includes calling/sourcing other scripts.

But if you want to exec/background X apps at X login, that's entirely different.
You don't launch them from the login shell scripts.

You typically do those in the ~/.X* scripts.
Don't forget to exec/background the apps when they launch or it will  prevent other apps (including the window manager) from launching.

This includes launching console scripts in an Xterm.
Merely launching a script does _not_ automatically launch a Xterm.
UNIX is not like NT.

NT _always_ requires the GDI (sans the ultra limited Recovery Console in NT5+)..
This was a direct Gates BS decision in NT that OS/2 doesn't have (not my words, but NT developers I knew).
So CMD is automatically executed in a GDI/winForms window.
Because _everything_ must be controlled by the GDI (even pre-NT4/NTKernel integration).

UNIX does not require a Xterm to run console apps.
Because the X11 session manager is just another peer console.
So to have scripts launch in a Xterm, you must call an Xterm in one of the .X* scripts,
and have that Xterm launch the script.

This may seems stupid compared to NT.
But trust me, it's far superior and less limiting.



-- 
Bryan J. Smith (currently mobile)
b.j.smith@ieee.org

-----Original Message-----
From:  bob@evilkat.com
Date:  04-12-23 12:35
To:  silug-discuss@silug.org
Subj:  Re: Logon/off scripts

On Thu, Dec 23, 2004 at 01:16:53PM -0700, Richard H. Fifarek wrote:
> On Thu, 23 Dec 2004, Ray Holtz wrote:
> 
> > I'm wondering where I would put a simple bash script so that it runs
> > when I log a user on, then off.
> 
> .bash_login		for login stuff.
> 
> .bash_logout		for logout stuff.


AFAIK this only works if the person is logging into a console.  I have yet
to figure out a way to do the same when a user logs into gnome or kde.  If 
anyone knows how to do the exact same as above with kde (without bringing 
up a window the user has to close) I would be a much happier sysadmin.  

Bob T. Kat

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.