ScientistGirl ScientistGirl -4 years ago 212
Linux Question

How to immediately execute a command after creating a Screen?

Problem :
After i create a screen :

SCREENDIR=/home/scigirl/.screendir screen -S screenName

I want to execute the command below automatically :

source private/ProjetoMestrado/virtualenv-15.0.3/myVE/bin/activate

Is this possible? If so , how?
Editing bashrc wont affect the screen on creation event, so.. Any way to do it?


Answer Source

you can use /etc/screenrc and ~/.screenrc (for user settings)

You could be also interested with: GNU Screen running a bash init script

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download