Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42

Thread: HOW TO: setup vnc4server

  1. #1
    Join Date
    Jan 2006
    Location
    Moncton, N.B., Canada
    Beans
    128
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Post HOW TO: setup vnc4server

    (a bunch of this was taken from L4mp's guide, with sirspiddy's input, all of which appears to be adapted from Tichondrius' guide. I've just defragged and recompiled them to form this

    The HOW TO: setup vnc4server guide

    this is for those of you who agree that 'remote desktop' is too slow, and freenx is too complicated.

    ############ Begin ############

    1) setup XDMCP:
    click System -> Administration -> Login Window
    click Remote tab
    select "Same as Local"
    click Configure XDMCP
    remove check from Honour indirect requests

    2) configure remote greeter:
    Code:
    sudo gedit /etc/gdm/gdm.conf
    find this line:
    Code:
    # RemoteGreeter=/usr/lib/gdm/gdmlogin
    replace with:
    Code:
    RemoteGreeter=/usr/lib/gdm/gdmlogin
    Note: Before doing the next step, you need to make sure the extra repositories (e.g. universe) are enabled:
    http://easylinux.info/wiki/Ubuntu#Ho...a_repositories

    3) Install required packages:
    Code:
    sudo apt-get install vnc4server xinetd
    Note to AMD64 users: The current version of vnc4server in the repositories has a bug, so you need to download and install the fixed vnc4 packages as shown below:
    Code:
    wget http://qt1.iq.usp.br/download/vnc4server_4.0-7.3_amd64.deb wget http://qt1.iq.usp.br/download/xvnc4viewer_4.0-7.3_amd64.deb sudo dpkg -i vnc4server_4.0-7.3_amd64.deb sudo dpkg -i xvnc4viewer_4.0-7.3_amd64.deb
    4) Set the VNC passwd:
    Code:
    sudo vncpasswd /root/.vncpasswd
    5) Define the VNC service criteria:
    Code:
    sudo gedit /etc/xinetd.d/Xvnc
    and copy this into it:
    Code:
    service Xvnc
    {
            type = UNLISTED
            disable = no
            socket_type = stream
            protocol = tcp
            wait = yes
            user = root
            server = /usr/bin/Xvnc
            server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
            port = 5901
    }
    save and exit

    6) Reinitialize the service with new criteria:
    Code:
    sudo /etc/init.d/xinetd stop
    sudo killall Xvnc
    sudo /etc/init.d/xinetd start
    7) Test the connection:
    Code:
    vncviewer localhost:1
    ############ you're done ############

    what this whole thing accomplishes is that you can connect to the desktop using a different session than the local desktop. IE someone can be sitting there working on that computer, and you can also login and work on that computer at the same time without interference. (even under the same user ID)

    NOTE:
    If you change the port in step 5) to something else, it changes what you use to connect to the server. I personally chose port 5959 - so when I connect to my Ubunutu box using RealVNC on Windows XP I type: 192.168.0.101:5959

  2. #2
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Beans
    3
    Distro
    Kubuntu 6.06

    Re: HOW TO: setup vnc4server

    I am a Linux noob, although I have successfully installed Dapper server. I have installed KDE for the gui, and the server is connected to the network (printing and internet are fine). I can also remote from a Windows XP desktop to the Ubuntu server (Kubuntu? since it is KDE?) using Putty for the command line, but I am having trouble configuring vnc4server.

    Using the Adept package manager, I have installed the vnc4server package, but when I attempt to follow your instructions, I can't get past step 1.

    -----
    1) setup XDMCP:
    click System -> Administration -> Login Window
    click Remote tab
    select "Same as Local"
    click Configure XDMCP
    remove check from Honour indirect requests
    ------

    Under System, I do not see anything named Administration, and when I go to
    System Settings > System Administration > Login Manager
    I do not see either a remote or security (as mentioned by Tichondrius) tab.

    Did I do something wrong on my install? Are these tabs not showing because of KDE?

    Thank you in advance for your help.

    Scaramanga19
    Last edited by Scaramanga19; June 19th, 2006 at 07:50 PM.

  3. #3
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

  4. #4
    Join Date
    Oct 2006
    Beans
    31

    Re: HOW TO: setup vnc4server

    Following these steps I still can't get it to work.

    When I ran the command on the local machine in Terminal I get the following error:

    ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)


    Anyone know what that means?

    I've tried connecting over the LAN with UltraVNC and RealVNC and get the same text in the error but the code is 10054 instead.
    [Mutter! Grumble... Cough! Splutter. Mumble...]

  5. #5
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

    Re: HOW TO: setup vnc4server

    Quote Originally Posted by UncleB View Post
    Following these steps I still can't get it to work.

    When I ran the command on the local machine in Terminal I get the following error:

    ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)


    Anyone know what that means?

    I've tried connecting over the LAN with UltraVNC and RealVNC and get the same text in the error but the code is 10054 instead.
    Are you running Beryl on your computer? If so, try setting your session back to Gnome instead of XGL.

    -Dave

  6. #6
    Join Date
    Oct 2006
    Beans
    31

    Re: HOW TO: setup vnc4server

    I presume not. I've not done anything to choose Beryl. I should be on hte default. Actually
    checking on the login session options I am on Gnome.

    It's an oldish Compaq M300 with a 4MB graphics card. Isn't Beryl for those with fancier graphics?

    I'm new by the way. Could you tell?
    [Mutter! Grumble... Cough! Splutter. Mumble...]

  7. #7
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

    Re: HOW TO: setup vnc4server

    Quote Originally Posted by UncleB View Post
    I presume not. I've not done anything to choose Beryl. I should be on hte default. Actually
    checking on the login session options I am on Gnome.

    It's an oldish Compaq M300 with a 4MB graphics card. Isn't Beryl for those with fancier graphics?

    I'm new by the way. Could you tell?
    Definitely not Beryl in your case. Can you post the output of the following command:

    Code:
    netstat -a | grep 5900
    This is the output from my computer:

    Code:
    dbott@thedrake:~/Desktop$ netstat -a | grep 5900
    tcp        0      0 *:5900                  *:*                     LISTEN
    You can see that my computer is LISTENing on port 5900. You should see the same. If you don't, then VNC server is not running. You could also type the command:
    Code:
    netstat -l
    to display all listening ports:
    Code:
    dbott@thedrake:~/Desktop$ netstat -l
    netstat -l
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State
    tcp        0      0 localhost:36483         *:*                     LISTEN
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN
    tcp        0      0 *:5900                  *:*                     LISTEN
    tcp        0      0 localhost:32878         *:*                     LISTEN
    tcp        0      0 *:ssh                   *:*                     LISTEN
    tcp        0      0 localhost:ipp           *:*                     LISTEN
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN
    udp        0      0 192.168.1.10:netbios-ns *:*
    udp        0      0 *:netbios-ns            *:*
    udp        0      0 192.168.1.1:netbios-dgm *:*
    udp        0      0 *:netbios-dgm           *:*
    udp        0      0 *:bootpc                *:*
    Active UNIX domain sockets (only servers)
    Proto RefCnt Flags       Type       State         I-Node Path
    unix  2      [ ACC ]     STREAM     LISTENING     18720    @/tmp/dbus-j3ImguWDBu
    unix  2      [ ACC ]     STREAM     LISTENING     10309    /var/run/dbus/system_bus_socket
    unix  2      [ ACC ]     STREAM     LISTENING     10106    /var/run/acpid.socket
    unix  2      [ ACC ]     STREAM     LISTENING     70523    /var/run/cups/cups.sock
    unix  2      [ ACC ]     STREAM     LISTENING     10332    @/tmp/hald-local/dbus-kLl8rXGBiW
    unix  2      [ ACC ]     STREAM     LISTENING     11521    /tmp/.gdm_socket
    unix  2      [ ACC ]     STREAM     LISTENING     18089    /tmp/.X11-unix/X0
    unix  2      [ ACC ]     STREAM     LISTENING     18715    /tmp/ssh-PwxRMR7351/agent.7351
    unix  2      [ ACC ]     STREAM     LISTENING     14582    /tmp/orbit-dbott/linc-1769-0-444ecf0b2d074
    unix  2      [ ACC ]     STREAM     LISTENING     18734    /tmp/orbit-dbott/linc-1cb7-0-24f72eed1a12f
    unix  2      [ ACC ]     STREAM     LISTENING     10333    @/tmp/hald-runner/dbus-w61xwI0mwJ
    unix  2      [ ACC ]     STREAM     LISTENING     18751    /tmp/.ICE-unix/7351
    unix  2      [ ACC ]     STREAM     LISTENING     18760    /tmp/keyring-6bRQyW/socket
    unix  2      [ ACC ]     STREAM     LISTENING     18773    /tmp/orbit-dbott/linc-1ceb-0-2fe88cbd43bf9
    unix  2      [ ACC ]     STREAM     LISTENING     18789    /tmp/.esd-1000/socket
    unix  2      [ ACC ]     STREAM     LISTENING     19391    /tmp/orbit-dbott/linc-1d5c-0-5704060d21853
    unix  2      [ ACC ]     STREAM     LISTENING     18812    /tmp/orbit-dbott/linc-1cf1-0-379a39fac12d3
    unix  2      [ ACC ]     STREAM     LISTENING     11963    /var/run/sdp
    unix  2      [ ACC ]     STREAM     LISTENING     18830    /tmp/orbit-dbott/linc-1cf5-0-2de97d3d79d3
    unix  2      [ ACC ]     STREAM     LISTENING     18943    /tmp/orbit-dbott/linc-1cfe-0-25620bef79615
    unix  2      [ ACC ]     STREAM     LISTENING     18987    /tmp/orbit-dbott/linc-1d02-0-25620befbede9
    unix  2      [ ACC ]     STREAM     LISTENING     19018    /tmp/orbit-dbott/linc-1d06-0-bcac6262e89d
    unix  2      [ ACC ]     STREAM     LISTENING     19044    /tmp/orbit-dbott/linc-1d08-0-bcac626600d5
    unix  2      [ ACC ]     STREAM     LISTENING     19137    /tmp/mapping-dbott
    unix  2      [ ACC ]     STREAM     LISTENING     19070    /tmp/orbit-dbott/linc-1d12-0-652fb0f97a2d6
    unix  2      [ ACC ]     STREAM     LISTENING     19119    /tmp/orbit-dbott/linc-1d0a-0-79b3a65bd0042
    unix  2      [ ACC ]     STREAM     LISTENING     19176    /tmp/orbit-dbott/linc-1d29-0-2fa3f7f5d3776
    unix  2      [ ACC ]     STREAM     LISTENING     19232    /tmp/orbit-dbott/linc-1d31-0-1d906a667bffd
    unix  2      [ ACC ]     STREAM     LISTENING     19267    /tmp/orbit-dbott/linc-1d33-0-40d3a7c028a0d
    unix  2      [ ACC ]     STREAM     LISTENING     63960    /tmp/xmms_dbott.0
    unix  2      [ ACC ]     STREAM     LISTENING     19307    /tmp/orbit-dbott/linc-1d39-0-ae924744a342
    unix  2      [ ACC ]     STREAM     LISTENING     63393    /tmp/orbit-dbott/linc-2ac9-0-7683ffad52a
    unix  2      [ ACC ]     STREAM     LISTENING     39077    /tmp/orbit-dbott/linc-d3f-0-6301cb7040c60
    unix  2      [ ACC ]     STREAM     LISTENING     54392    /tmp/orbit-dbott/linc-6fbe-0-6d169ab9da712
    A little background to help you with some of these terms. The netstat command prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. The -a indicates "show all" connections (the -l is "listening" ports). We then 'pipe' the first commands output over to the grep command (General Regular Expression Print) which searches for a particular term (in this case, the port number that VNC is supposed to listen on --- 5900). If you just type 'netstat' by itself, you'll see pages and pages of stuff go scrolling on by.

    You'll see the <command> | grep <term> used a lot in the forums as it allows you to quickly search for information in a long file.

    -Dave
    Last edited by dbott67; March 9th, 2007 at 08:47 PM.

  8. #8
    Join Date
    Oct 2006
    Beans
    31

    Re: HOW TO: setup vnc4server

    Hi,

    Thanks for taking the time.

    I have been trying to get it going on 5901 so I edited your command. Here are the results:

    tcp 0 0 *:5901 *:* LISTEN
    [Mutter! Grumble... Cough! Splutter. Mumble...]

  9. #9
    Join Date
    Mar 2005
    Location
    Canada
    Beans
    1,595

    Re: HOW TO: setup vnc4server

    Okay, so this means that you have to instruct vncviewer to connect on port 5901 (if you don't specify the port, it defaults to 5900).

    The command would be:
    Code:
    vncviewer ip.address.of.server:5901
    -Dave

  10. #10
    Join Date
    Oct 2006
    Beans
    31

    Re: HOW TO: setup vnc4server

    That's what I thought but it still comes up with that same error only with a different code when it's a different machine on my LAN.

    I've tried with 5901, 1 (for session 1) and nothing hoping it would default but none of those three work...
    [Mutter! Grumble... Cough! Splutter. Mumble...]

Page 1 of 5 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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