Is X11 forwarding over SSH on Manjaro even possible?

I’ve been trying to get x11 forwarding over SSH working in Manjaro for longer than I can remember, and it just seems to be literally impossible.

That doesn’t make any sense, because, y’know, it’s Linux.

So, what I really need is a noob friendly, step-by-step, idiot proof guide that spells out exactly what commands to run, and exact paths for files to edit.

Don’t ask what I’ve already tried, I have tried so many things over a very long time that I can’t remember them off the top of my head, so I just want to start from scratch.

Please do not recommend VNC without first addressing my x11 forwarding issue, I just want remote access to individual applications. When I want to setup VNC, that will be a separate endeavor that I will work on somewhere else.

Sorry if this is a bit much, I’m pretty ignorant about networking in general, and I have plenty of other network related problems that I won’t address here unless it’s contextually necessary.

EDIT: Remote login returns this error: X11 forwarding request failed on channel 0

EDIT 2: I’ve managed to login with x11 enabled, but I receive error:

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xc
omposite-glx, xcb.

Aborted (core dumped)

Thanks for reading my post, I really appreciate it.
– MansakeLabs

1 Like

Absolutely - I have done it - albeit long time ago.

It was an absolute kick when I remotely - using SSH and Xming on Windows - was able to run WebStorm on my Linux desktop.

X11 forwarding over SSH just works on Manjaro as on other Linux Distribution.

Unfortunately, “doesn’t work” is not a good problem description. Please describe the things you tried and what error messages you received.

If you really need this kind of help, you probably should not use X11 forwarding at all. However the Arch wiki describes what you need to do on the remote and on the client.

https://wiki.archlinux.org/index.php/OpenSSH#X11_forwarding

Some things you should also keep in mind. Do not use Wifi, try it at first in your LAN. Make sure the user on the remote system is already locked in and a X11 server runs. These points are in general not necessary, but they help. Specially the already locked in user on the remote.

2 Likes

Ah, I thought my post was missing something. Thanks for pointing it out, I’ve added the error message I get when logging in to the post. Here it is so you don’t have to scroll up:

Do you have X11Forwarding yes and X11UseLocalhost no in sshd_config?

Should X11UseLocalhost no be how it’s set to work? Because it’s set to 'X11UseLocalhost yes` right now.

I have added “EDIT 2” to the original post with further information.

Ah never mind. I have it commented out but with ‘yes’.

Well, it doesn’t work either way, so I guess that isn’t the problem, oh well.

What app are you trying to open btw? Did you try any other? I’m mostly using hexchat for example and it works fine on KDE with ssh -Y ...

Kate, but other apps give the same error, sometimes it’s different errors:

[mansakelabs@Smarkeltang ~]$ nemo
Unable to init server: Could not connect: Connection refused
Could not parse arguments: Cannot open display:

[mansakelabs@Smarkeltang ~]$ lutris
Unable to load locale dir, translations won’t work.
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Error: unable to open display
2020-10-04 09:41:19,847: glxinfo call failed: Command ‘[‘glxinfo’, ‘-B’]’ returned non-zero exit status 255.
2020-10-04 09:41:19,848: No available glxinfo output
2020-10-04 09:41:19,848: Invalid glxinfo received
2020-10-04 09:41:20,747: Getting full game list from MAME…
2020-10-04 09:41:20,747: MAME XML generation launched in the background, not returning anything this time
2020-10-04 09:41:20,752: MAME isn’t installed, can’t retrieve systems list.
Can’t open display
2020-10-04 09:41:20,765: Unable to read xrandr: Command ‘[‘xrandr’]’ returned non-zero exit status 1.
Unable to init server: Could not connect: Connection refused

(lutris:3081): Gtk-WARNING **: 09:41:20.791: cannot open display:

[mansakelabs@Smarkeltang ~]$ joplin
events.js:291
throw er; // Unhandled ‘error’ event
^

[Error: SQLITE_ERROR: ./build/lib/sql-extensions/spellfix.so: cannot open shared object file: No such file or directory
Emitted ‘error’ event on Database instance at:
] {
errno: 1,
code: ‘SQLITE_ERROR’
}

I just opened Kate without any problems. Are you logged in and KDE running on server side?

Yup, I’m logging into my gaming rig from my laptop. I even used -y instead of -x.

I’m asking if you are logged in on your rig - directly not via ssh.

I’m logged in on my rig right now, I’m watching YouTube with it.

Then I ran out of any ideas… Copy and paste line by line those errors in google and search for anything useful.

1 Like

You can’t play games over x11 forwarding. It is way to slow and more importantly, it uses the GPU of the system on which the X11 server runs. And this is the system which initiate the ssh connection.

SSH server    <------   SSH client 
X11 client    ------>   X11 server 
"Gaming rig"             "Laptop"

X11 forwarding is for simple programs whiteout to much eye-candy. Like a Text editor or xclock

You should read up on what X11 forwarding is, what it can do and what it is not.

2 Likes

I wasn’t planning on playing games over X11, I would use Steam for that.

Well, you can try a 3rd party program for remote access. I personally use NoMachine (from AUR) and it works perfectly. At home I connect directly, otherwise I forward a port through ssh and connect to NoMachine from there. It is very efficient, very simple to setup and you can tune sound and image quality depending on the connection speed.

At home, through WiFi, I can play games on my laptop which run from my desktop. There’s a bit of lag, but it’s only noticeable in games requiring low latency, such as racing games or shooters. Strategy games are ok to play. I guess the lag reduces through LAN.

I also use NoMachine through ssh to connect to my work machine, since the pandemic started. Never had an issue. I can even update the machine and reboot it.