GNU screen ~~~~~~~~~~ Screen as same user: startup: cat << EOF > ~/bin/kscreen.example #!/bin/sh screen -c ~/.screenrc.kvm -R -D kvm EOF config: cat << EOF ~/.screenrc.kvm.example # GNU Screen - main configuration file # All other .screenrc files will source this file to inherit settings. # Author: Christian Wills - cwills.sys@gmail.com # Allow bold colors - necessary for some reason attrcolor b ".I" # Tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # Enables use of shift-PgUp and shift-PgDn termcapinfo xterm|xterms|xs|rxvt ti@:te@ # Erase background with current bg color defbce "on" # Enable 256 color term term xterm-256color # Cache 30000 lines for scroll back defscrollback 30000 # New mail notification #backtick 101 30 15 $HOME/bin/mailstatus.sh hardstatus alwayslastline # Very nice tabbed colored hardstatus line hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %S%{KW}|%{KY}%101`%{KW}|%Y-%m-%d%{= Kc} %c%{-}' # change command character from ctrl-a to ctrl-b (emacs users may want this) #escape ^Bb screen -t hiru 0 # Hide hardstatus: ctrl-a f bind f eval "hardstatus ignore" # Show hardstatus: ctrl-a F bind F eval "hardstatus alwayslastline" EOF Screen with su ~~~~~~~~~~~~~~ startup: cat << EOF > bscreen.example #!/bin/sh su bitcoin -l -c "script -q -c 'screen -R -D bitcoin' /dev/null" EOF config: cat <<< EOF > .screenrc.example # GNU Screen - main configuration file # All other .screenrc files will source this file to inherit settings. # Author: Christian Wills - cwills.sys@gmail.com # Allow bold colors - necessary for some reason attrcolor b ".I" # Tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # Enables use of shift-PgUp and shift-PgDn termcapinfo xterm|xterms|xs|rxvt ti@:te@ # Erase background with current bg color defbce "on" # Enable 256 color term term xterm-256color # Cache 30000 lines for scroll back defscrollback 30000 # New mail notification #backtick 101 30 15 $HOME/bin/mailstatus.sh hardstatus alwayslastline # Very nice tabbed colored hardstatus line hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %S%{KW}|%{KY}%101`%{KW}|%Y-%m-%d%{= Kc} %c%{-}' screen -t getc 1 start_getc screen -t geth 2 start_geth screen -t bitcoind 3 start_bitcoind screen -t electrum 4 start_electrum_server screen 0 # change command character from ctrl-a to ctrl-b (emacs users may want this) #escape ^Bb # Hide hardstatus: ctrl-a f bind f eval "hardstatus ignore" # Show hardstatus: ctrl-a F bind F eval "hardstatus alwayslastline" EOF