Super Easy: VPS Ubuntu Desktop, Windows VPS Desktop (FREE)

Epic method to have virtual desktop that you can control a Windows Desktop on iPhone & Android, as well as other desktops.

After successfully installing wine to my Debian desktop and running Photoshop CS6 perfectly, as well as Photoshop CC 2014 AND Photoshop CC 2015, I wanted to see how far I could push it.

First, get a VPS with at least 50gb of space and 4 CPUs.

Download photoshop

(you can skip this step if your don’t want Photoshop on your virtual desktop).

This step is ripped from this guide: http://prodesigntools.com/adobe-cc-2015-direct-download-links.html
1. Visit http://www.adobe.com/go/tryphotoshop_elements because you need an adobe cookie first.
2. Sign in, or if you don’t have an Adobe ID, click Get an Adobe ID. Use can use random personal information including a temporary email address just for the download.
3. Click download, and once the download starts, cancel it.
4. Download the Photoshop CC 2015 (32-bit) direct from the download link, which at time of writing is 693 MB and the URL (only accessible once you have a valid cookie) is http://trials3.adobe.com/AdobeProducts/PHSP/16/win32/Photoshop_16_LS20_win32.7z

Ubuntu Desktop

I suggest Ubuntu or Debian for desktop servers, with high IOPS, an SSD, minimum 2gb of RAM and at the absolute minimum 2 CPUs.

I started with a 4x CPU, 4gb VPS in New Jersey from Vultr. They’ve had 4 outtages in the 2 years that I’ve been using them and they may reboot your server sometimes, so save your work!)

Log into your server as root and run the following:

1
2
# update everything
sudo apt-get update

# install fail2ban for to protect yourself (optional but highly recommended)

1
sudo apt-get install fail2ban -y

# install ubuntu desktop (this can take 5 mins or more depending on where your VPS is, and if it’s powerful or not)

1
sudo apt-get install ubuntu-desktop -y

# install vnc4server, which will make a VNC server so we can remotely control our desktop

1
sudo apt-get install vnc4server -y

# install some swap memory for additional memory (optional, but highly recommended, this works for both Ubuntu 14.04 and Ubuntu 16.04)
# some guy made a super easy swap memory script for ubuntu installations
# first verify how much ram you have on your server

1
free -h

# just make sure we’re in home directory too so we dont break anything ~/ first

1
2
3
4
cd ~/
wget http://git.io/MJDcxw -O swap
sh swap 4G
free -h

# spawn a test display to create user password and init file NOTE PASSWORD IS 8 CHARACTERS ONLY

1
vnc4server -geometry 1920x1080

# it will ask you to put password twice, then we can kill the spawned desktop  as we should install some more apps and reboot it first

1
vncserver -kill :1

# the desktop will be pretty empty so lets add two pretty simple applications to help
# install metacity window manager so we can drag windows around

1
sudo apt-get install metacity -y

# install gnome-terminal so we can have some terminals to run commands

1
sudo apt-get install gnome-terminal -y

# now either “vi ~/.vnc/xstartup” (the VNC configuration file) and add the programs you want your desktop to “boot” up with OR just echo them straight to the bottom of the file

1
2
echo "gnome-session &" >> ~/.vnc/xstartup
echo "metacity &" >> ~/.vnc/xstartup

# I also want 3 terminals when I log on, so I’ll add 3 terminals

1
2
3
echo "gnome-terminal &" >> ~/.vnc/xstartup
echo "gnome-terminal &" >> ~/.vnc/xstartup
echo "gnome-terminal &" >> ~/.vnc/xstartup

# check that it looks good

1
cat ~/.vnc/xstartup

VNC Startup File

1
2
# optional: if you don't like starting programs with terminals, you can add a dock (like on Mac)
<code>sudo apt-get install plank -y

# add it to the x startup too so every time you start a desktop, it’s right there

1
echo "plank &amp;" &gt;&gt; ~/.vnc/xstartup

1
2
# reboot once
reboot

After it’s rebooted, ssh back into the server and spawn a working desktop (start an x session)

1
vnc4server -geometry 1920x1080

It should say:

New ‘SOMEIPADDRES:1 (root)’ desktop is SOMEIPADDRES:1

Take note of the :1, it might show :2 or :3 etc.

Since your don’t want any headaches later, make sure you’re always working on :1
If it didn’t show :1, then there’s already a desktop running, so to maximise VPS resources, kill any other ones first

1
2
3
vncserver -kill :1
vncserver -kill :2
vncserver -kill :3

And then make a fresh one just for you:

1
vnc4server -geometry 1920x1080

You can be creative with geometry, maybe you want an iPhone screen sized desktop, so find out your iPhone screen resolution and add it in start a session:
Since iPhone 6 is 1334×750, lets make an iPhone 6 friendly one.

1
2
# portrait iPhone view
vnc4server -geometry 750x1334
1
2
# landscape iPhone view
vnc4server -geometry 1334x750

It should say: “New ‘SOMEIPADDRESS:1 (root)’ desktop is SOMEIPADDRESS:1”

For iPhone 7:

1
vnc4server -geometry 1080x1920

If you can’t move windows around or want to open apps in your session via ssh, here are some examples:

1
2
3
4
DISPLAY=:1 metacity
DISPLAY=:1 gnome-terminal
DISPLAY=:1 firerfox
DISPLAY=:1 transmission

Connect to your new Ubuntu VPS Desktop from a Linux PC/Laptop:

# there are many Desktop VNC viewers but I really like Remmina.
sudo apt-get install remmina

# open remmina in your applications menu or type remmina in a terminal

Click New

Remmina VNC Splash PAge

Type a Name

Change Protocol from RDP to VNC – Virtual Network Computing

Leave Repeater and User name alone, but for Password put the password in from earlier (it’s only 8 characters!)
Note: if you forgot the password, ssh into the server and type vncpasswd to initiate a password change (it will ask you to put in the password twice and it must be <8 characters long.

Use the IP of your VPS and add a trailing :1 or :2 depending on what it said before, press save, then connect and you’re good to go.

Remmina vnc server connections

Use your iPhone to control your new Ubuntu/Windows VPS Desktop:

Download VNC Viewer on iPhone

Create a new connection (+)

Input your server IP address with the a trailing :1 or :2 depending on what your server mentioned before, press save.

VNC Viewer iPhone

 

Connect to your server. You should get an “Unencrypted connection” warning. Hit connect and you’re set!

Here’s what you might see:

ubuntu desktop iphone

You can go ahead and install Firefox: apt-get install firefox

Installing firefox on ubuntu vps

Here’s what it looks like full screen:

Firefox fullscreen iphone vps

Use your Android to control your new Ubuntu/Windows VPS Desktop

Install androidVNC from F-Droid (free) https://f-droid.org/repository/browse/?fdid=android.androidVNC
OR
Install VNC Viewer from Google Play (free, but you’re tracked by Google)

Host: IP address of your server.
Port: 1
Password: Password from above, use vncpasswd to change

 

One thought on “Super Easy: VPS Ubuntu Desktop, Windows VPS Desktop (FREE)”

Leave a Reply

Your email address will not be published. Required fields are marked *