Is it possible to install GUI on Ubuntu VPS then do remote desktop from Windows?

I am using Windows 7 and going to purchase a VPS with Ubuntu OS. I used to use VPS with Windows 2008 Enterprise OS and used windows remote desktop to remote the VPS.

Now if I switch to Ubuntu VPS can I still use remote desktop like with Windows 2008 Enterprise VPS ? I think Teamviewer software can help me to use remote desktop from Windows to Ubuntu VPS, am I right ?


Solution 1:

This would depend on the VPS and what is installed under Ubuntu.

If it's a server install, it probably has a number of GUI (X) items not installed, since it can have a dramatic impact on how much disk space and CPU cycles are used.

If it does have the workstation version with the default workstation packages, there is a desktop sharing ability using VNC to connect to it.

Alternatively, you can get an X server for your Windows system and ssh in with putty (using X-forwarding enabled) to launch graphical applications to appear locally on your Windows machine while running on the remote system.

Your best bet is to learn how to use the command prompt, though. It will let you run a leaner system, lower CPU usage, and simplify how to connect to your machine (just using SSH instead of a slower graphical interface).

Solution 2:

Yes you can, but this will result to installing many files to your system and increasing your disk usage and also cpu/ram usage.

1. Install the Desktop Environment and VNC server

Usually an Ubuntu VPS does not come with a graphical desktop environment or a VNC server installed, so you must first install those. To use the minimum disk space and minimum resource I used Xfce desktop environment and TightVNC myself.

sudo apt install xfce4 xfce4-goodies tightvncserver

To complete the VNC server's initial configuration after installation, use the vncserver command to set up a secure password.

vncserver

2. Configure the VNC Server

You should configure vnc so that it first starts the desktop environment then the vnc service. Firstly, kill the vnc server that you started in the first step:

vncserver -kill :1

Prepare the startup file

nano ~/.vnc/xstartup

Put these lines into the file:

~/.vnc/xstartup
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Make sure the file is executable

sudo chmod +x ~/.vnc/xstartup

Now start the vnc server and you are ready to use it:

vncserver

3. Usage

You can use any windows vnc client to connect to your server from port 5901. Personally I like mRemoteNG to manage multiple servers.

To setup vnc so that it starts automatically after each restart, you need to set it up as a service. You can read the details of these steps and setup as a service from this page which I used as reference:

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04

Solution 3:

What you suggest is theoretically possible but I would recommend against it.

You would probably be much better served with one of the control panel interfaces like cPanel or Webmin.