Re: HOME as ~ in default PATH inherited from /etc/login.conf doesn't work for tcsh
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 19 Oct 2023 08:52:45 UTC
<div dir='auto'>Thanks for sharing. Coping & pasting your configs into my dot files tonight.</div><div class="gmail_extra"><br><div class="gmail_quote">2023年10月19日 14:18,Polytropon <freebsd@edvax.de>写道:<br type="attribution" /><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On Wed, 18 Oct 2023 19:32:13 +0800, Jackie wrote: <br> > Ok so this is very interesting. I did two different tests. <br> > <br> > First I pkg install slim and XDM as my login managers / display managers. <br> > I did not have a ~/.xinitrc file so slim just say failed to execute login <br> > command. <br> <br> In case the C shell is your login shell, and you use a <br> display manager (or "text mode" login first, then "startx"), <br> the following approach might be helpful: <br> <br> First, ~/.xsession: <br> <br> 	#!/bin/csh <br> 	source ~/.cshrc <br> 	exec ~/.xinitrc <br> <br> This will obviously source your user-local settings for <br> the C shell, as well as those that might already be global <br> in /etc/csh.cshrc, in where I have this: <br> <br> 	set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /opt/bin $HOME/bin) <br> <br> However, using ~/bin istead of $HOME/bin should also work. <br> <br> Then, in ~/.xinitrc, put your actual X initialization <br> commands, like this: <br> <br> 	#!/bin/sh <br> 	[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc <br> 	numlockx <br> 	xsetroot -solid rgb:3b/4c/7a <br> 	xset b 100 1000 15 & <br> 	xset r rate 250 30 & <br> 	xset s off & <br> 	xset -dpms & <br> 	exec wmaker <br> <br> The last line, starting with "exec", easily determines <br> which window manager or desktop environment you want. <br> If you need localized keyboard settings, use a X config <br> file in /usr/local/etc/X11/xorg.conf.d/ for this, so it <br> will be in effect no matter which window manager or desktop <br> environment you are using (except of course it knows better <br> than you and overrides your global setting because stupid). <br> <br> Advantage: The X session will pick up your C shell settings, <br> no matter how it will be started, and you don't need to <br> have to maintain two "synchronized" X startup files. <br> <br> I'm using this for decades (with xdm). The #! lines aren't <br> actually neccessary, but they tell you what "language" the <br> files are written in. ;-) <br> <br> Disadvantage: This is C shell specific and does _not_ <br> work for other shells you might use interactively or <br> as login shell (such as sh, bash, zsh, ksh). <br> <br> <br> <br> -- <br> Polytropon <br> Magdeburg, Germany <br> Happy FreeBSD user since 4.0 <br> Andra moi ennepe, Mousa, ... <br> <br> </p> </blockquote></div><br></div>