# VNC problems...please help



## new_to_vnc (Jun 19, 2008)

I need to use VNC to connect my Linux computer (Fedora Core 5) to my windows computer. For the most part I followed the following tutorial: http://www.linuxtopia.org/HowToGuides/VNC_setup_Linux_Windows.html.
Everything seems to be working until the very last step : launching the VNC viewer.

I would greatly appreciate if you could help me out. Thanks in advance.

Here is what I did:

1.on FC5 computer: downloaded and installed vnctightserver from http://www.tightvnc.com/download.html and ran the command vncpasswd, and specified the password.
2. on FC5 computer: ran the command vncserver and got the following message: 
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1 
Starting applications specified in root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

3. On FC5 computer: modified the xstartup file:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

to look like this:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startkde &

4. On Windows computer: installed vnctightviewer from http://www.tightvnc.com/download.htm
5. On Windows computer: installed PuTTY from http://www.putty.nl/download.html

6. opened PuTTY and typed in the IP address (later on also tried localhost.localdomain, and localhost.localdomain:1, but that didn’t work either)


7. Then filled the following out: soureceport: 5901, destination : localhost:5901(later also tried the following for destination: localhost.localdomain, localhost.localdomain:1, localhost:1, and also tried checking the local radio button under the destination, but it still didn’t work)


8. Then saved the session:
and clicked “open”
9. got a login window, entered the required info, and apparently logged in, and looked through some files- yep, it’s the right computer:

10. everything seems to be fine right up to this point: I open the tightvnc viewer and try to connect
I try the following: localhost:1, localhost.localdomain:1, 
localhost.localdomain, localhost.localdomain:5901, etc. But there is always the same message: failed to connect with server

11. On FC5 computer: I look at localhost.localdomain:1.log, and it says the following:
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'

Xvnc Free Edition 4.1.2 - built May 12 2006 17:42:24
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc


Thu Jun 19 10:16:40 2008
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
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/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

Fatal server error:
could not open default font 'fixed'
/usr/bin/xsetroot: unable to open display 'localhost.localdomain:1'
xrdb: Connection refused
xrdb: Can't open display 'localhost.localdomain:1'
xmodmap: unable to open display 'localhost.localdomain:1'
xsetroot: unable to open display 'localhost.localdomain:1'
xset: unable to open display "localhost.localdomain:1"
xset: unable to open display "localhost.localdomain:1"
xsetroot: unable to open display 'localhost.localdomain:1'
startkde: Starting up...
ksplash: cannot connect to X server localhost.localdomain:1
kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
kded: cannot connect to X server localhost.localdomain:1
DCOP aborting call from 'anonymous-4264' to 'kded'
kcminit: cannot connect to X server localhost.localdomain:1
ksmserver: cannot connect to X server localhost.localdomain:1
startkde: Shutting down...
klauncher: Exiting on signal 1
sound server terminated
startkde: Running shutdown scripts...
startkde: Done.

I tried to use a windows laptop as a viewer too, but i get exactly the same messages... 

thanks in advance...


----------



## djaburg (May 15, 2008)

First thing I see wrong is that you CAN'T connect to another computer using localhost since localhost tells the program that you want to connect to yourself. The only thing that you should be using when connecting from Windows to your Linux box is the IP address. Running PuTTY is good for using SSH to get a console session on the linux box, but that doesn't necessarily mean that you have a valid configuration for your VNC server. 

The first thing that I'd test on the Linux box is whether you can run a GUI on it. Have you started the GUI (startx) with either KDE or Gnome or whatever desktop you're standardizing on? If not, I'd start there. 

Just out of curiosity, what do you need to run VNC for, controlling it or just for playing around? If you can use PuTTY and login via the shell, then you have most of what you need to administer it. If you need a gui to help administer it remotely then I'd look at running something like Webmin, it is simple to install and easy to use.


----------



## new_to_vnc (Jun 19, 2008)

I have KDE... And i need VNC for controlling.
So, how exactly am i supposed to connect via tightVNC... What do i need to type in, and where...
Sorry for the basic questions, but i need to have is set up by tommorow...
By the way, thanks for your quick reply.


----------



## djaburg (May 15, 2008)

When you fire up the VNC viewer, you are asked for the computer name or the IP address, that's what you need to use. Unless you're running SAMBA, you'd most likely need to use the IP address of the machine.


----------

