You are not logged in.

#1 2008-04-21 10:38:26

Flavious
Member
Registered: 2007-11-24
Posts: 49

GNU screen, spawn windows and issue specific command to each

Hello folks.
I want gnu screen to spawn some windows, let's say, so I've put these lines in .screenrc:
screen -t foo
screen -t bar
now I'd like to change the directories for foo and bar. I've tried multiple commands like:
screen -X at foo screen -X stuff 'cd /tmp^M'
screen -X at bar screen -X stuff 'cd ~/projects^M'

and some other variations. At best, it gives the error message: "key: screen: invalid option -X .", at worst it doesn't start at all.

Regards.

Offline

#2 2008-04-21 11:15:06

Flavious
Member
Registered: 2007-11-24
Posts: 49

Re: GNU screen, spawn windows and issue specific command to each

problem solved. for others in need, put in .screenrc:

screen -t foo
at foo stuff 'cd /tmp^M'

where "^M" is generated by pressing sequentially ctrl+v,ctrl+m

Offline

Board footer

Powered by FluxBB