Unix Technical Forum

pb with X server ?

This is a discussion on pb with X server ? within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi, I'm using a Mandrake 10.1. In a terminal, when I type "xlock", it works. If I type "xlock ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 09:40 AM
rp
 
Posts: n/a
Default pb with X server ?

Hi,
I'm using a Mandrake 10.1. In a terminal, when I type "xlock", it
works. If I type "xlock -display localhost:0", it doesn't work. Does
anybody know what's wrong with it ?
Thanks in advance.
RP

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 09:40 AM
Peter T. Breuer
 
Posts: n/a
Default Re: pb with X server ?

rp <rprot@univ-savoie.fr> wrote:
> I'm using a Mandrake 10.1. In a terminal, when I type "xlock", it
> works. If I type "xlock -display localhost:0", it doesn't work. Does
> anybody know what's wrong with it ?


What do you think is wrong with this behaviour? What is your $DISPLAY?
What does "localhost" resolve to? Etc. You have to tell us why you
think that on the face of it perfectly normal behaviour is strange!
By default, things to nothing - you have to tell us why you think they
should do otherwise in order that we may judge and advise.

Personally I would guess that either your display is not localhost:0
(:0? localhost:1?) or localhost does not resolve thanks to a network
conf screwup. After checking those ou I would go to strace, and thence
to the man page.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 09:40 AM
rp
 
Posts: n/a
Default Re: pb with X server ?

Thank you for your answer Peter. $DISPLAY is actually 0.0 and my
command was in fact "xlock -display localhost:0.0" (I tried both 0 and
0.0). localhost is pingable and refers to IP adress 127.0.0.1, so I've
got no doubt about the network conf.
Now let's see what strace says...
RP

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 09:40 AM
Peter T. Breuer
 
Posts: n/a
Default Re: pb with X server ?

rp <rprot@univ-savoie.fr> wrote:
> Thank you for your answer Peter. $DISPLAY is actually 0.0 and my
> command was in fact "xlock -display localhost:0.0" (I tried both 0 and
> 0.0). localhost is pingable and refers to IP adress 127.0.0.1, so I've


So what does

xlock -display :0.0

do? (please state the EXACT result of "echo $DISPLAY").

> got no doubt about the network conf.
> Now let's see what strace says...


Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 09:40 AM
rp
 
Posts: n/a
Default Re: pb with X server ?

Oupsss. strace doesn't seem so easy to use for a beginner...

Apparently, the first "error message" generated with strace seems to be
:
connect(3, {sa_family=AF_INET, sin_port=htons(6000),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection
refused)
So, no connection seems possible on the Xwindow port. Does anybody know
where this could come from ?
Thanks in advance.
RP

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 09:40 AM
Peter T. Breuer
 
Posts: n/a
Default Re: pb with X server ?

rp <rprot@univ-savoie.fr> wrote:
> Oupsss. strace doesn't seem so easy to use for a beginner...


> Apparently, the first "error message" generated with strace seems to be
> :
> connect(3, {sa_family=AF_INET, sin_port=htons(6000),
> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection
> refused)


Well, your DISPLAY said ":0.0" (which is a unix domain socket, not a tcp
socket), so I would try :0.0, not "127.0.0.1:0.0".

> So, no connection seems possible on the Xwindow port. Does anybody know
> where this could come from ?


Everywhere - tcp connections are disabled by default on most X servers
in most distributions. See your X server startup line!

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 09:40 AM
rp
 
Posts: n/a
Default Re: pb with X server ?

xlock -display :0.0 works (same as xlock). Echo $DISPLAY gives 0.0. My
pb has nothing to do with the name of the display itself. But I need to
use a network connection. The ultimate goal is to start a program on
one PC with a display on another PC. I'm used to do it with Redhat
distribs. And I can't do it on this Mandrake...
RP

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 09:40 AM
Peter T. Breuer
 
Posts: n/a
Default Re: pb with X server ?

rp <rprot@univ-savoie.fr> wrote:
> xlock -display :0.0 works (same as xlock). Echo $DISPLAY gives 0.0.


That's consistent then. I don't understand why you ran "xlock -display
localhost:0.0" (and complained).

> My
> pb has nothing to do with the name of the display itself.


It seems to me that was precisely your problem, because when you used
the correct name then the command you complained about started working,
according to your account above.

> But I need to
> use a network connection.


That's a separate matter, unconnected to your original question, I fear.
Enable it in your X server startup line, is the answer. Man <whatever
your xserver name is>, or just read the startup script or log and spot
the obvious parameter.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 09:40 AM
Enrique Perez-Terron
 
Posts: n/a
Default Re: pb with X server ?

Hello,

rp <rprot@univ-savoie.fr> wrote:
> xlock -display :0.0 works (same as xlock). Echo $DISPLAY gives 0.0.


I see a difference between "0.0" and ":0.0".

If I try it, I get as expected:

$ export DISPLAY=0.0
$ xmag
Error: Can't open display: 0.0
$ xmag -d :0.0
(the utility starts)

$DISPLAY is not so important as long as you are using -d on the
command line. The -d option overrides the environment variable.



On Tue, 04 Oct 2005 17:58:22 +0200, Peter T. Breuer <ptb@oboe.it.uc3m.es> wrote:

> Enable it in your X server startup line, is the answer. Man <whatever
> your xserver name is>, or just read the startup script or log and spot
> the obvious parameter.


As an additional hint, try

netstat -at | grep LISTEN

on the computer running the X server. What should appear in the output
if it shall be possible to connect to the X server from another computer?

And what should appear in the output to make it possible to connect using
localhost:0.0 ?

Remember, the form :0.0 is equivalent to unix:0.0, and "unix" refers to
something that contrasts with network interfaces. Localhost works through
the loopback interface which is in the family of network interfaces.

-Enrique
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 09:40 AM
Peter T. Breuer
 
Posts: n/a
Default Re: pb with X server ?

Enrique Perez-Terron <enrio@online.no> wrote:
> Hello,


> rp <rprot@univ-savoie.fr> wrote:
>> xlock -display :0.0 works (same as xlock). Echo $DISPLAY gives 0.0.


> I see a difference between "0.0" and ":0.0".


":0.0" is correct. I do not recognize (understand/parse) "0.0".
Perhaps it is a modern variant, but I would not rely on it myself.
It looks to me like a network IP address!

> If I try it, I get as expected:


> $ export DISPLAY=0.0
> $ xmag
> Error: Can't open display: 0.0


Looks correct to me, indeed.

> $ xmag -d :0.0
> (the utility starts)



> On Tue, 04 Oct 2005 17:58:22 +0200, Peter T. Breuer <ptb@oboe.it.uc3m.es> wrote:


>> Enable it in your X server startup line, is the answer. Man <whatever
>> your xserver name is>, or just read the startup script or log and spot
>> the obvious parameter.


> As an additional hint, try


> netstat -at | grep LISTEN


> on the computer running the X server. What should appear in the output
> if it shall be possible to connect to the X server from another computer?


I imagine a 6000 line.


> And what should appear in the output to make it possible to connect using
> localhost:0.0 ?


> Remember, the form :0.0 is equivalent to unix:0.0, and "unix" refers to
> something that contrasts with network interfaces. Localhost works through
> the loopback interface which is in the family of network interfaces.


I can't recall offhand what the tcp enable/disable option is for xservers.
-notcp? SOmething like that. Indeed, I can't even recall the name of
my xserver in order to look it up myself in its manpage. But I daresay
a grep among the files in /etc would find it for me!

Peter


> -Enrique


--
---------------------------------------------------------------------
Peter T. Breuer MA CASM PhD. Ing., Prof. Ramon y Cajal
Area de Ingenieria Telematica E-mail: ptb@it.uc3m.es
Dpto. Ingenieria Tel: +34 91 624 91 80
Universidad Carlos III de Madrid Fax: +34 91 624 94 30/65
Butarque 15, E-28911 Leganes ES RL: http://www.it.uc3m.es/~ptb
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com