Date: Thu, 11 May 2006 17:30:39 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Nik Clayton <nik@ngo.org.uk> Cc: stable@freebsd.org Subject: Re: Switching virtual consoles from within X Message-ID: <20060511223038.GF76653@dan.emsphone.com> In-Reply-To: <44630A5B.2030906@ngo.org.uk> References: <44630A5B.2030906@ngo.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 11), Nik Clayton said: > 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? Redirect stdin from a vty: vidcontrol -s 1 < /dev/ttyv0 If you're not root you'll either need to specify a vty you are logged in on, or wrap it in a sudo call. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060511223038.GF76653>