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

Thread: HOWTO: Setting up a VNC to GDM connection

  1. #1
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    HOWTO: Setting up a VNC to GDM connection

    This howto is to show how to setup VNC to show a GDM login screen when you connect to your Ubuntu box, effectively using XDMCP over VNC. A VNC client is easier to get going on Windows than a X server for most people, so here's how to use it to connect to your linux box.

    I posted the instructions in another thread already, but decided to put them here as well so it's easier to find for everyone.

    First thing you'll need to do is enable the universe repositories: https://wiki.ubuntu.com//AddingRepositoriesHowto

    Then it's just five easy steps:
    1. System->Administration->Login Screen Setup
      Tab XDMCP->Enable XDMCP You can disable "Honor Indirect Requests"
      For kdm or even xdm, just look through the settings and find XDMCP, make sure it's enabled.
    2. sudo apt-get install vnc4server (comes from universe)
    3. Put the following line at the end of /etc/inetd.conf:
      Code:
      5900    stream  tcp     nowait  nobody  /usr/bin/Xvnc Xvnc -inetd -desktop=Server -query localhost -IdleTimeout 7200 -depth 16 -once securitytypes=none
      Replace "Server" with something you want the window title to be, usually the server name.
    4. sudo /etc/init.d/inetd restart
    5. Log out of your desktop (to restart gdm, xdm, or kdm)


    That's it! Try connecting from another machine using and see how it goes.

    If you need a VNC client for Windows, try out UltraVNC http://ultravnc.sf.net it's the one I prefer.

    For connecting from Linux vnc4viewer with tsclient work well.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  2. #2
    Join Date
    Jun 2005
    Location
    South England
    Beans
    4

    Cool Re: HOWTO: Setting up a VNC to GDM connection

    Excellent, i'd gone about things slightly different and set up a different user for each WM. This is a much simpler method.

    Although i did have a problem getting it to work initially, i changed the user from nobody to my usual user account in "/etc/inetd.conf" and it all worked fine. Will this present me any problems?

  3. #3
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: HOWTO: Setting up a VNC to GDM connection

    The problem I might be worried about is that if you're using "securitytypes=none" like I posted, and you are letting the Xvnc process run as yourself, you might have given people a way into your account without a password. But I haven't seen your configuration so you may be safe.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  4. #4
    Join Date
    Mar 2005
    Beans
    108

    Re: HOWTO: Setting up a VNC to GDM connection

    I tried this with my server install of ubuntu that has XDM on it, and it didn't seem to work. I assume that I didn't set up XDMCP properly on it. In Xaccess I uncommented the '*' line so it would allow any host, then I commented out the "DisplayManager.requestPort: 0" line in xdm-config to allow connections. Then I followed your howto. When I try to connect using vncviewer I get this:

    ReadFromRFBServer: rdr::EndOfStream

    Any suggestions would be greatly appreciated...I would love to be able to manage my server from my desktop using more than just the terminal via SSH.

  5. #5
    Join Date
    Jun 2005
    Beans
    13

    Re: HOWTO: Setting up a VNC to GDM connection

    I just wanted to say thank you. It worked great for me. I am using this method to administer a headless/keyboardless/mouseless backup server.

  6. #6
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: HOWTO: Setting up a VNC to GDM connection

    Ok, sorry, there are two things to do if you use XDM:
    I installed xdm just to get to the right settings for ya .

    1. Put a # before the last line in /etc/X11/xdm/xdm-config so it looks like this:
    #DisplayManager.requestPort: 0

    2. Only localhost is connecting back to XDM through VNC, so you only have to do is add "localhost" to /etc/X11/xdm/Xaccess. Only the VNC client connects to the remote host.

    Restart XDM and there ya go!
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  7. #7
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: HOWTO: Setting up a VNC to GDM connection

    Glad I helped.

    Since you are running it headless, you made sure to disable the local X server to save yourself some memory, right?
    If not, just comment out the 0=Standard line in the [servers] section in /etc/X11/gdm/gdm.conf.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  8. #8
    Join Date
    Jun 2005
    Location
    Canada
    Beans
    94
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Setting up a VNC to GDM connection

    I am using gdm which doesn't have Xaccess so how do I change who has access to VNC?

    Thanks in advance.

    BTW, at the moment I can 'vncviewer localhost' and the vnc window will open, but if I type 'vncviewer my WAN IP' the window doesn't open, seems like nothing happens.

  9. #9
    Join Date
    Jun 2005
    Beans
    7

    Re: HOWTO: Setting up a VNC to GDM connection

    Is this secure? ie. is it possible for a hacker to enter the system with VNC enabled?

  10. #10
    Join Date
    Jun 2005
    Location
    USA
    Beans
    80

    Re: HOWTO: Setting up a VNC to GDM connection

    Quote Originally Posted by Blackie_Chan
    I am using gdm which doesn't have Xaccess so how do I change who has access to VNC?

    Thanks in advance.

    BTW, at the moment I can 'vncviewer localhost' and the vnc window will open, but if I type 'vncviewer my WAN IP' the window doesn't open, seems like nothing happens.
    You probably just need to forward port 5900 to your LAN IP in your router settings.

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
  •