Solved root property XFree86_VT off by one ?

Everything works fine, but there is this vexing difference:
Code:
$ xprop -root
...
XFree86_has_VT(INTEGER) = 1
XFree86_VT(INTEGER) = 3
...
# procstat -af | grep ttyv
...
  868 getty  2 v c rw------  4  40 -  /dev/ttyv0 
...
  869 getty  2 v c rw------  4  40 -  /dev/ttyv1 
  872 Xorg  5 v c rw---n--  1  36495 -  /dev/ttyv2
Two gettys and one script (eventually becoming Xorg+xsession) are launched via /etc/ttys. How come Xorg advertises a different vt number ? It did open the right one, v2.

Juha
 
I'm not a programmer and I'm just shooting in the dark but it's probably related to how each starts counting. One may start from 1 and the other from 0. So ttyv2 is the third TTY.
 
hw/xfree86/os-support/bsd/bsd_init.c
Code:
snprintf(vtname, sizeof(vtname), "/dev/ttyv%01x", xf86Info.vtno - 1);

You are right, of course. I _did_ google first, but did not wade past the Linux-spesific results. Cough

Juha
 
Back
Top