Re: HOME as ~ in default PATH inherited from /etc/login.conf doesn't work for tcsh
Date: Tue, 17 Oct 2023 13:43:03 UTC
<div dir='auto'><div><div class="gmail_extra"><div class="gmail_quote"><br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On Mon, Oct 16, 2023 at 01:55:46PM +0000, Jackie J wrote: <br> <br> >However, I found that ~/bin in my PATH won't work in tcsh as it got <br> >"command not found" error, I have to use something like $HOME/bin or <br> >hard-code like /home/myusername/bin. Apparently ~ was not interpreted. <br> >I checked and it seemed that I got this setting from /etc/login.conf <br> >(part shown here): <br> > <br> >default:\ <br> > :passwd_format=sha512:\ <br> > :copyright=/etc/COPYRIGHT:\ <br> > :welcome=/var/run/motd:\ <br> > :setenv=BLOCKSIZE=K:\ <br> > :mail=/var/mail/$:\ <br> > :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin <br> >/usr/local/bin ~/bin:\ <br> <br> I use ~/bin that way, and it's interpreted -- it shows up as <br> /home/myusername/bin in the environment variable PATH. <br> </p></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">What shell are you using as default? Can you confirm that you didn't set PATH in any other dot files or in /etc files?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br> /etc/login.conf (and ~/.login.conf) have to be converted into databases <br> by cap_mkdb(1). That's documented in the man page login.conf(5) -- <br> documented eventually, down a page or so. Is that database present, in <br> /etc/login.conf.db? <br> <br> </p> </blockquote></div>I am not sure it's needed since I didn't make any modification to /etc/login.conf or ~/.login_conf (notice the file not in ~ is not .login.conf as per man 5 login.conf). Anyway I issued cap_mkdb command, logout and in, nothing changes. ~ is still not expanded to HOME as expected.</div></div></div>