LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2009, 12:51 AM   #1
RamitGulati
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
starting vnc viewer using putty


Hi,

I have TightVNC Viewer client installed on my window system and I am able to connect with other Linux PC using that.

But my requirement is to run VNC viewer session from the putty.

I tried and follows the below link but it does not helps
http://www.tech-recipes.com/rx/262/c...ty-ssh-tunnel/

I did the following setting in the putty before starting the session:
Source port: 5900
Destination: <linux-machine IP>:5900

but getting the error:
Error: Can't open display:

Please help me out

Thanks
 
Old 02-19-2009, 01:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
is your putty session fully logged in? does "netstat -plnt" on the linux box show 5900 listening? you shouldn't need to put in the linux machine ip there. try just using 127.0.0.1 instead, as from the server perspective your connecting to itself, not a 3rd machine on the network. I assume.
 
Old 02-19-2009, 03:52 AM   #3
RamitGulati
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for replying, I really need this:

> is your putty session fully logged in?
Not clear, what do you mean by fully logged in?

> does "netstat -plnt" on the linux box show 5900 listening?
I did "netstat -plnt" but it did not show 5900 listening.
How can i know which port to use??
I tried with 5904 which I am able to see.

tcp 0 0 0.0.0.0:5904 0.0.0.0:* LISTEN 14901/Xvnc

I need to connect with Linux machine using putty which should having the vnc viewer session. I hope i am clear with my requirements

thanks
 
Old 02-19-2009, 04:06 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok well with putty you need to log in over ssh. have you?

and if nothing is listening on port 5900 there's not much point tunnelling it is there? try 5904 then... that's clearly a VNC session of some sort.
 
Old 02-19-2009, 04:35 AM   #5
RamitGulati
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Original Poster
Rep: Reputation: 0
1. yes I tried that(5904)but getting the same error
2. yes, I logged in over ssh.

I tried with

1. deleting the file /tmp/.X0-lock
2. then I typed "vncserver" on putty after connecting with my Linux pc as host name.
3. It prompts me for password and I am connected to my Linux machine

Below is the sample commands which i entered in the putty:
------ [Start]-------
l-17154:~ # vncserver

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n

New 'X' desktop is l-17154:6

Creating default startup script /home/wcsadmin/.vnc/xstartup
Starting applications specified in /home/wcsadmin/.vnc/xstartup
Log file is /home/wcsadmin/.vnc/l-17154:6.log

l-17154:~
------ [Stop]-------

Let me explain my main problem in detail:
1. I have installed firefox on my linux machine.
2. From my window machine I used VNC Viewer Client to connect my linux machine.
3. I opened the terminal and able to run the firefox script(./firefox) which will open the firefox browser.

All this is fine but now I want to run the same script from my windows machine using putty.
In other words i need to run the script(./firefox) from putty only but how can I open the browser.

I guess if I have the vnc session in putty then i can do this.

Thanks
 
Old 02-22-2009, 01:41 PM   #6
rachala2
LQ Newbie
 
Registered: Jan 2009
Distribution: RHEL 4, Centos
Posts: 7

Rep: Reputation: 0
Hi Ramitgulati,

I am also the new to linux, i am using RHEL release 4

i used to follow these steps for connecting VNC using putty for my linux machine from windows xp,

first i login into my linux machine,

i run this command in terminal,

vncserver -geometry 1100x800 -depth 24

next i check for port number by using this command

ps -aef | grep vnc

it will show port number like Xvnc:11(it is the port number for your session)

next open vncviewer,

<ip address>:11

it will ask for passwd if it connects successfully, otherwise it will show error

enter your passwd, it will open vnc session window of your linux desktop

-RAJESH
 
Old 02-22-2009, 02:19 PM   #7
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Session 0... my VNCserver starts at 1, not 0... maybe it could be defined but I'd try tunneling 5901 perhaps... Anyway. My advice is to kill all the displays and start a fresh one, note it's display number (likely 1) then try to tunnel to that specific port using the 59xx (01 for 1) port in the tunnel. Also makesure in Putty when you put in the tunnel information you actually do add it as a tunnel after entering the data.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC Viewer jessica_lilly Linux - Software 2 03-02-2008 04:24 PM
VNC connection to SUSE Linux 10 from a Windows XP VNC Viewer determin2excel Linux - Software 13 10-03-2007 09:38 AM
vnc viewer how to ? ashintoms Linux - Networking 2 07-25-2007 06:43 AM
VNC Viewer Magikx21 Linux - Networking 4 04-27-2005 11:51 PM
VNC Viewer scottpioso Linux - General 11 03-10-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration