News:

Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?

Main Menu

VNC Server

Started by KiWi, January 22, 2005, 12:55:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KiWi

I need help running a VNC server on linux.  Trying to connect from a Windows machine (if it helps any, this is all behiend a router).

I start up the VNC server, and everything seems to be fine, but it fails to connect :/

Yes, I am unexpierenced linux user, and
no, I don't know what I'm doing.

Any help would be appreciated... or alternative remote desktop connections?

Quik

You need to forward a port on your router. If you're connecting to the Windows machine, have them open up a port (I suggest 5995) and then give them your IP. Have them connect you to them. iago and I have done it, myself on WinXP and him on Linux. When he sees this thread, he'll explain in-depth.
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

KiWi

Well, both computers are behiend the same router (sorry I didn't mention earlier), so I don't think I'll need to forward/open any ports.
[So this would all be LAN]

Another thing I thought I might mention, I'm able to connect to the Windows VNC Server, but not vice versa.  Also, I'm positive the VNC Server is running correctly on the Linux machine, but the Windows Client doesn't seem to be able to connect to it.

iago

Since VNC on Linux uses an X server, it has to be independant of the one you're logged in as.  So if u're logged in as :0, VNC will use :1.  That means that when you connect through vnc, you have to specify 192.168.1.101:1 on vnc, to make it use the second X session.  When vncserver loads on Linux, it'll tell you which one it's running as:
Quoteiago@Slayer:~$ vncserver
New 'Slayer:1 (iago)' desktop is Slayer:1

Starting applications specified in /usr/local/home/iago/.vnc/xstartup
Log file is /usr/local/home/iago/.vnc/Slayer:1.log

The :1 tells you it's running on port 5901, and using display :1.

If that's not your problem, try these two things:
1) Get a portscanner (nmap -- www.insecure.org) and scan the vnc computer from the other computer.  Make sure it sees the appropriate port as open (5900 or 5901).  If you're seeing that as open, then..

2) Load up a packet sniffer, like ethereal or tcpdump.  Then try to connect with vnc, and see what happens.  Then you'll see if it's going for the wrong port or whatever.


Hope that helps.

KiWi

#4
For nmap, would: nmap -p 5900-5901 192.168.123.87
be the correct command?  If so, I get a message saying:


nmap -p 5900-5901 192.168.123.87

Starting nmap 3.75 ( http://www.insecure.org/nmap ) at 2005-01-22 11:21 US Mount
ain Standard Time
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0

Nmap run completed -- 1 IP address (0 hosts up) scanned in 4.141 seconds



Didn't think I need to try step two at that point...

The following is what I get when I start up VNCServer

[root@sm1le ~]# vncserver

New 'sm1le.localdomain:13 (root)' desktop is sm1le.localdomain:13

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/sm1le.localdomain:13.log

[root@sm1le ~]#



And this is my log file for VNCServer:

Sat Jan 22 11:25:09 2005
vncext:      VNC extension running!
vncext:      Listening for VNC connections on port 5913
vncext:      Listening for HTTP connections on port 5813
vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!


iago

Ok, it's started on :13.  So on your vnc server, specify :13. 

And if you get that error on nmap, it means the computer isn't responding to pings and you shoudl specify the -P0 flag.

KiWi

What... what exactly do you mean by "specify: 13"? on the VNC Server?

iago

I mentioned it in my first post.  Because it says it's starting vnc on "sm1le.localdomain:13", it's running on the 13th port.  To tell vncviewer that, you want to tell it to connect to 192.168.123.87:13

KiWi

Sorry about that, didn't quite understand it when you first posted it.

Anyways, when I telling VNCViewer to connect to 192.168.123.87:13, I get an error message saying the following:
unable to connect to host: A socket operation was attempted to an unreachable host. (10065)

:/  Same problem as before.

iago

Hmm..

with your VNCServer running, nmap the server:
nmap -P0 -p 5800-6000 <ip>

See what port it's running on.

KiWi

Sorry the delayed reply, I've been pretty busy lately.

Anyways, not sure, but after just a tons of screwing around, it just randomly worked >_<'

Thanks for the help.