5

I want to get virtual machine in a TTY (VT*) in fullscreen like GDM3 can take a TTY (VT*) for the graphic part of linux

I want DISPLAY (heard as the output of a graphic server, here the VMs) to be redirected in a TTY (VT*), and not in a window like usually

It will make like the computer run multiple OS at the same time but in fact it's a Linux Kernel who virtualize the differents OS that we can see on the different TTY (VT*)

You know, the TTY (VT*) in CTRL + ALT + Fi


Okay

Wanted possible solution


Not okay

Not wanted

wxi
  • 139
  • 2
  • 9
  • Not sure what you exactly want, but: TTY = teletype = terminal abstraction, **characters only** (no graphics). DISPLAY = environment variable that describes which X server to contact to render graphics. "Ctrl-Alt-F1" etc = virtual terminal (VT). You can run multiple virtual machines (VMs) with multiple OS at the same time, that's totally unrelated to any TTYs or DISPLAYs or virtual terminals. You can't "see" a VM, neither on a TTY, nor graphically. – dirkt Nov 07 '19 at 12:28
  • 1
    Thanks for the clarification, yeah I don't have the vocabulary but you don't reply at the question at all – wxi Nov 08 '19 at 12:33
  • I want in each Virtual Terminal a graphical Virtual Machine like we can set a Windows Manager at each Virtual Terminal. I don't want the classical windowed Virtual Machine – wxi Nov 08 '19 at 12:35
  • 2
    You can start another X11 server and run qemu in full screen mode inside it. As root: `startx -- :1; xauth extract - :1 | su USER -c 'xauth merge -`. Then as USER: `DISPLAY=:1 qemu -full-screen ...`. You can then switch between qemu and your gui screen via ctrl-alt-Fx. This may have problems with the screen resolution adjusment in the guest, but it's a start. qemu/SDL or whatever backend could probably run without an X11 server, but I have no idea how/if accelerated qemu video card emulations like virtio work with it. –  Nov 08 '19 at 14:34

1 Answers1

0

And to expand on the comment of mosvy:

If you want to switch between virtual terminals with Ctrl-Alt-Fi and see a different desktop on each virtual terminal, then you need to start several X servers, one for each VT where you want to see a desktop.

These X servers need to run on the host (not in a VM). You can start X servers directly with startx, but more usually X servers are started from a display manager (DM). There are several display managers in use (e.g. xdm, kdm, gdm, lightdm, and others), so find out what your distro uses, and configure it.

Once you've start the X servers, you can either log in on each of them and have a different session for different users (no VMs needed, but all will be using the same OS), or if you really need VMs, depending on what kind of VM you use, you can either map the correct X protocol unix domain socket into the VM, or configure the VMs to access the X servers over the internal network.

Edit

do I really have to start multiple instances of X or i can use the same one on differents VT

No, an X server is bound to a VT (and more recently, it can be used independtly of an VT). You can't use a single X server on multiple VTs.

Is X really needed or can I just bind a VM without DE on the VT?

As I wrote on the comment, VMs and VTs have nothing to do with each other. At all.

The objective is to have multiple OS (here W10/OSX/GNU) to work "natively" with them at the same time

Windows 10 and OSX? That's not going to work with virtual terminals, sorry. I understand that you think it would be convenient to just swap between those OSes with Ctrl-Alt-Fi, but I don't think one can make this work.

dirkt
  • 31,679
  • 3
  • 40
  • 73
  • Thanks for the reply. The objective is to have multiple OS (here W10/OSX/GNU) to work "natively" with them at the same time, on the same workstation, and obviously to switch between them easily, so i don't know if VM are really needed but the objective here is not to have multiple linux, just one – wxi Nov 09 '19 at 16:58
  • Your reply is too blury, do I really have to start multiple instances of X or i can use the same one on differents VT ? Is X really needed or can I just bind a VM without DE on the VT ? About configuring it I will need more informations, mine is GDM3. Here different sessions are not needed considering it will be the same user and that a VM is already an inner session in himself. And what about X mapping into VM (or network mapping) ? – wxi Nov 09 '19 at 17:03