tcsh login question ....

Polytropon freebsd at
Sun Aug 10 04:43:26 UTC 2014

On Sat, 09 Aug 2014 13:27:12 -0500, William A. Mahaffey III wrote:
> .... when I shell into my newly minted FreeBSD 9.3 desktop, or login w/ 
> a console login, everything under tcsh gets initialized AOK. I then 
> activated xdm to manage logins (I like it that way), the /ect/csh.login 
> file clearly does  *not* get sourced. I have many aliases, prompt 
> setting, & other goodies which are absent. The tcsh manpage clearly says 
> it will be sourced at login, what gives ?

I'm using a "cascaded approach" on my system - also using
XDM (I prefer it over gdm or kdm), and the C shell as dialog

Create the file ~/.xsession with the following content:

	source ~/.cshrc
	exec ~/.xinitrc

Then create ~/.xinitrc to start your desired window manager
or desktop environment (as you know from using the "startx"
command), for example like this:

	[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc
	# ... more initialization if needed, 'n stuff ...
	exec startxfce4

This also enables you to use "startx" if you should want to
dump XDM (even if it's for testing). There is no need anymore
to have two initialisation files: .xinitrc is used by startx,
but .xsession is required by xdm.

This approach makes sure both /etc/csh.cshrc and ~/.cshrc are
being read when the shell is started. It's a comfortable way
to "inherit" those settings into X.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list