On 02/15/2006 02:00 PM, Marc Shapiro wrote: > Is there any way to determine the virtual terminal that an X session is > running on? > > Using 'who' only tells me who is logged onto a VT, which would be fine, > except that it does not show VTs with X sessions. > > I have two X sessions running at the same time. One is going to be > running on tty7 and the other on tty8. I want to switch from one to the > other. Obviously Ctl-Alt-F7, or Ctl-Alt-F8 will do this, but, I have no > way of knowing which tty the current session is using since which > session is on which tty depends on the order that they were started, > which might vary. > > Is there a way to programmatically determine which tty is active and > switch to the other. That way, regardless of which session I am using, > and which tty it is attached to, a single method will switch to the > other session/tty. > > Alternatively, is there any way to specify which tty an X session is > started on. If I can say "start this X session on tty8 even if there is > no session on tty7," or "always start this X session on tty7" then I > would know exactly which Ctl-Alt-Fx sequence to use to switch to the > desired session. >
Using gdm, you can specify... See /etc/gdm/gdm.conf # Automatic VT allocation. Right now only works on Linux. This way # we force X to use specific vts. turn VTAllocation to false if this # is causing problems. FirstVT=7 VTAllocation=true Also, info in /var/log may help you... grep VT /var/log/XFree86.0.log (++) using VT number 7 grep VT /var/log/XFree86.1.log (--) using VT number 3 But using gdm.conf could do it. Regards, Ralph -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]