+++ /dev/null
-#!/bin/dash
-# Filename: grml-screen
-# Purpose: wrapper for screen to start with appropriate configuration
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-################################################################################
-
-# export variable USER for use withing GNU screen:
- export USER=`id -un`
-
-# fix tty permissions
- TTY=`tty`
- sudo chmod 660 $TTY
- sudo chown $USER.tty $TTY
-
-# try to mitigate raceconditions from screen
-SCREENDIR_="/var/run/screen"
-if [ `id -u` = 0 ] ; then
- mkdir -m 755 $SCREENDIR_ >/dev/null 2>& 1 && chgrp utmp $SCREENDIR_
-fi
-mkdir -m 700 "${SCREENDIR_}/S-$USER" >/dev/null 2>&1
-
-# now run screen with config
- cd $HOME # important for e.g. hardcopy-feature
-
- if [ `id -u` = 0 ] ; then
- exec screen -U -c /etc/grml/screenrc
- elif [ -r "$HOME/.screenrc" ] ; then
- exec screen -U -c "$HOME/.screenrc"
- else
- exec screen -U -c /etc/grml/screenrc_grml
- fi
-
-## END OF FILE #################################################################