This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:doku:screenrc [2011/03/19 15:29] ello angelegt |
public:doku:screenrc [2014/11/13 16:10] ello |
||
---|---|---|---|
Line 2: | Line 2: | ||
<file|~/.screenrc> | <file|~/.screenrc> | ||
- | startup_message off | + | startup_message off |
- | hardstatus alwayslastline "%{=r .}%-Lw%{= .}%L> %n%h %t %{-}%+Lw%-8=%{= .} %c " | + | hardstatus alwayslastline "%{=r .}%-Lw%{= .}%L> %n%h %t %{-}%+Lw%-8=%{= .} %c " |
autodetach on | autodetach on | ||
</file> | </file> | ||
+ | |||
+ | Dank an [[http://das-mehdorn.de|Mehdorn]]. | ||
+ | |||
+ | |||
+ | ====== Autoscreen ====== | ||
+ | mit diesem Abschnitt in der .bashrc wird der screen automatisch gestartet wenn man sich per ssh einloggt | ||
+ | |||
+ | <file|~/.bashrc> | ||
+ | # Auto-screen invocation. see: http://taint.org/wk/RemoteLoginAutoScreen | ||
+ | # if we're coming from a remote SSH connection, in an interactive session | ||
+ | # then automatically put us into a screen(1) session. Only try once | ||
+ | # -- if $STARTED_SCREEN is set, don't try it again, to avoid looping | ||
+ | # if screen fails for some reason. | ||
+ | if [ "$PS1" != "" -a "${STARTED_SCREEN:-x}" = x -a "${SSH_TTY:-x}" != x ] | ||
+ | then | ||
+ | STARTED_SCREEN=1 ; export STARTED_SCREEN | ||
+ | [ -d $HOME/lib/screen-logs ] || mkdir -p $HOME/lib/screen-logs | ||
+ | sleep 1 | ||
+ | screen -RR && exit 0 | ||
+ | # normally, execution of this rc script ends here... | ||
+ | echo "Screen failed! continuing with normal bash startup" | ||
+ | fi | ||
+ | # [end of auto-screen snippet] | ||
+ | </file> | ||
+ |