Connecting Problem with VNC server

Taking care of your Linux box.
Post Reply
xenoboy
Cadet
Posts: 11
Joined: Fri Dec 26, 2003 5:07 pm
Location: Karachi
Contact:

Connecting Problem with VNC server

Post by xenoboy »

salam .

I have linux 9 and VNC service is running on server . i have download VNC Client from realvnc.com. But when i try to connect to VNC server Error "Failed to connect to server"

help me plz

xenoboy
kernel-trap
Havaldaar
Posts: 105
Joined: Thu Dec 25, 2003 2:31 pm

Post by kernel-trap »

is your client is windows machine or linux

you cannot access linux desktop from windows machine


aslo telnet 192.168.1.1 8090

suppose this is VNC port

nmap localhost

i will tell which port are open on ur machine

Regards
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: Connecting Problem with VNC server

Post by LinuxFreaK »

Dear xenoboy,
Salam,
xenoboy wrote:I have linux 9 and VNC service is running on server . i have download VNC Client from realvnc.com. But when i try to connect to VNC server Error "Failed to connect to server"
you can start by making sure the vnc-server is running, that you don't have firewalling rules and whatnot, or even better, use ssh. or try to do

# netstat -a | grep 5900

If you don't find a 5900 reference? then VNC Server is not running on Linux machine. other wise try to telnet to the Linux machine.

# telnet IPOfLinuxMachine 5900

If its not working then try to telnet from linux machine console..... If its not Connecting then Check it out that VNC Server is Running or not :)

Best Regards.
Last edited by LinuxFreaK on Wed Jan 07, 2004 9:12 am, edited 1 time in total.
Farrukh Ahmed
xenoboy
Cadet
Posts: 11
Joined: Fri Dec 26, 2003 5:07 pm
Location: Karachi
Contact:

Post by xenoboy »

kernel-trap wrote:is your client is windows machine or linux

you cannot access linux desktop from windows machine


aslo telnet 192.168.1.1 8090

suppose this is VNC port

nmap localhost

i will tell which port are open on ur machine

Regards


Dear i dont know how to open the port for VNC Server .. plz help me

xenoboy
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear xenoboy,
Salam,
xenoboy wrote:Dear i dont know how to open the port for VNC Server .. plz help me
Refer to the VNC HOWTO also check this out http://www.npereira.com/howto_vnc.html

Best Regards.
Farrukh Ahmed
jargon
Lieutenant Colonel
Posts: 691
Joined: Mon Oct 13, 2003 9:40 am

Post by jargon »

This is very easy to do...
Assuming that you dont have any firewall settings or what not.

Make sure you have the vnc-server and ssh installed - which you said you did.

Now kill all running vnc processes in the background, lets do it fresh.

Also have ssh daemon running on the linux box.

Now on the windows box you should have a copy of realVNC and Putty.
Get Putty here -> http://www.chiark.greenend.org.uk/~sgtatham/putty/
(its a great tool , make sure to select 'ssh' if you intend to ssh into your box).

Use Putty to ssh into the linux box, and as root run the 'vncserver' command.

It will then print out and tell you where the server is running. If its the first process of vncserver you will see something like ':1' in the printout.

This will tell you that its on port 5901. vnc normally runs on port 5900. but since vncserver told you ':1' you add one and use port 5901.

Then use realVNC and it will ask you the ip address, you will tell it 192.168.1.100:5901 , (where 192.168.1.100 is your ip address).

and then it will ask for a password which will be the same password you used when you setup vncserver on your linux box, in other words the first time you run/ran vncserver as root on your linux box it asks for a password, use that to connect realVNC to your linux box.

This works , and should easily work if you have RH9,

And when you are done kill the process via putty with
#: vncserver -kill :1

P.S.
You could substitute ssh with telnet obviously, but why? telnet is useless nowadays, why not encrypt everything.
jargon
kernel-trap
Havaldaar
Posts: 105
Joined: Thu Dec 25, 2003 2:31 pm

Post by kernel-trap »

xenoboy wrote:
kernel-trap wrote:is your client is windows machine or linux

you cannot access linux desktop from windows machine


aslo telnet 192.168.1.1 8090

suppose this is VNC port

nmap localhost

i will tell which port are open on ur machine

Regards


Dear i dont know how to open the port for VNC Server .. plz help me

xenoboy
salam

the software open port automatically
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear xenoboy,
Salam,

Mr.Jargon gave you the solution as well as i :D Please do as i said and if there is any issue regarding VNC then post here :)

Best Regards.
Farrukh Ahmed
shakirz1
Battalion Quarter Master Havaldaar
Posts: 207
Joined: Sat Aug 09, 2003 5:00 pm
Location: Karachi
Contact:

Connecting Problem with VNC server

Post by shakirz1 »

at server when you enter this command vncserver, its show you session no like this :1 or so what.

Then use realVNC and it will ask you the ip address, you will tell it 192.168.1.100:1 , (where 192.168.1.100 is your ip address and :1 is session no ).
farhantoqeer
Major General
Posts: 917
Joined: Thu Jun 27, 2002 5:45 pm
Location: Karachi
Contact:

Post by farhantoqeer »

you cannot access linux desktop from windows machine
I used linux desktop from windows machine via vnc, it works same as you acces windows desktop from linux or linux desktop from other linux.
A: Yes
Q: Is top-posting bad?
jargon
Lieutenant Colonel
Posts: 691
Joined: Mon Oct 13, 2003 9:40 am

Re: Connecting Problem with VNC server

Post by jargon »

shakirz1 wrote:at server when you enter this command vncserver, its show you session no like this :1 or so what.

Then use realVNC and it will ask you the ip address, you will tell it 192.168.1.100:1 , (where 192.168.1.100 is your ip address and :1 is session no ).
Im pretty sure that you can't do :1 , it would however be 5901 when using the default port of 5900 for the vncserver.
jargon
Post Reply