Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: xsession : How to include .login
       [not found] <max@cis.uni-muenchen.de>
@ 1996-10-10 13:36 ` Barry James
  0 siblings, 0 replies; 3+ messages in thread
From: Barry James @ 1996-10-10 13:36 UTC (permalink / raw)


On Oct 10,  4:25pm, Max Hadersbeck wrote:
> Subject: xsession : How to include .login
> Hi
> How can I say the .xsession file to execute the .login file.
> During normal login the .login file is not executed.
> I tried in the .xsession #!/bin/bash -login
> but then the xdm restarts immediately.
> Thanks MAX
>-- End of excerpt from Max Hadersbeck

XSession File:
#!/bin/tcsh

set login=$HOME/.login
if ( -f $login ) then
   if ( -x $login ) then
	exec $login
   else
	exec /bin/<your shell> $login
endif

good luck!

Regards,
Barry

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xsession : How to include .login
@ 1996-10-10 17:44 Przemek Klosowski
  0 siblings, 0 replies; 3+ messages in thread
From: Przemek Klosowski @ 1996-10-10 17:44 UTC (permalink / raw)


This is a little off-topic for axp-list, but I will post it anyway,
in the that someone might benefit from the explanation and/or 
will correct my misconceptions. 

The role of the .login file is to set up your environment; it should
be shell-independent, and doesn't have to be idempotent (you are
supposed to use it only once in a session). The setup might involve
setting environment variables such as PATH, MANPATH, etc; choosing
terminal characteristics ('stty', TERM) based on where you are logging
in from, setting up mail notification ('biff') etc.

.xsession is run on login by xdm, and is treated as a main login
porcess, i.e. xdm treats the session as alive as long as the .xsession
is running. Typically, it will set up some environment variables,
start up some X window clients and exec a main login process (most
often the window manager, but some people prefer an Xterm). The exit
of the exec'ed process results in logging out and restarting the login
process. When your .xsession says '#!/bin/bash', bash simply runs but
is not given any commands to execute, exits and you get logged out.

You could simply put the stuff from your .login file into .xsession; or, if
you want to maintain a common .login for X and non-X logins, you could 
keep your setup in .login and 'source $HOME/.login' in this file.

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xsession : How to include .login
@ 1996-10-10 20:49 Eric Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Smith @ 1996-10-10 20:49 UTC (permalink / raw)


Przemek Klosowski <przemek@rrdjazz.nist.gov> wrote:
> The role of the .login file is to set up your environment; it should
> be shell-independent,

No, .login is used by csh (and derivatives like tcsh).  It is difficult
to write any non-trivial script which is completely shell-independent.

Cheers,
Eric

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-10-10 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-10 17:44 xsession : How to include .login Przemek Klosowski
  -- strict thread matches above, loose matches on Subject: below --
1996-10-10 20:49 Eric Smith
     [not found] <max@cis.uni-muenchen.de>
1996-10-10 13:36 ` Barry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox