Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tightvnc - unable to connect with client
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Tue Sep 25, 2007 11:15 pm    Post subject: tightvnc - unable to connect with client Reply with quote

so here stands the situation:
i would like to clone my display across several networked machine without giving those machines the option to interface with the root display. to accomplish this i chose tightvnc.
Code:
USE="server" emerge tightvnc

upon executing
Quote:
vncserver
i am prompted for passwords, as expected, and things seem to start up and run correctly.
however,
Quote:
$ vncviewer host:1
results in
Quote:
Error: Can't open display:

i've read a few threads with similar symptoms, generally resulting in some configuration error or other which leads to a solution. at the root of my problem, however, is that the tightvnc log shows:
Quote:
25/09/07 18:53:25 Xvnc version TightVNC-1.3.9
25/09/07 18:53:25 Copyright (C) 2000-2007 TightVNC Group
25/09/07 18:53:25 Copyright (C) 1999 AT&T Laboratories Cambridge
25/09/07 18:53:25 All Rights Reserved.
25/09/07 18:53:25 See http://www.tightvnc.com/ for information on TightVNC
25/09/07 18:53:25 Desktop name 'X' (Astaire:1)
25/09/07 18:53:25 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
25/09/07 18:53:25 Listening for VNC connections on TCP port 5901
25/09/07 18:53:25 Listening for HTTP connections on TCP port 5801
25/09/07 18:53:25 URL http://host:5801

after i attempt to connect via vncviewer, which gives the appearance that, for some reason, no connection attempt is even being made.
additionally, since emerging tightvnc i have been unable to launch graphical applications. all fail with a message similar to (from opera)
Quote:
cannot connect to X server
i further believe the two to be related as, after unmerging tightvnc, graphical applications behaved normally.

suggestions regarding this problem, or regarding alternatives, much appreciated. thanks.
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Wed Sep 26, 2007 6:10 pm    Post subject: Reply with quote

does it start oK ?
start vncserver and then see if the process is running
Code:

paul@gravity ~ $ ps -A |grep vnc
15222 pts/2    00:00:00 Xvnc

then can you connect to the server on the serve machine ?
eg
Code:

paul@gravity ~ $ telnet localhost 5901
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
RFB 003.008
                   


then try vncviewer localhost::5901

and do you get another screen ?

if you do then its running OK on the server.

from your client
can you
Code:
telnet server::5901

and get an output ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
hexstar
n00b
n00b


Joined: 23 Sep 2007
Posts: 41

PostPosted: Thu Sep 27, 2007 5:00 am    Post subject: Reply with quote

You need to unblock the vnc ports on the server's firewall...
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Thu Sep 27, 2007 3:39 pm    Post subject: Reply with quote

hexstar, that was my first suspicion, however, even without the firewall running the performance remains the same. additionally connecting to the localhost should not be making a connection over the ethernet adapter, so the firewall should not be involved at all anyway.

thecoptoo, the output from telnet looks the same as what you posted, except for the RFB line. still cannot use vncviewer with any success. i do have
Quote:
httpd: premature connection close
httpd: no GET line
in my vnc log now, which i believe is from the localhost telnet session.
having tightvnc installed continues to cause graphical app launches to fail.
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Thu Sep 27, 2007 4:39 pm    Post subject: Reply with quote

so is vnc actually running ?
on the server :

start the server and then whats the output of
ps -A |grep vnc

and also

nmap -sS 127.0.0.1
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Thu Sep 27, 2007 4:57 pm    Post subject: Reply with quote

vnc is running, with -desktop X (in case that's significant)
Quote:
$ nmap -sS 127.0.0.1

Starting Nmap 4.20 ( http://insecure.org ) at 2007-09-27 12:55 EDT
Interesting ports on Astaire (127.0.0.1):
Not shown: 1693 closed ports
PORT STATE SERVICE
22/tcp open ssh
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1

_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
ttw
n00b
n00b


Joined: 31 Aug 2007
Posts: 7
Location: Galway, Ireland

PostPosted: Fri Sep 28, 2007 10:32 am    Post subject: don't think it's even trying to connect Reply with quote

i would guess the message is comming from vncserver not being able to connect to your display, not from 'Xvnc' rejecting the connection[/code]. try manually setting your display variable via

Code:
# DISPLAY=":0.0" ; export DISPLAY


and post that.

failing that i would also try

Code:
# xhost +


to disable xhost authentication (temporarily).

can't really guess the correlation between the install of tightvnc and your problem but i would also try ensuring that your local host name (from 'hostname') is listed in your '/etc/hosts' file as an alias of 127.0.0.1 to ensure you're connecting over the 'lo' inteface.
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Mon Oct 01, 2007 5:08 pm    Post subject: Reply with quote

apologies for the long time getting back, but thanks for the suggestions.
ttw, my DISPLAY is already set as :0.0
i use kdm locally to authenticate, do you think this could be causing an issue? shouldn't i still be seeing an attempt being made to do *something* even if authentication were broken?
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Mon Oct 01, 2007 5:37 pm    Post subject: Reply with quote

can you connect to the server from the localhost
ie vncviewer localhost::5901
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Mon Oct 01, 2007 8:42 pm    Post subject: Reply with quote

i cannot.
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Mon Oct 01, 2007 8:44 pm    Post subject: Reply with quote

as the same user that you have acess to the X-server on display 0 ( ie your regular user) ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Mon Oct 01, 2007 9:33 pm    Post subject: Reply with quote

i've tried both as root and as my uid (the only other user on the host) with the same results
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Mon Oct 01, 2007 10:20 pm    Post subject: Reply with quote

error message ?

and then do ( as user)
xhost +

and try again
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
ttw
n00b
n00b


Joined: 31 Aug 2007
Posts: 7
Location: Galway, Ireland

PostPosted: Tue Oct 02, 2007 12:25 pm    Post subject: better error information Reply with quote

to be honest, reading back through, i'm a bit confused as to what you're actually trying to achive (please note the question marks below)

you're running vncserver from a network machine and trying to connect it from another machine across the network ?

the vncserver start correctly and is listening on the port, you have verified that you get an RGB message when telnetting to the listening port ?

when you try and run the vncviewer from the remote machine you receive a "Error: cannot open display: " ?

OR

you are trying to connect back to the localhost as as test and are recieving an "Error: cannot open display: " ?

whatever you answer from the above you need to start including the "~/.xsession-error" file so that we can see something more concrete. there is probably also Xvnc error logs in "~/.vnc" directory, post that too.

current guess you need the following in /etc/hosts

Code:
127.0.0.1 hostname.netname.tld hostname


obviously the actual "hostname.netname.tld" and "hostname" entries should reflect your actual hostname

i would also guess that

Code:
xhost +


after you login to your local KDE session will temporarily resolve the problem.

anyway, as above, error logs
Back to top
View user's profile Send private message
ttw
n00b
n00b


Joined: 31 Aug 2007
Posts: 7
Location: Galway, Ireland

PostPosted: Tue Oct 02, 2007 12:31 pm    Post subject: local authentication Reply with quote

to_kallon wrote:
apologies for the long time getting back, but thanks for the suggestions.
ttw, my DISPLAY is already set as :0.0
i use kdm locally to authenticate, do you think this could be causing an issue? shouldn't i still be seeing an attempt being made to do *something* even if authentication were broken?


yes, you are. it looks like the application (vncviewer) is attempting to connect to the local Xserver and cannot, thus throws out the "Error: cannot connect to display: ". Default authentication will usually allow connections from 'localhost' this is why you need to add the 127.0.0.1 to '/etc/hosts' then when your application trys to connect to "hostname" it finds the localhost address connects over the loopback, the Xserver then does a reverse lookup and finds "127.0.0.1' to be from localhost (assuming you don't delete the current localhost entry) and allows it (actually i'm not sure if it actually does a reverse lookup but either way, that's roughly what i think's happening).
Back to top
View user's profile Send private message
to_kallon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2004
Posts: 89

PostPosted: Tue Oct 02, 2007 5:18 pm    Post subject: Reply with quote

i meant seeing something in the log, but i see your point.
/etc/hosts has had an entry for 127.0.0.1 pointing to localhost and my hostname from the beginning.
_________________
God grant me the strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference
-Bill Waterson
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 02, 2007 7:43 pm    Post subject: Reply with quote

Id see what happens with all the variations
localhost::5901
187.0.0.1::5901
192.168.x.x::5901 ( depending on your subnet)

adn if you get a display then its not the vncserver
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
ttw
n00b
n00b


Joined: 31 Aug 2007
Posts: 7
Location: Galway, Ireland

PostPosted: Tue Oct 02, 2007 11:18 pm    Post subject: Reply with quote

to_kallon wrote:
i meant seeing something in the log, but i see your point.
/etc/hosts has had an entry for 127.0.0.1 pointing to localhost and my hostname from the beginning.


since you're not posting your log Xsession log (.xsession-errors) or your Xvnc server log (somewhere in .vnc i think) i can only take you word for that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum