LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   display (https://www.linuxquestions.org/questions/linux-general-1/display-564878/)

mathit 06-27-2007 12:20 PM

display
 
Hi,
When variable DISPLAY=:0.0 then OK.
But if I set DISPLAY=<ip_addr>:0.0 then I can not run any X application.
The ip_addr above matches the one which is printed by ifconfig.

SciYro 06-27-2007 01:57 PM

perhaps your X server is not setup to listen to internet connections?

timmeke 06-28-2007 06:55 AM

Maybe you can use "xhost" to allow X connections to the specific IP (even though it's the same machine, the IP and localhost interfaces may be handled differently).

mathit 06-28-2007 12:22 PM

I don't know how to set Xserver. But I discovered yet another oddity.
Command "hostname -i" displays "127.0.0.1". But ifconfig has output
"eth0 ... inet addr:192.168.0.5 ... "

SciYro 06-28-2007 04:07 PM

Thats normal, the 127.0.0.* is supposed to be local only, meaning NOT the internet, but your computer. Your internet address is 192.168.10.5 (which is not a internet address, but a internal network address, still, you get where this is going i hope).

speaking of which, why are you trying to use a ip address in the DISPLAY, when your only trying to display on your local computer?

timmeke 06-29-2007 02:20 AM

The localhost network interface, 127.0.0.1, which represents the local machine itself and is inaccessible from any other machine (each machine has its own localhost interface), is different from the network interface that has IP 192.168.10.5. For your Linux, it's as if your computer has 2 network interfaces and one just "loops back" to your own machine.

My point is that the X config & access may be set differently for both network interfaces. Hence, setting DISPLAY to :0.0 (or 127.0.0.1:0.0) is different from 192.168.10.5:0.0, even though both refer to the same machine.

Using the IP (192.168.10.5) of your own machine for X display is rather useless. Even if this loops back (ie via a network gateway), you're bothering the network for no reason and you should really use the built-in loopback interface, 127.0.0.1.

mathit 06-29-2007 12:17 PM

Working on this problem I have discovered another one.
Route table looks as the following
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
It does not include "lo" route. I was not able to add it with the help of
command "route add -net 127.0.0.0". I received the error message "SIOCADDRT: Invalid argument".
I don't know what it means.
My system is "uname -a
Linux cored 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386
GNU/Linux".
Command ifconfig displays the present of both interfaces in UP state.


All times are GMT -5. The time now is 01:34 PM.