DEV Community

manish srivastava
manish srivastava

Posted on • Updated on

YOUR COMPLETE ONLINE DESKTOP: Hosted on Server in just $5.00 :)

I believe everyone Should have Personal Remote Desktop. As a programmer , You Must !!!

Advantages? Simply, everyone become more productive with this anytime anyplace accessible Personal online Desktop . One Drive, Google Drive or any other known cloud Drives are far behind when compared with real Desktop on clouds.

I am not a Programmer. I love Programming and I am among 17 % of World's programmer population who do not hold a formal degree in Computer Programming. I am an Engineer (Chemical Tech -Food Techno) who knows more about Heat Transfers and Mass Transfers and loves exploring.

Treat above stated introduction as my disclaimer that I can't answer all your queries. I recently created my desktop on server and can remotely access it from my mobile , PC ,Laptop and Smart TV. Infact, I have started doing my all works on this remote Desktop. I am writing this article from my Remote Desktop ussing Firefox Browser.

You can also create your Personal Remote Desktop on clouds . Its easy and 10-15 task and cost only $5. Yup believe me :)

what we are going to do :

On server :

We will install Ubuntu 18.04.3 (LTS) Server and on that we will install an Desktop OS of Choice. Will Add Virtual Network Computing (VNC).

On Remote Desktop

Install VNC Viewer : link to view our online desktop.

So, LETS START :

Prerequisites:

  1. A Server :Ubuntu 18 Ubuntu 18.04.3 (LTS) x64 ( $5 USD ).

  2. Some Commands. Just Follow Me...

*STEP -1 *
(a) Login into root of server.
(b) Follow the given order of Commands : I am installing Kubuntu-desktop. But You can choose other ones given in this list .

command :sudo apt-get update
command :sudo apt install tasksel
command :sudo tasksel install kubuntu-desktop <--- Change this if you want
command :sudo apt install sddm
command :sudo dpkg-reconfigure sddm

The sddm display manager is the default one for KDE Plasma desktop. Hit Enter for Ok. The system will then offer you to make a selection for configuring sddm as follows:

Alt text of image

You can see that my system has two display managers installed on it; gdm3(default for Ubuntu LTS) and sddm. Since I have to select sddm, I will use the keyboard down arrow to select it and then hit Enter for Ok.

Alt text of image

command :reboot

** CONGRATULATIONS , YOU GOT YOUR DESKTOP ON SERVER. BUT WAIT YOU CAN'T ACCESS IT
WITHOUT VNC!!! ***
Virtual Network Computing, or VNC, is a connection system that allows you to use your keyboard and mouse to interact with a graphical desktop environment on a remote server. It makes managing files, software, and settings on a remote server easier for users who are not yet comfortable with the command line like me.

The step 2 is more easy. Just keep following me

*STEP -2 *

command : sudo apt install xfce4 xfce4-goodies
command : sudo apt install tightvncserver
command : vncserver

Output
You will require a password to access your desktops.

Password:
Verify:

The process then creates the necessary default configuration files and connection information for the server:

Output
Would you like to enter a view-only password (y/n)? n
Dont Forget to Write n (Its Important)

command :vncserver -kill :1
command :mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
command :nano ~/.vnc/xstartup

We need VNC to start our desktop environment if it’s not already started. Add these commands to the file:( copy following three lines and exit)

<---copy--->
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
<---copy--->

The first command in the file, xrdb $HOME/.Xresources, tells VNC’s GUI framework to read the server user’s .Xresources file. .Xresources is where a user can make changes to certain settings of the graphical desktop, like terminal colors, cursor themes, and font rendering. The second command tells the server to launch Xfce, which is where you will find all of the graphical software that you need to comfortably manage your server.

To ensure that the VNC server will be able to use this new startup file properly, we’ll need to make it executable.

command :sudo chmod +x ~/.vnc/xstartup

Now, restart the VNC server.

command : vncserver

command : ssh -L 5901:127.0.0.1:5901 -C -N -l yourservername your_server_ip

Remember to replace yourservername and your_server_ip with the sudo non-root username and IP address of your server.

command : sudo nano /etc/systemd/system/vncserver@.service
command : sudo systemctl daemon-reload
command : sudo systemctl enable vncserver@1.service
command : vncserver -kill :1
command : sudo systemctl start vncserver@1
command : sudo systemctl status vncserver@1

Start your SSH tunnel again:

command : ssh -L 5901:127.0.0.1:5901 -C -N -l sammy your_server_ip

** YOU ARE DONE WITH INSTALLING OF REMOTE DESKTOP . LETS ACCESS IT ON PC OR MOBILE **.

Download RealVNC from following link here.

Type IP address with port 5901 like xxx.xx.xx.xxx:5901 . It will prompt for user ID and Password. Use the one you declared earlier.

Alt text of image

** WOW, YOU GOT ONE ALL TIME -ALL PLACE accessible ONLINE PERSONAL DESKTOP**

If you like my post , Please Like and Comment.

** I am also Director to an IT Company. Anyone who is really interested in working with my team on Remotedesktop : an opensource solution can contact me on my personal email : Manishfoodtechs@gmail.com**

“This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.”

Top comments (3)

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Great post!
I just checked your post and you have a referral link to DigitalOcean in it.
Can you please be so kind and add a note to your post that the link contains a referral code?
Part from the Terms of Uses which also includes a template:

If a post contains affiliate links, that fact must be clearly disclosed. For instance, with language such as: “This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.”

Thank you 👍

Collapse
 
schnipdip profile image
schnipdip

I would like to add a more simple approach than relying on standing up a VM/RPI that is internet facing.

I've been playing around with AWS Cloud9. You can use cloud9 as a collaboration tool IDE between devs, like Glitch. But what is cool is it actually stands up a EC2 instance so you can create your entire dev env, manage user access, allow friends to code with you, etc. The best part is Cloud9 is free in AWS....Free!

Collapse
 
manishfoodtechs profile image
manish srivastava

True. In the post I used cloud Vm of digital ocean.
The post was more about taking complete personal desktop on cloud. Collaboration tools always best for team. I will surely check cloud9. Thanks buddy