Basic ssh works but X11 does not

Copper Contributor

I have the basic features of <ssh remotehostname> working right now. By "working" I mean that I can successfully connect to another machine (Linux machine) through an ssh session in powershell using a command like <ssh remotehostname>. I've already setup my /.ssh/config file and public keys which works quite nicely.


However, I cannot get X11 to work. Any time I try to start this GUI application (which happens to be the eclipse IDE on this linux machine) it gives the following error (PowerShellError.png).



I've went ahead and setup cygwin64 and it's working like a charm. I have X11 working just fine and can launch this same GUI application just fine. I'm attaching this output as well (Cygwin64.png).



What is going on here? How can I troubleshoot this error. I don't believe this missing package called "cairo" is the issue since it happens on cygwin as well. I also get this missing "cairo" package error even when I'm directly working from this linux machine. I think the issue here is related to some display setting or powershell setting that is not being applied??? I do not know much about powershell so the more detailed you are is much appreciated.

5 Replies

I think that error is actually coming from the Linux box.  Cairo is a graphics library.

Search on whatever repository you are using for the Linux box to install the Cairo lib and see if the error goes away.

I see what you're saying and I agree the error is coming from the linux box. However, I don't believe that my issue regarding "I can't open up a gui application from the linux box using powershell" is related to to this missing "cairo" package. Maybe I'm wrong to assume this.....? I say this specifically because when I'm in a ssh session using Cygwin this error !!!still appears but!!! I'm able to open the gui application perfectly with Cygwin. This makes me believe that the cairo package whether installed or not makes no difference since Cygwin works but Powershell doesn't. However, I could be wrong to assume this.


That being said, I'm unable to install packages to this remote due to several reasons not worth mentioning here. Therefore, even if I wanted to install this "cairo" package I couldn't. Are there any other ideas you might have I could try in isolating the origin of the issue "I can't open a gui application on the remote host with x11 services"?

I understand and I agree that should not keep you from connecting.  Not sure this is relevant or not but when I was using X11 on some Solaris boxes I could not use X11 until I added the Trusted IPs into one of the config files via ssh console.  I believe many hits on a search will say to use Xhost + all but that opens it everyone.  even though you are not seeing any security key related errors you might want to check the trusted key pairs.  Oh I also forgot to mention that the screen sessions might be numbered differently on the 2 clients.  I do remember that being confusing when I was setting up the remote display.  Some places it has to be :0 and others it had to be :1.

Can you point me to some sources that would explain what displays mean and how to set them in windows 10? Not sure I'm following you on what that means/entails and could use a bit of an explanation.


Thanks ~S

It has been at least 6 years since I had to do this so I am rusty. It took me a few days to get it to work back then.

When you establish a ssh session at the basic level, a terminal console is established as you have seen.  BUT if you want to use a graphics mode then you have to use X11 or Cygwin and the DISPLAY variable is used to re-direct the data stream back to the remote. Cygwin may have made some assumptions and been set correctly when you installed it.

I used PuTTY and XMing on Windows 7.  But to get it all to work I had to set DISPLAY variable in the connection or config to get it to work.  

These should help;