vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I installed Slackware 11. It's good. I have one subtle problem. In previous Slackwares, I could set .screenrc to have "shell -$SHELL" and when I started screen, each new session it opened would be a login session and my environment variables and aliases would be available. With Slackware 11, the shell setting in .screenrc is ignored. Old and new Slackwares are both using the same version of screen, but bash has changed. It looks like the newer version of bash is not working correctly. I can get around the problem by manually typing ". .bash_profile" each new screen session I start, but that's a waste of typing when it should work from the config file. Do others have the same problem? Have I missed an obvious change in the config file? Have I missed something else? Is there an easy solution, other than going back to previous versions of bash? |
| |||
| Mewla Penn wrote: > In previous Slackwares, I could set .screenrc to have "shell -$SHELL" > and when I started screen, each new session it opened would be a login > session and my environment variables and aliases would be available. > > With Slackware 11, the shell setting in .screenrc is ignored. <snip> > Do others have the same problem? I have noticed the same thing. > Is there an easy solution, > other than going back to previous versions of bash? It seems that with or without the "shell" setting, .bashrc is processed when screen starts. One easy solution is thus to add a line to .bashrc, like: source .bash_profile Hope that helps, Jeffrey |
| |||
| On 2006-11-02, Jeffrey Froman <jeffrey@fro.man> wrote: > I have noticed the same thing. I'm glad I wasn't imagining it. > It seems that with or without the "shell" setting, .bashrc is processed when > screen starts. One easy solution is thus to add a line to .bashrc, like: > > source .bash_profile Ah. That conflicts with how I have it arranged. To the best of knowledge, bash works like this: at startup, if it's an interactive login shell, it loads /etc/profile, and then it loads the first one it finds of ~/.bash_profile, ~/.bash_login or ~/.profile. If it's interactive, but not a login screen, it just loads ~/.bashrc. I have plenty of situations where I enter my systems and sometimes it's login (ssh) and sometimes it's not (sftp). As best I can, I set it to be login, like I have done with screen for years, but now find it not working. So in .bashrc I source /etc/profile. And then set my environment variables and PATHs and do things that produce no output. I discovered a long time ago that if .bashrc produces output, it screws up sftp (Received message too long 1215655020). In .bash_profile, I source .bashrc, and then set my prompts and aliases and run a few commands. That way, the environment variables are only one file (.bashrc) but are available to both login shells and non-login shells. How have others arranged their bash startup files? |
| |||
| Mewla Penn wrote: > On 2006-11-02, Jeffrey Froman <jeffrey@fro.man> wrote: >> I have noticed the same thing. > > I'm glad I wasn't imagining it. > >> It seems that with or without the "shell" setting, .bashrc is processed when >> screen starts. One easy solution is thus to add a line to .bashrc, like: >> >> source .bash_profile > > Ah. That conflicts with how I have it arranged. > > To the best of knowledge, bash works like this: > at startup, if it's an interactive login shell, it loads /etc/profile, > and then it loads the first one it finds of ~/.bash_profile, > ~/.bash_login or ~/.profile. > > If it's interactive, but not a login screen, it just loads ~/.bashrc. > > I have plenty of situations where I enter my systems and sometimes it's > login (ssh) and sometimes it's not (sftp). As best I can, I set it to be > login, like I have done with screen for years, but now find it not > working. > > So in .bashrc I source /etc/profile. And then set my environment > variables and PATHs and do things that produce no output. I discovered a > long time ago that if .bashrc produces output, it screws up sftp > (Received message too long 1215655020). > > In .bash_profile, I source .bashrc, and then set my prompts and aliases > and run a few commands. That way, the environment variables are only one > file (.bashrc) but are available to both login shells and non-login > shells. > > How have others arranged their bash startup files? > My .bashrc just emulate the comportment of a login shell, and I do not care anymore about that distinction: # emule le comportement d'un "login shell" [ -f /etc/profile ] && source /etc/profile [ -f $HOME/.bash_profile ] && source $HOME/.bash_profile [ -f $HOME/.bash_login ] && source $HOME/.bash_login [ -f $HOME/.profile ] && source $HOME/.profile Olive |
| |||
| On Thu, 02 Nov 2006 16:22:52 +0000, Mewla Penn wrote: > With Slackware 11, the shell setting in .screenrc is ignored. Change it to "shell -bash". Alternatively, update to the latest version 4.0.3 in 11.0, because that seems to have fixed it. -- .. |
| ||||
| On 2006-11-08, Vigil <me@privacy.net> wrote: >> With Slackware 11, the shell setting in .screenrc is ignored. > > Change it to "shell -bash". Alternatively, update to the latest version > 4.0.3 in 11.0, because that seems to have fixed it. Excellent. Thanks. |