0

I have heard that I can use "X11 forwarding" (whatever that means) to display graphics generated on a remote server on my local machine. Therefore, I followed these instructions (installed Xming, connecting via PuTTY) and advice from linked articles (not using PuTTY), and got nowhere. Using Ubuntu 18.04.4 (LTS) as a non-sudoer logging in with VPN access.

Here is the error I keep receiving when typing the command xclock (and yes, which xclock returns usr/bin/xclock so it is installed).

Error: Can't open display:

Regardless of how I set $DISPLAY using commands such as:

export DISPLAY=localhost:0.0

I always get this message back.

  • The error you refer to got left out of the post. Please include it. If you're on a Windows machine, with the X server Xming and Putty installed, and your question relates on how to run them, that's really not an Ubuntu question. – ubfan1 May 20 '20 at 19:18
  • Thanks @ubfan1 I added the message. Sorry for the rookie mistake! – brethvoice May 26 '20 at 14:09
  • If you have ssh (the client program), you can use the command line ssh -X user@ip-address. Your software in the client computer must be able to do the same (to manage the X graphics and set the DISPLAY variable). See this link concerning the software in the server. – sudodus May 26 '20 at 14:20
  • Not sure how the Windows X server works, but you might also need to "allow authorized clients" to connect, like xhost does on xorg. Particularly, if you're connecting as a different user, authorizations could be disabled, but usually have a list of allowed clients. – ubfan1 May 26 '20 at 15:29
  • @sudodus I tried all of those commands from your link and none of them worked. Guess I need to bring my administrator in on this conversation... – brethvoice May 27 '20 at 20:07
  • @ubfan1 I would appreciate more details if you have them. Particularly about how to "allow authorized clients." Is the Windows X server a program installed on my Windows local machine, or is it on the Ubuntu machine I log in to from Windows using ssh? – brethvoice May 27 '20 at 20:09
  • Your case would be running the equivalent to "xhost +username" on the Windows side which is running the X server. "xhost +" allows everyone. Since I don't know what your Windows server uses (hopefully the same xhost command), I can only suggest. – ubfan1 May 27 '20 at 20:13

1 Answers1

1

X11 forwarding means forwarding the X11 graphics created on the remote machine back to your local machine (as you stated).

I have found Xming and Putty to be quite tricky and somewhat outdated.

mobaxterm is a more integrated and powerful modern tool to achieve this (using windows locally, while remote is a linux server).

Having said that, if you are using Ubuntu on your local and remote Pcs you should NOT need xming or Putty. Please let us know if your local machine is Ubuntu or Windows.

colindaven
  • 104
  • 5
  • Hi @colindaven, my local machine is Windows. So I guess I need mobaxterm? I cannot install, so I need to pass this on to my administrator. – brethvoice May 27 '20 at 20:04
  • Yes,@brethvoice, I think you you need mobaxterm (or some other tool with X capability) in Windows. – sudodus May 28 '20 at 06:31