Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 2014 06:43:17 +0200
From:      Polytropon <freebsd@edvax.de>
To:        "William A. Mahaffey III" <wam@hiwaay.net>
Cc:        FreeBSD Questions !!!! <freebsd-questions@freebsd.org>
Subject:   Re: tcsh login question ....
Message-ID:  <20140810064317.6e1dff78.freebsd@edvax.de>
In-Reply-To: <53E66800.8000005@hiwaay.net>
References:  <53E66800.8000005@hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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
shell.

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

	#!/bin/csh
	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:

	#!/bin/sh
	[ -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.



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140810064317.6e1dff78.freebsd>