* Michael Schutte <mi...@uiae.at>, 2009-04-05 10:41:
This is true. It doesn’t only affect fgconsole, but also chvt, openvt
and any other kbd utility which tries to get a console file descriptor.
These programs do their job by trying to open/ioctl these files (in
this order):
/proc/self/fd/0 (is a pseudo tty in your case)
/dev/tty (also PTY)
/dev/tty0 (only accessible to root)
/dev/vc/0 (doesn’t exist nowadays)
/dev/console (root)
std{in,out,err} (PTY)
As none of these is able to respond to a VT_GETSTATE ioctl, fgconsole
and friends fail. I’m afraid this situation won’t change.
These days there's world-readable /sys/class/tty/tty0/active, so
fgconsole could be patched to use that.
--
Jakub Wilk