Xdm var/log/xdm.log

Per Hedeland per at hedeland.org
Sat May 2 07:09:42 UTC 2020

On 2020-05-01 15:17, Polytropon wrote:
> On Fri, 1 May 2020 07:56:27 -0400, Robert Huff wrote:
>> Polytropon writes:
>>>  > >  > Ok, I will add xsession.
>>>  > >
>>>  > >  NB: .xsession (the dot is significant).
>>>  > >
>>>  > >  Or you can do the following, as you said you already have
>>>  > >  a .xinitrc (which xdm will ignore, as mentioned):
>>>  > >
>>>  > >  	% cp .xinitrc .xsession
>>>  >
>>>  > 	From my home directory:
>>>  >
>>>  > lrwxrwxr-x   1 huff  huff         8 May  1 01:19 .xsession -> .xinitrc
>>>  >
>>>  > 	This implies you want the same environment from both.
>>>  Will usually work, but doesn't keep C shell initialization
>>>  (environmental variables, aliases, settings), which might
>>>  not be a problem if you're not using the C shell for dialog
>>>  sessions or if you concentrate on GUI entirely. :-)
>> 	Once	I start X, I do pretty much everything within it.  For the
>> rest I console-switch.
>> 	(And the first line of the file is "#! /bin/sh".  :-) )
>> 	What is there that one might wish to do that can't be handled out
>> of an xterm?
> If I remember correctly, if you use xdm, and start an X terminal
> inside the X session, your settings from .cshrc will not be in
> effect due to the fact that the invoked shell is not a login shell.

I believe you are confusing .cshrc with .login - .cshrc is read by
*every* instance of [t]csh unless the -f option is used, while .login
is indeed only read by login shells (and thus pretty much useless).

> So aliases don't work, environmental variables aren't set, and
> so on. That's why the strange "source and continue" approach
> in xdm's "user login" file.

Possibly the same confusion is the reason, it doesn't serve any
practical purpose. Also, the only thing that [t]csh inherits across an
exec is the environment variables - aliases and shell variable
settings are not inherited.

FWIW, while I use tcsh as my interactive shell, both my .xsession and
.xinitrc have #!/bin/sh (as all scripts should:-), and there is no
mention of .cshrc (nor .tcshrc) in either. I did find one thing I
wanted to do in my (normal) xdm login but not every time I do a startx
for testing, and thus my .xsession is:

exec ssh-agent $HOME/.xinitrc


More information about the freebsd-questions mailing list