Comment 24 for bug 552246

Revision history for this message
Mervin Beng (mervinb) wrote :

Thanks Alejandro! Your script works, but I find that the X server sometimes run on vt8 (seems to alternate randomly between and 7 and 8). This additional hack works:

#!/bin/bash
case $1 in
    resume | thaw)
        tty=`ps axo tty,cmd | grep "/usr/bin/X :0"`
        vt=${tty:3:1}
        chvt 1
        chvt $vt
        ;;
esac