Switching virtual consoles from within X

Nik Clayton nik at ngo.org.uk
Thu May 11 13:15:38 PDT 2006

Is it possible to (from the command line) switch virtual consoles while 
within X?

Since I upgraded X on my laptop resume from suspend has been a little flaky. 
  But if I make sure I run 'zzz' from within a text virtual terminal the 
laptop has (so far) always resumed correctly.

I could create ~/bin/zzz which checks to see if I'm in X and refuses to run, 
but it would be even nicer if I could have it automatically switch to a 
virtual console for me, and then run /usr/sbin/zzz.

I'm aware of 'vidcontrol -s <n>', and if I run that from a virtual terminal 
it works.  However, if I run it within X it refuses to work, printing:

     vidcontrol: must be on a virtual console: Inappropriate ioctl for device

Is there a way around this restriction?


More information about the freebsd-stable mailing list