LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display not set (https://www.linuxquestions.org/questions/linux-newbie-8/display-not-set-4175416662/)

Karita 07-14-2012 04:32 AM

Display not set
 
Going round in circles.

I'm trying to get Xming working but nothing is happening when I try and start an xterm using Xlaunch. I've also tried using plink directly: -

plink -ssh -X me@666.666.666.666 xterm

but I get

xterm Xt error: Can't open display:
xterm: DISPLAY is not set

my sshd_config has as required
X11Forwarding yes

I can SSH into the server no problem using putty.

Xming troubleshooting tells me DISPLAY should be set.

I'm confused and don't really know where to look next. It feels likes I'm going round in circles.

Any help appreciated.

Elv13 07-15-2012 03:00 PM

You could install a virtual machine instead of trying to setup xming. Then use that VM to interact with your server.

As for the current problem, be sure the sshd config on the server all X11 redirection.

cool_bub 07-20-2012 10:43 AM

You need to set the DISPLAY on your remote server:

> DISPLAY=<your local ip>:0.0; export DISPLAY

Using Xming's XLaunch you can check "No Access Control", but this is not recommended. This will allow connections from any outside server. Safer solution is to add the IP of your remote server to the X0.hosts file. By default, Xming only allows connections only from localhost when access control is on. You can find the X0.hosts file where you installed Xming.

Ex: C:\Progam Files\Xming\X0.hosts

Good Luck!
John

Buibui 07-20-2012 11:42 AM

Hello Karita,

You may try MobaXterm : it is a single executable with no setup required, there is no need to configure anything, you just start it and you have a cool SSH client with a full X11 server correctly configured.

- Download and run MobaXterm
- In MobaXterm terminal, just type your ssh command
e.g. ssh root@myserver
- type xclock

It's just that simple: your xclock application will be displayed on your local computer. No need to change your DISPLAY environment variable, MobaXterm will handle this for you.

I hope this helps!

dmdeb 07-20-2012 11:53 AM

Quote:

Originally Posted by cool_bub (Post 4733789)
You need to set the DISPLAY on your remote server:

> DISPLAY=<your local ip>:0.0; export DISPLAY

Using Xming's XLaunch you can check "No Access Control", but this is not recommended. This will allow connections from any outside server. Safer solution is to add the IP of your remote server to the X0.hosts file. By default, Xming only allows connections only from localhost when access control is on. You can find the X0.hosts file where you installed Xming.

Ex: C:\Progam Files\Xming\X0.hosts

Good Luck!
John

And if you don't want to do that for some reason, you can provide the DISPLAY setting with the ssh command line:

ssh -X user@targetmachine DISPLAY=clientmachine:0.0 xterm

... or the like.


All times are GMT -5. The time now is 02:54 AM.