LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   X display question (https://www.linuxquestions.org/questions/linux-general-1/x-display-question-419159/)

chromiumferret 02-24-2006 12:59 PM

X display question
 
Hi,
I'm familiar with command line unix systems, but a lot of this X stuff is magic to me. On my ubuntu linux system, my DISPLAY variable is set to :0.0. And this works great. When I set the DISPLAY variable to localhost:0.0 it fails with the following error:

c6404@ralnx01:~$ export DISPLAY=localhost:0.0
[1]+ Done xclock
c6404@ralnx01:~$ xclock &
[1] 16654
c6404@ralnx01:~$ Error: Can't open display: localhost:0.0

[1]+ Exit 1 xclock


And yeah, I know it works the other way, but I'm actually trying to figure something else out and I'd like to know about this.
If one of you big brains out there could give a hand, I'd appreciate it. :D

johnson_steve 02-24-2006 01:45 PM

I don't think you can use hostnames. try:
Code:

export DISPLAY=127.0.0.1:0.0

chromiumferret 02-24-2006 05:09 PM

No, it didn't like that either.
c6404@ralnx01:~$ export DISPLAY=127.0.0.1:0.0
c6404@ralnx01:~$ xclock &
[1] 23330
c6404@ralnx01:~$ Error: Can't open display: 127.0.0.1:0.0

[1]+ Exit 1 xclock
c6404@ralnx01:~$

I'm eventually trying to get the Display from a remote host to display locally, but I thought that I'd better start by getting the localhost to display via either a hostname or IP address.
Any configurations to check?

johnson_steve 02-24-2006 05:50 PM

strange this works for me. but you should be able to use ssh -X to forward apps over the ssh conection it should set DISPLAY and xhost for you.

wilberto83cg 09-06-2006 02:38 PM

Did you find a solution
 
Hi,

Did you get a solution to your problem, because I have the same problem with my Linux machines. All Solaris OS machines work fine.

And yes you can use names instead of the ip, but this names must be in the /etc/hosts


All times are GMT -5. The time now is 06:29 AM.