Virtual desktop & web access?

March 19, 2015 7.6k views
DigitalOcean Miscellaneous

Is it possible to setup a virtual desktop to access the web on a droplet?
If so, how?

3 Answers

It's definitely possible! There are a number of tutorials on the site that cover how to setup remote desktop access. This one should point you in the right direction if you're on Ubuntu:

If you're on CentOS, give this one a try:

VNC is a connection system that allows you to manage your Ubuntu server with a graphical desktop environment. With VNC, you can use your keyboard and mouse to interact with a graphical display of your remote server, making it easier to work with the server.

Thank you.

I just finished setting it up, and I'm able to access the web. But, the browser losing connection and closing after a few seconds of being connected. Any idea what the problem is?

  • It's most likley your droplet doesn't have enough memory or can't process it, maybe you should upgrade it if you're planning to use a virtual desktop (Not recommended as that's what vps's are meant to be), headless servers.

  • I installed Firefox (through apt-get install firefox) and just run it by typing in firefox to any ssh connection with x11 enabled which works fine on the cheapest droplet. But, if you have the whole desktop installed, that'll be a bit much for the cheapest droplet and you could be running out of RAM like @Codmadnesspro says. If that is the case, you could combat the issue by adding swap which will give you more RAM for free. The catch is that it's stored on the hard drive so won't be as fast but with Digital Ocean's SSD drives, it should get the job done.
    https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

    by Justin Ellingwood
    Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.
    • TenHourGuy:
      I have installed firefox on the ubuntu 14.04 droplet. Now, from my home machine when I ssh to droplet and then run firefox, after a few seconds, it pops a firefox browser window on
      my home machine!. I also checked in the ssh session that no firefox is running in the droplet (or has exited).
      I want t be able to do exactly what you have done(just run browser from droplet) Could you kindly let me know what I should be doing ?
      Thanks a lot

      • @jviyer I'm not sure why you should be having this issue. A window should indeed pop up as a regular window on your computer, but it will be running on the server. I've since switched to Chromium but Firefox ought to work.

        You are definitely following roughly this process, right? :
        ssh -Y user@address
        logout
        ssh -Y user@address
        firefox

        The -Y is for trusted X11 forwarding. Otherwise you definitely won't get a picture and it'll complain about there being no display. Also, it only works for me the second time logging into the droplet. Not sure why but it's not a big fuss.

        Apologies for the late response.

If you're having trouble staying connected, check your logs, firewall settings etc. A connection to and from will also only be as stable as your own [internet] connection and network configuration (i.e if you are using a router/firewall at home, whether the firewall is hardware or software).

You may also need to clear the port you're trying to connect on as an allowed outgoing connection on your own PC, whether Linux or Windows (Windows 7, 8, 8.1 and 10 Preview all have a built-in firewall which is enabled unless you install another or disable it).

Have another answer? Share your knowledge.