2

Is it possible to run X11 but leave the tty1 console available for logging in, with a different screen and keyboard? Like a multi-seat system, with one seat running X11 and the other seat running a normal console on tty1?

The reason I ask is that I am using an old server as my PC, and the onboard Matrox video card is too slow for anything useful. So I added a PCI-E nVidia video card which allows me to do what I need, and I can bring up X11 on this without any issues. The onboard Matrox card is not part of the X11 config and is ignored, however it still goes blank when X11 loads as the active TTY gets changed. The machine boots on the Matrox card, and the Linux kernel loads here too, with the nVidia card remaining blank until X11 loads.

The server has the ability to use VNC to get a remote console, so you can view the boot process, access the BIOS, etc. from a remote machine. When Linux boots to the console, this can also be accessed via the VNC connection. However the VNC connection can only display the contents of the onboard Matrox card, it can't see anything that's on the nVidia card. So as soon as I load X11, the remote console goes blank, just like any monitor connected to the Matrox card.

Since the VNC connection appears to Linux as having its own USB keyboard and mouse, along with a separate video card not used by X11, there are enough resources to keep the tty1 console active while X11 is loaded, but I can't see how to set this up. I'd like to be able to use VNC as a backup way of remotely accessing the machine via its console if I can't connect to it over the network for some reason (since it has a second Ethernet connection just for this remote management access.)

I have told X11 to only use the nVidia card and the physical keyboard and mouse, so how can I tell the Linux console to stay active on tty1 using the Matrox card with the USB virtual keyboard and mouse?

(I have tried configuring X11 on both cards and this works fine, but because the Matrox card is so slow it's next to unusable, even only running an xterm, so I'd get more use out of it leaving it as a native Linux console. I also tried disabling the onboard video in the BIOS setup, but this just causes the Matrox card to remain blank all the time. The boot messages don't appear on the nVidia card, and the remote console can't see anything either.)


Duplicate clarification: There are plenty of questions about how to run multiseat X11, but these cover running X11 on each seat. I am instead trying to work out how to run the native Linux console on one of the seats, which is where this question is unique.

If you can find another question that covers running the native VGA text-mode Linux console on one of the seats please post a link as I have not been able to find one.

3
1

So as of September 2020 this is not possible. The reason is that it is not possible to prevent a USB keyboard from sending input to the Linux TTY system.

You can launch Xorg with the -sharevts option which completely disconnects it from the VT system, allowing the console to remain unaffected and operate as normal. However Xorg doesn't grab exclusive access of the keyboard, so when you type, your keystrokes go to both Xorg and the Linux console.

This means if you are typing into a web page in Xorg, your keystrokes are also going to the console where they might be run as shell commands, if you're logged in there.

At the time of writing, there doesn't appear to be any way to tell Xorg to take exclusive access of the USB keyboard, or to tell the Linux console to ignore a keyboard and not take input from it.

Until either of these limitations are lifted, it's not practical to run Xorg on one monitor and leave the native Linux console usable on another monitor, unless you plan to do it without using a keyboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.