Page MenuHomeSolus

SSH X-Window Issues
Closed, ResolvedPublic


On a fresh Solus install or live usb, I get the following error when connecting to a remote server via SSH and trying to launch an X-window:

“Invalid MIT-MAGIC-COOKIE-1 key”

Serendipitously, I noticed that this problem goes away installing gdm. As it turns out, gdm install xhost (which is not installed in a default installation with lightdm) and includes a /etc/gdm/Xsession file that contains the following line:

xhost +si:localuser:id -un || :

The default lightdm installation has no analogous Xsession file, but I got X-windows working via ssh by installing xhost and adding the following to my .bashrc:

xhost +SI:localuser:<username>

I'm not sure how best to handle this situation in the default lightdm setup, but I just wanted to bring this to the maintainers attention.

Related Objects

Duplicates Merged Here
T1937: ssh X11 forwardihg

Event Timeline

DataDrake triaged this task as Normal priority.Sep 20 2016, 6:37 PM
DataDrake added a project: Software.
DataDrake added a subscriber: DataDrake.

I can confirm this is real. Not sure when it started, but I haven't been able to use x11 forwarding either. just figured it was my own config that was causing problems

BRM added a subscriber: BRM.Dec 21 2016, 5:54 PM
BRM added a comment.Dec 21 2016, 6:54 PM

Installing xhost is not enough. You still get xhost: unable to open display "", unless you also add export DISPLAY=:0.0 to your .bashrc.

It seems that the location of xauth is not set to /usr/bin/xauth in Solus now? From what I read this location is hardcoded, but honestly I don't know whether this is what Solus does, nor am I an expert on this issue. If it is hardcoded then it must be set to something other than /usr/bin/xauth, which is actually the location of xauth program (one can check with command "which xauth").

So I created the file ~/.ssh/config with the content:

XAuthLocation /usr/bin/xauth

and the problem is solved. (I also need to set the permission of the file to the following: -rw-r--r--)

One can also do the following while X11 forwarding:

"ssh -Y -o XAuthLocation=/usr/bin/xauth XXX@XXXX"

If the developer can let us know where Solus looks for the xauth program, we can just create a soft link to it and the problem will be solved too.

Looks like the default path it uses is /usr/X11R6/bin/xauth

I've made a package update which will hopefully fix that, but I have no way to test it out. So fingers crossed

Thanks. I can test it out. But I tried to update the system but it got no packages to upgrade. I guess it is not synced to stable yet?

No, not yet. If you're lucky, you can probably do this (as one line): (I don't think there's any deps that would interfere)

sudo eopkg install

I can confirm it works properly now. The warning information I have seen before about "No xauth data" also goes away. Thanks a lot.

ikey closed this task as Resolved.Apr 27 2017, 7:24 PM
ikey claimed this task.
ikey added a subscriber: ikey.

Great to see this issue is closed now. It has been a big problem for me for a while. Loving Solus!

Awesome! I began to use Solus a few months ago, but unfortunately this issue drove me away. Now I am back.