Re: Terminal emulators can't read .profile
Yep, I understand the difference between terminal emulator and shell. Thanks for the clarification anyway. It was just easier to type than "with st*loginShell:true set in .Xdefault, st doesn't seem to be able to launch urxvt as login shell that reads .profile at start-up". On 13/12/2012, at 11:59 PM, Dustin Fechner wrote: > On 12/13/2012 01:14 PM, Feng Zhou wrote: >> However, st doesn't seem to be able to read .profile [...] > > Just to be a bit more precise here: > It's *not* the terminal emulator that reads '.profile'. > The terminal emulator just invokes a shell and the shell parses its > configuration files. > > Regarding '.profile', I'll quote the ksh man page (assuming you are > using ksh as your shell): >> -l Login shell. If the basename the shell is called with (i.e. >> argv[0]) starts with `-' or if this option is used, the shell is >> assumed to be a login shell and the shell reads and executes the >> contents of /etc/profile and $HOME/.profile if they exist and are >> readable. > > So it all comes down to *how* (i.e. with what options) the shell gets > invoked. Don't confuse the terminal emulator with the shell, as these > are two distinct things.
Re: Terminal emulators can't read .profile
I confirm that putting "URxvt.loginShell:true" into ~/.Xdefaults works for urxvt. Sorry I didn't get to reply earlier. I searched the FAQ after you mentioned it and it indeed is documented in section 8.16. But I didn't think of it and didn't know enough to know what keywords to search in the beginning. However, st doesn't seem to be able to read .profile with "st.loginShell:true". If anyone knows why, it'd be great if you let me know. I know nothing about xorg. Nonetheless, I'm happy to have gotten urxvt working. Thank you very much all for your help. Feng On 13/12/2012, at 8:52 PM, Jamie Paul Griffin wrote: > * MERIGHI Marcus [2012-12-10 12:48:26 +0100]: > >> f...@zhou.es (Feng Zhou), 2012.12.10 (Mon) 12:02 (CET): >>> I was trying out st and urxvt as a replacement for xterm, and it >>> turned out that all the settings I put in ~/.profile are not >>> recognised when I use either st or urxvt. >>> >>> Is this a bug or an expected behaviour that I need to do something >>> about to use other terminals? The shell was not changed, it was the >>> default ksh. At first I thought it was a problem of st, but it >>> happened to urxvt too. So I thought it's best to ask here. Any help is >>> much appreciated. >> >> I am guessing here, but from the times I used rxvt there's still: >> >> Rxvt*loginShell: TRUE >> >> in my .Xdefaults. >> >> Bye, Marcus > > I use urxvt with cwm. You need to to use the ~/.Xdefaults file as others have > suggested: > > URxvt.loginShell:true > ... > > This will solve your problem. BTW, it's documented on the FAQ I believe. > > Jamie
Terminal emulators can't read .profile
Hi, I was trying out st and urxvt as a replacement for xterm, and it turned out that all the settings I put in ~/.profile are not recognised when I use either st or urxvt. Is this a bug or an expected behaviour that I need to do something about to use other terminals? The shell was not changed, it was the default ksh. At first I thought it was a problem of st, but it happened to urxvt too. So I thought it's best to ask here. Any help is much appreciated. Cheers Feng