ScientistGirl ScientistGirl - 1 month ago 26
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?

Reference

https://ftp.gnu.org/gnu/screen/

Answer

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

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