With a little side of applesauce...

Monday, November 17, 2008

GNU Screen - execute .bashrc when starting screen

I created an alias to start up screen with my username, the TERM, and manually set the SHELL, so that it will read the .bashrc on screen start:

alias s='screen -S myuser -T linux -s /bin/bash'

The important switch here, is '-s', since screen doesn't read your .bash* files without it. I set the TERM variable to 'linux', so that arrow keys will work correctly in VIM, (on Cygwin).

4 comments:

cnceo said...

great, exactly what I was looking for. Thx!

Shannon Eric Peevey said...

You're welcome!

kristian said...

Perfect! Thanks. :)

Anonymous said...

very useful ... this is what I need!