On Wed, Feb 15, 2006 at 01:04:49PM -0600, David Berg wrote:
On 2/15/06, Marc Shapiro <mshapiro_42@yahoo.com> wrote:
Is there any way to determine the virtual terminal that an X session is
running on?
$ man -k vt
...
fgconsole (1) - print the number of the active VT.
...
It seems to need super user privileges though. I can see why super
user privileges should be necessary for chvt but not fgconsole. Does
anyone know why or should it be reported as a "bug".
Apparently VT_GETSTATE doesn't work when you're under X (returns EINVAL)...
but there's an alternate solution: Marc, what about the "vtXX" commandline option
to the X server? See man XFree86 or Xorg...