#!/bin/sh # Depend on the ldm package #. /usr/lib/ltsp/ltsp_config # XXX PATH=$PATH:/usr/bin/X11:/usr/X11R6/bin tty=$(tty) case "$tty" in /dev/tty*) # with udev (2.6 kernel) ttynum=${tty#/dev/tty} ;; /dev/vc/*) # with devfs (2.4 kernel) ttynum=${tty#/dev/vc/} ;; esac displaynum=$(($ttynum - 1)) exec ldm vt$ttynum :$displaynum