You are not logged in.
Hi everyone,
I want to create an installation that only boots into two virtual machines (preferably using KVM). I would like to be able to switch between the two with a keyboard shortcut, i.e. having two Xorg sessions and switch with CTRL+ALT+F7/F8. Is this possible? One VM will be Windows 10, the other one most probably Linux. No fancy 3D acceleration or similar is needed.
Is there a tutorial you can recommend?
Kind regards
Velines
Offline
It is possible. You don't need a tutorial for that kind of task. You already know what you want. Use the wiki. You need KVM virtual machines? Have a look at qemu. Multiple sessions, automatic login, small window managers, it's all in the wiki.
Offline
... small window managers...
Why? He doesn't need window management. Just run qemu, or whatever, fullscreen in each x session.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Awebb wrote:... small window managers...
Why? He doesn't need window management. Just run qemu, or whatever, fullscreen in each x session.
A possible alternative to multiple X sessions.
Offline
Ah, that makes sense. That's the way I'd do it too - but the key combos in the first post were those for switching ttys, so that's where I was thinking. No need for a WM in that case.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm fine with either way, whatever is more stable. I think I'll try with a lightweight WM first, as I expect the nvidia driver to do funny stuff when trying to handle multiple X session.
Offline
This would suffice as a wm - it just fullscreens all windows and allows for Alt-Tab window switching:
/* MINWM.C
* Released to Public Domain
* Compile: gcc -o minwm minwm.c -lX11
*/
#include <X11/Xlib.h>
#include <X11/keysym.h>
int main(int argc, const char **argv) {
Display *dpy = XOpenDisplay(0x0);
if (!dpy) return 1;
Window root = DefaultRootWindow(dpy);
int sw = DisplayWidth(dpy, DefaultScreen(dpy));
int sh = DisplayHeight(dpy, DefaultScreen(dpy));
XGrabKey(dpy, XKeysymToKeycode(dpy, XK_Tab), Mod1Mask, root, True, GrabModeAsync, GrabModeAsync);
XSelectInput(dpy, root, SubstructureRedirectMask);
XEvent ev;
while (!XNextEvent(dpy,&ev)) switch (ev.type) {
case KeyPress:
XCirculateSubwindowsUp(dpy, root);
break;
case MapRequest:
XMapRequestEvent *e = &ev->xmaprequest;
XMoveResizeWindow(dpy, e->window, 0, 0, sw, sh);
XMapWindow(dpy, e->window);
break;
}
return 0;
}"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline