#!/bin/dash
# Filename:      grml-init-screen
# Purpose:       fix tty permissions and run screen and zsh afterwards
# 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 rungetty:
  TTY=`tty`
  sudo chmod 660       $TTY
  sudo chown $USER.tty $TTY

# now start screen:
  cd $HOME
  # do we have a utf8 enabled terminal?
  /usr/bin/screen -U -c /etc/grml/screenrc ; exec /bin/zsh

## END OF FILE #################################################################
