Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using screen, and I have several aliases in my ~/.bash_profile, for example python=python-2.6. But for some reasons these aliases don't work when I work in screen. How can I make them work?

share|improve this question
    
I want to open multiple new windows in screen and execute my alias in each of those, ie, "screen -t window1 my_alias". Any idea how to do that? – cat pants May 5 '13 at 17:46
up vote 4 down vote accepted

.bash_profile gets run when in a login shell. You'll probably want to put your aliases in the .bashrc file. Or you could just execute your .bash_profile each time that you start up a shell in screen

share|improve this answer

Use the -l option to bash in your .screenrc to start your screen session's bash shells as login shells:

screen bash -l
share|improve this answer

Add this line to your ~/.screenrc file:

shell -/bin/bash

The initial dash executes the shell with login option

share|improve this answer

If you run exec bash after you start up screen, they will work

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .