Nethence Documentation Lab Webmail Your IP BBDock  

Those documents are obsolete, please use the Nethence Documentation instead.


GNU screen configuration
Either install it through your distribution's package system, or from source if the package isn't available (like for FreeBSD),
tar xzf screen-*.tar.gz
cd screen-*/
./configure --prefix=/usr/local
make install
Note. forcing --prefix otherwise it goes to /usr
On BSD systems, add the screen termcap entry,
cd screen-*/
cat terminfo/screencap >> /etc/termcap
Eventually make that handy symlink (or use configure to force the configdir),
cd /etc/
ln -s ../usr/local/etc/screenrc
GNU screen Configuration
cd /etc/
ls -l screenrc*
mv -i screenrc screenrc.dist
cd ~/
mv -i .screenrc .screenrc.dist
Configure screen,
cd /etc/
mv screenrc screenrc.dist
vi screenrc
startup_message off
caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw< %{=b BW} %H %{-} %l %c %d/%m/%Y"
bindkey ^[, prev
bindkey ^[; next
shelltitle ""
autodetach on
defscrollback 65000
#screen -t "log" 0 tail -F /var/log/messages
#screen -t "errors" 1 sh -c "tail -F /var/log/httpd/*error*.log"
Note. to find out the right keys do bind, just do "cat" in your terminal and type the keys, then "^C".
Note. a similar caption example can be found into screen's manual,
man screen > search for "FLOW-CONTROL" Section. A few lines above you will find the "caption always" examples. Copy/paste the before-last one to /etc/screenrc (with e.g. gpm or putty).
Then root or some admin user,
cd ~/
vi .screenrc
screen -t "log" 0 tail -F /var/log/messages
#screen -t "errors" 1 sh -c "tail -F /var/log/httpd/*error*.log"
If screen windows don't load .profile nor .kshrc, add
shell -/bin/ksh
Note. the '-' prefix is for login shell, like '-l'
Attach the first detached session it finds,
screen -R
remotely detach and attach locally,
screen -rd
For UTF-8 terminals,
screen -U
To create a new window,
^A c
To switch back to the last used window,
^A a  revenir à la dernière fenetre
To switch to another window,
^A <window number>
Note you can use keybindings see the bindkey stuff above.
To move a window,
^A :number 2
To reload screenrc,
^A :source /etc/screenrc
To split the screen,
^A S
To switch to the other part,
To delete all regions but the current one,
^A Q
screen inside screen ?
:escape ^Tt
Alternatively, use splitvt (,
cd ~/
vi .splitvtrc
#set command_char ^O
#set quote_char ^V
#set switch_char ^W
#set upper_lines 12
run -upper /usr/bin/tail -F /var/log/thttpd.log
run -lower /usr/bin/tail -F /var/log/messages
#set login on
# This next line would override the 'run' statements above
#run /bin/ksh
Additional notes
Irssi configuration
Cygwin GUN screen

Last update: Apr 22, 2016