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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| ||||
| 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 |
| Thread Tools | |
| Display Modes | |
|
|