Find the answer to your Linux question:
Results 1 to 5 of 5
i know there are several sites to help with setting up vnc between linux and windows, but i can never see anything real specific for vnc to work between the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    32

    Windows and FC4 VNC


    i know there are several sites to help with setting up vnc between linux and windows, but i can never see anything real specific for vnc to work between the 2. i hope you guys can help me out.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,807
    Which way are you trying to do this? To start vnc server on windows, install the service, and connect to it from Linux using 'vncviewer [host]:0'.

    To turn on the vnc server in FC4, you need to edit the file /etc/sysconfig/vncservers to add a screen for each user you want the vnc server for (you can work more than one), then start the vnc server service ('service vncserver start'). Dont forget to add this service to your current runlevel if you need it starting automatically at bootup. Dont forget to set the password using vncpasswd for each user.

    Then from windows, you just need to connect using the viewer, and type [hostname]:[screennum] in the connect box, and type in the correct password.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux Newbie
    Join Date
    Nov 2002
    Posts
    139
    This is what I did on FC4 I am logging as root (I know the security implication)
    First:
    [root@localhost ~]# rpm -q --info vnc-server
    Code:
    Name        : vnc-server                   Relocations: (not relocatable)
    Version     : 4.1.1                             Vendor: Red Hat, Inc.
    Release     : 10                            Build Date: Wed 27 Apr 2005 10:44:11 AM GST
    Install Date: Wed 15 Feb 2006 11:53:50 PM GST      Build Host: decompose.build.redhat.com
    Group       : User Interface/X              Source RPM: vnc-4.1.1-10.src.rpm
    Size        : 3054396                          License: GPL
    Signature   : DSA/SHA1, Fri 20 May 2005 10:28:29 PM GST, Key ID b44269d04f2a6fd2Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
    URL         : http://www.realvnc.com
    Summary     : A VNC server.
    Description :
    The VNC system allows you to access the same desktop from a wide
    variety of platforms. This package is a VNC server, allowing others to
    access the desktop on your machine.



    Second:
    The gedit /etc/sysconfig/vncserver
    Code:
    # The VNCSERVERS variable is a list of display:user pairs.
    # Uncomment the lines below to start a VNC server on display :2
    # as my 'myusername' (adjust this to your own).  You will also
    # need to set a VNC password; run 'man vncpasswd' to see how
    # to do that.
    # DO NOT RUN THIS SERVICE if your local area network is
    # untrusted!  For a secure way of using VNC, see
    # <URL:http://www.uk.research.att.com/vnc/sshvnc.html>.
    #zillah uncomment VNCSERVERS="2:myusername"
    VNCSERVERS="2:root"
    #zillah uncomment VNCSERVERARGS[2]="-geometry 800x600"
    VNCSERVERARGS[2]="-geometry 800x600"
    



    Third:
    [root@localhost ~]# vncpasswd root
    Password:
    Verify:


    Fourth:
    [root@localhost ~]# vncserver
    Code:
    New 'localhost.localdomain:2 (root)' desktop is localhost.localdomain:2
    
    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/localhost.localdomain:2.log

    then start the vnc server service ('service vncserver start').
    Is this command same as vncserver ?
    Then I run as well
    [root@localhost ~]# service vncserver start
    Starting VNC server: 2:root A VNC server is already running as :2


    Then from windows, you just need to connect using the viewer, and type
    [hostname]:[screennum] in the connect box, and type in the correct
    I could not find the option that you was pointing , could you please look at this and let me what I missed?
    Code:
    http://img273.imageshack.us/img273/8994/vncviewer5vn.jpg

    The error message that I received when I typed in the ip address for the address is below:
    Code:
    VNC Viewer: 198.222.168.189:Error
    unable to connect to host: The requested address is not valid in its context.(10049)

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,807
    Ok, in your step marked 'fourth', you dont have to run both 'vncserver' and 'service vncserver start' - the first way just executes the vncserver, the second way starts vncserver as a server process in the background. The second way is the preferred option.

    What is happening here is that whenever you try to connect, it seems to be struggling to locate the machine, or it is struggling to connect thorugh some local firewall.

    Things to check:

    That you're connecting by the right IP address (on the same machine, i.e. the right place to test that it's working, it should be enough to just connect to ':2' without specifying the machine name).

    Check your firewall settings on the linux machine - if the machine is rejecting connections on port 5902 (the port for vncserver screen :2), then you wont be able to see the screen.

    So, test it on the same machine first (using vncviewer from linux), then check that you can connect to the machine on that port by using the windows vnc client viewer with the right address or hostname for the linux computer.
    Linux user #126863 - see http://linuxcounter.net/

  5. #5
    Linux Newbie
    Join Date
    Nov 2002
    Posts
    139
    it should be enough to just connect to ':2' without specifying the machine name
    I fogot to tell you that I have done this :
    Code:
    vncviewer 127.0.0.1:2
    It worked.

    Check your firewall settings on the linux machine - if the machine is rejecting connections on port 5902
    How can i ckeck this (port) ?
    May be I forgot to tell you that I have done this as well :
    I am using FC4. The fix for me was that the default iptables (i think
    thats the firewall settings) were preventing incoming VNC connections.
    To overcome this in gnome i went to Desktop>System Settings>Server Settings>Services There I stopped iptables - and immediately I was able to connect!
    Resource :
    Code:
    http://www.redhat.com/archives/rhl-list/2005-July/msg05595.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •