Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 112

Thread: HOWTO: Set up VNC server with resumable sessions

  1. #1
    Join Date
    Jun 2006
    Location
    Belgium
    Beans
    5
    Distro
    Ubuntu 6.06

    Lightbulb HOWTO: Set up VNC server with resumable sessions

    Set up VNC server with resumable sessions on dapper (6.06)


    1. Enable XDMCP

    Code:
    sudo gedit /etc/gdm/gdm.conf
    then find this rule:
    # The greeter for xdmcp logins, usually you want a less graphically intensive
    # greeter here so it's better to leave this with gdmlogin
    # RemoteGreeter=/usr/lib/gdm/gdmlogin

    remove the '#' in the last line so there should be:

    # The greeter for xdmcp logins, usually you want a less graphically intensive
    # greeter here so it's better to leave this with gdmlogin
    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

    2. Install required packages (vncserver and xinetd)

    Code:
    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:

    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


    3. Set the VNC passwd
    Code:

    Code:
    sudo vncpasswd /root/.vncpasswd

    4. Add vnc service to xinetd:
    Code:
    Code:
    sudo gedit /etc/xinetd.d/Xvnc
    Enter this into the new file:

    Code:
    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 }
    5. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)

    Code:
    Code:
    sudo /etc/init.d/xinetd stop sudo killall Xvnc sudo /etc/init.d/xinetd start

    6. That's it! To test that this is working first try to connect from the same machine (the machine we just set up the VNC server on):

    Code:
    Code:
    vncviewer localhost:1
    You should be prompted for the VNC password, and then see the GDM login screen where you can login and start a new X session. If that works, you can now go ahead and try to connect from remote machine using your favorite VNC client (remember to first close the local vncviewer we started above). Remember to use the VNC server machine's domain name or IP address, followed by :1 (e.g. 192.168.0.100:1). If connecting locally as shown above works, but connecting remotely fails, then this means you have a problem with a firewall which is blocking some ports. See the notes below about how to deal with that.

    Note about ports: The VNC server set up as shown uses TCP port 5901. If you are using firewall software (e.g. firestarter) on that machine, you need to allow incoming connections on this port. If you are using a router which assigns your machine a private address (e.g. 192.168.0.100) which is not accessible from the internet, then you need to forward TCP port 5901 from the router to this machine.

    Note about security: This setup allows any user to start an X-session remotely by logging in using his regular password (after starting the VNC connection using the VNC password), so if the user disconnects without logging out, any other user which knows the VNC password can connect afterwards and resume the same session that the first user started. So if you do not want to log out before disconnecting, it's advisable to at least lock your VNC X-session screen. Also note that while a remote user is connected thru VNC, no other connection will be accepted. An idle VNC client will be disconnected after one hour, but this can be changed by using the "-IdleTimeout" option in the server_args line in /etc/xinetd.d/Xvnc. For example, you can add "-IdleTimeout 300" to change it to 5 minutes.




    ps. This was copy/pasted from a few posts made by Tichondrius and elemental666. I simply putted them together and tested everything! It works here for me now.

    If questions just post

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

    Re: HOWTO: Set up VNC server with resumable sessions

    you missed a step:

    enable remote login
    system -> administration -> login Window
    remote tab
    choose "same as local" (or whatever?)

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

    Re: HOWTO: Set up VNC server with resumable sessions

    but I can't get mine working

    when I do: "vncviewer localhost:1"

    I get:
    vncviewer: ConnectToTcpAddr: connect: Connection refused
    Unable to connect to VNC server


    ideas?

  4. #4
    Join Date
    Dec 2005
    Beans
    4

    Re: HOWTO: Set up VNC server with resumable sessions

    The problem is with the formatting of the text, if you blindly copy(which I did), it doesn't work. Here is the same code formatted for those who like to copy and paste:

    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
    }

  5. #5
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: HOWTO: Set up VNC server with resumable sessions

    OK. I've been trying to do this for about 5 hours now and still can't get this to work.

    When I run vncviewer I just get a window with an X session running and nothing else (no terminal window, no window manager, no login screen. Just a gray background with an "X" cursor). How do I get the login manager, gnome, etc. to come up running in the vncserver???????


    On another question:
    Eventually I would like to set this up so I can tunnel VNC over SSH. I have SSH working, but is there any way to tell the vncserver only to accept connections coming in over SSH?

  6. #6
    Join Date
    Feb 2006
    Beans
    5,714

    Re: HOWTO: Set up VNC server with resumable sessions

    having the same problem here with the greybackground and x. any help would be appreciated
    Debian Testing(64bit) + XFCE4 AM2 5200+ ATI Radeon HD4350, 4gig RAM,320Gig and 750gig HDs

    what's the difference between an answer and a solution? An answer is what they want to hear, a solution is what they don't want to hear

  7. #7
    Join Date
    Dec 2005
    Beans
    4

    Re: HOWTO: Set up VNC server with resumable sessions

    OK, I had the same problem before until I performed the following

    System->Administration->Login Window
    Click on Remote Tab
    Changed style to "Same as Local"
    Click on the "Configure XDMCP..." buton
    Uncheck "Honor indirect request"
    Click Close on both windows

    reboot

    NOTE: I have both vncserver and vnc4server on my pc.

    Far as the SSH session I typically use openssh or putty on a remote machine
    I connect to the ssh server running on the Ubuntu box and create a local mapping
    by using a local port address mapped to the IP:VNC Port the Ubuntu box
    Then simply run your vnc client by connecting to "Localhost"LocalPort"

    Hope that helps

  8. #8
    Join Date
    Feb 2006
    Beans
    5,714

    Re: HOWTO: Set up VNC server with resumable sessions

    that got it for me, thanks alot
    Debian Testing(64bit) + XFCE4 AM2 5200+ ATI Radeon HD4350, 4gig RAM,320Gig and 750gig HDs

    what's the difference between an answer and a solution? An answer is what they want to hear, a solution is what they don't want to hear

  9. #9
    Join Date
    Jun 2006
    Beans
    Hidden!

    Re: HOWTO: Set up VNC server with resumable sessions

    Thanks! A reboot worked for me. Guess I've been using a Mac too long.....

  10. #10
    Join Date
    Jun 2006
    Beans
    22

    Re: HOWTO: Set up VNC server with resumable sessions

    I'm trying to set this up with Ultra vncviewer in Windows xphome and Xvnc in Ubuntu as server. I've followed these instructions. I open Ultra vncviewer on my Windows and I get "Failed to get server address". I am not sure whether it's relevant but the Port Ultra Vnc uses is 5900. I tried it also with the last line in the edit above changed from 5901 to 5900, but still the same result. Is there something I should have done before this page of instructions? Is there something I can check? Thanks.

Page 1 of 12 12311 ... LastLast

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
  •