Remote-desktop into Ubuntu 9.04 from a Windows PC

19
2014-04
  • Questioner

    My server is Ubuntu 9.04 and I want to 'remote-desktop' into it from my Windows PC. vnc4server is not working even though I confirm that the services are running on the Server PC - 'connection has been reset' on every attempt. I've attempted connects with VNC Viewer 1.3.0.5, 4.1.3.0 and Ultra VNC. Putty works great, but I also need the graphical interface. Is there a way to do this that works?

  • Answers
  • Tom Werner

    I have found NX (No Machine) to be the most reliable - it appears to tunnel over port 22, so aslong as you can SSH OK (you mentioned PuTTY so I assume yes) you should be able to connect. Although not open source it is free for Linux with free clients for Windows and Linux.

    We use this at work over the internet, the compression / optimisation makes a serious difference - our VPN is now redundant!

    http://www.nomachine.com/download.php

    Note: It is based upon GPL software, with some propietary addons.

  • Josh K

    Are you connecting to the wrong display? Use netstat -ptan to figure out what port the VNC server is running on. If it is port 5900, you should connect to 'yourip:0' in your VNC client. If 5901, connect to 'yourip:1'. et cetera.

    Also, the log of your VNC server should be kept in ~/.vnc - take a look for any obvious issues.

  • Saurabh Barjatiya

    Connection has been reset is probably due to transparent security device that can only reset connections. If firewall was a problem you would have got connection timed out error.

    You can install XManager on windows PC and Run XManager Passive.

    After running Xmanager passive, connect to Linux machine from Windows and type following command in putty / SSH Secure Shell Client

    export DISPLAY=10.10.10.10:0
    

    Where, 10.10.10.10 is IP of your windows machine. Do not put space before or after '=' sign in above command.

    Then type some command like "gedit &" in putty and you should be able to see gedit in Windows. I prefer this over VNC as things look way way better using this method.

  • Brad Bruce

    When we moved to a Linux database server, XMing really helped. It has a simple point-and-click install on the Windows side and about 5 minutes of configuration on the Linux side. (Turning on XWindows for remote access)

  • David

    Also check to make sure that your firewall is not blocking the connection. Generally, if there is no evidence of an actual connection to the machine and you get "connection reset" errors, it suggests that VNC on the server never received the connection at all.

    Check /var/adm/messages and other logs for details on the attempted connection.

    Use this command to see what the firewall looks like:

    iptables -L -v -n
    

    If you still have problems connecting, make sure that you are connecting to the right port. You could also try watching the connection attempt from the server by using this command:

    tcpdump -s0 -n port 5900
    

    (assuming you are using that port - the default display, :0). If you understand the TCP/IP protocol, this will show you the actual network traffic so you can see if the attempt actually reaches the server and what the results are.

  • DarwinSurvivor

    Are any of your other connections getting through (ssh, http, etc)?

    I have a eee server running ubuntu 9.04 desktop edition (can't install server edition with USB) and the machine will not accept ANY connections until I ping out from the server.

    I have been, myself, looking for the cause and way to fix this problem. It seems to be a common issue with the desktop edition, but I have yet to figure out how to dissable this "feature".


  • Related Question

    virtualization - Remote Desktopping from Windows to Linux
  • Marc Bernier

    I have set up a Linux VirtualBox Virtual Machine server. From a Windows machine, I can remote desktop to a Windows VM running on that machine, it works great. I can also use VNC to remote to an Ubuntu VM also running on that machine.

    However, I would like several users to be able to access the Ubuntu VM at the same time - currently, user #2 will kick #1 out when he comes in. We are a small group of developers (<6), I could run several Ubuntu VMs at the same time, but I'm thinking there's got to be a better way.

    My ultimate goal would to have what Windows Remote desktop offers in Windows 2003 (multiple user logins at the same time).

    One idea I thought of was to run several x-windows instances, each on different terminal window. Each instance would be be associated with a different port, so that 'Joe' would VNC to 'ubuntu-vc:0', 'Bob' to 'ubuntu-vc:1', etc. I don't know if this is possible, though.

    Any ideas?


  • Related Answers
  • pQd

    you can also look at no-machine / freenx - works much better then vnc over slower links.

  • dwc

    Have you considered Xming or alternatives? Providing (mostly) full X is even nicer than remote desktop, IMO.

  • geoffc

    If you use an X-Server on the Linux box, then XDM provides this service by default.

    Use an X Windows client on Windows like Cygwin or something commercial and then each session is not a console session that would kick someone out. It is just another session.

    I imagine there is some limit to the number of X connections allowed, but it ought to be sufficiently high that you will never really hit it.

  • Avery Payne

    Yes, it is possible.

    VNC supports the concept of independent authenticated sessions. It requires a bit of command-line setup, but once finished, you can start as many VNC sessions as you like; each session will authenticate against whatever display manager is running (so you get username/password prompting). You can also "standardize" your "desktops" by specifying a color depth and resolution. If you decide to go this route, I highly recommend un-installing whatever stock VNC package is given to you, and installing TightVNC (available on most distros) as it will have more options, including the all-important "-economictranslate" option, which reduces memory consumption. This option (and a reduction in color depth) are important because you are essentially rendering into a framebuffer in memory, then using the VNC protocol to push the changes to the VNC client. Multiple VNC sessions will start to eat into available system memory, so this option is only good for a few users.

    As others have mentioned here, Xming will also give you a native X11 session with authentication. In terms of memory, this is the low-cost option as there is no "framebuffer" that needs to be conceived and maintained for each session.

  • Vinko Vrsalovic

    I don't know if there's a more modern route, but the standard way in my time was to run X Windows in Microsoft Windows, that way you can run any number of applications on your Ubuntu machine and control them and display them in Microsoft Windows.

    Check XMing out.

  • Peter Turner

    Tried XRDP? I can't offer any further documentation. Heheh, but it works very well.

  • Milner

    Another way to get XDM functionality, in a commercial product, is through Hummingbird Exceed. I tend to use Xming or Cygwin to get X functionality on my Windows desktop, but I support other users who do all their Unix work through Exceed (X or NFS or whatever).

  • Mark

    I do this with VNC running out of xinetd.d. Here's a brief run down of the steps:

    1.) Edit /etc/services to add your vnc service

    #
    # VNC Servers
    #
    vnc-1024x768x16 5900/tcp
    

    2.) Create the xinetd entry at /etc/xinetd.d/xvncserver

    service vnc-1024x768x16
    {
    protocol = tcp
    socket_type = stream
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -query localhost -inetd -geometry 1024x768 -depth 16 -once 
    }
    

    Restart or start xinetd.

    Here's an excellent write-up (specific to Gentoo) but still informative.

    http://www.gentoo-wiki.info/HOWTO%5FXvnc%5Fterminal%5Fserver