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
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
vt=${tty: 3:1}
case $1 in
resume | thaw)
tty=`ps axo tty,cmd | grep "/usr/bin/X :0"`
chvt 1
chvt $vt
;;
esac