Run Wayland and X11 sessions parallel

Hi.

For some time I wanted to run Wayland session with my NVidia card, and run HDMI output. For the solution for this moment I’ve choose “nouveau” driver, but there is some glitches with HDMI output on Wayland (white-screen flickering some time), which isn’t appeared on X.Org with same configuration on “nouveau” driver. And for solution I’ve found run X session on another TTY (Wayland session runs on TTY2, on TTY3 I would run X session).

Basically, I’m running command on TTY3 like startx, but all applications which I’m run here, runs on Wayland session.

I found some “solutions” which doesn’t work in this situation – run X server with argument for different display:

startx -display :3 -- :3 vt3

(something like this), and run something like

DISPLAY=:3 gnome-terminal

or

export DISPLAY=:3 && gnome-terminal

– this commands creates terminal in same Wayland session TTY, not in X session. But, I can run xterm via applications menu from X session, and that is only one application, which I can run here, all another runs on Wayland session. I’ve checked DISPLAY variable, and on Wayland session it has value :0, on generated X session it has value :3.

So, question – how to run applications on X session separately from Wayland, and run applications on Wayland similarly separated from X session. Is it possible, or is it any idea for solving problems like this?

For GTK applications, the right combination of the GDK_BACKEND and DISPLAY environmental variables should work. E.g.:

GDK_BACKEND=x11 DISPLAY=:3 gnome-terminal

and maybe QT_QPA_PLATFORM=xcb fot Qt programs.

arios@jentu: GDK_BACKEND=x11 DISPLAY=:3 gnome-terminal
Invalid MIT-MAGIC-COOKIE-1 key# Failed to parse arguments: Cannot open display:

Also, when I run nautilus with same arguments, it also runs on Wayland session.
But when I run them in X session in XTerm, it works, but not all of them. For example, I’ve run steam and nautilus, but not gnome-terminal

Wow, it works almost perfectly, when I run X session with

export GDK_BACKEND=x11 DISPLAY=:3 && startx -display :3 -- :3 vt

but gnome-terminal runs too slowly, but, I think, it’s not important for this issue.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.