Creating a Cloud Linux Desktop Environment on the Threefold Grid

Creating a Cloud Linux Desktop environment on the Threefold Grid

The End Result of This Tutorial

An often requested feature is desktop environments hosted on the Threefold Grid. I have recently found a viable solution solution to this using relatively user friendly tools and this will be a tutorial on how how you can accomplish the same.

For this tutorial we will be using a

  • Full VM deployment with 4 cores, 4096 mb of ram and 50 gb of storage
  • Ubuntu 22.04 image
  • Chrome Remote Desktop
  • Putty / SSH client of your choice.

Steps to Complete the Project (click to expand)

Update and Upgrade Your VM

After Connecting to your VM via SSH, run these commands in your terminal for Ubuntu 22.04

apt update && apt upgrade -y 

If you encouter an error about a grub update on a pink screen, simply press yes and proceed, this is a incompatability between that update and the hypervisor firmware, it will not affect peformance, but this error can be avoided by running this command prior to updating

apt-mark hold grub-efi-amd64-signed
Jump to Update and Upgrade Your VM Video Section
Jump to Update and Upgrade Your Expected Behavior Section

Console Input

image

Command Success

image

Restart Your VM
reboot -f
Jump to Restart Your VM Video Section
Jump to Restart Your VM Expected Behavior Section

Console Input

rebootinput

Command Success

Install the Desktop Enviroment

Once you have update your VM you will want to run this command, this is a large download and the install takes awhile

apt install ubuntu-desktop
Jump to Install the Desktop Enviroment Video Section
Jump to Install the Desktop Enviroment Expected Behavior Section

Console Input

installdesktopinput

Command Success

Download Chrome Remote Desktop

Now we will download the software package that will install the chrome remote desktop extension

wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
Jump to Download Chrome Remote Desktop Video Section
Jump to Download Chrome Remote Desktop Expected Behavior Section

Console Input

Command Success

Install Chrome Remote Desktop

Now We will install the package the package we just downloaded from the directory we downloaded it to (should be where you are)

apt-get install --assume-yes ./chrome-remote-desktop_current_amd64.deb
Jump to Install Chrome Remote Desktop Video Section
Jump to Install Chrome Remote Desktop Expected Behavior Section

Console Input

Command Success

Set Desktop Environment Display Manager For Chrome
bash -c echo “exec /etc/X11/Xsession /usr/bin/gnome-session” > /etc/chrome-remote-desktop-session’
Jump to Set Desktop Environment Display Manager For Chrome Video Section
Jump to Set Desktop Environment Display Manager For Chrome Expected Behavior Section

Console Input

Command Success

Create A New User
adduser parker 
Jump to Create A New User Video Section
Jump to Create A New User Expected Behavior Section

Console Input

adduserinput

Command Success

addusersucess

Make User a Sudoer
usermod -aG sudo parker
Jump to Make User a Sudoer Video Section
Jump to Make User a Sudoer Expected Behavior Section

Console Input

sudoinput

Command Success

sudosucess

Restart Your VM
reboot -f
Jump to Restart Your VM Video Section
Jump to Restart Your VM Expected Behavior Section

Console Input

rebootinput

Command Success

Get Command From Chrome Web Browser Under Add By SSH

Go to https://remotedesktop.google.com/ and login/create account as necessary

then select setup via ssh

follow the prompts begin->

2

next->

3

authorize

4

Copy the Debian\linux box

Jump to Get Command From Chrome Web Browser Under Add By SSH Video Section
Jump to Get Command From Chrome Web Browser Under Add By SSH Expected Behavior Section

Return to Your VM Console and Switch To Your User
su parker
Jump to Return to Your VM Console and Switch To Your User Video Section
Jump to Return to Your VM Console and Switch To Your User Expected Behavior Section

Console Input

suinput

Command Success

susucess

Paste The Key From The Browser Into Your VMs Console

you should now be able to login into your into Linux desktop by returning to the remote access tab.

Jump to Paste The Key From The Browser Into Your VMs Console Video Section
Jump to Paste The Key From The Browser Into Your VMs Console Expected Behavior Section

Console Input

Command Success

6 Likes

Added video tutorial to OP

1 Like

This is too cool.

Question: is the google framework “safe”?

Meaning, is it open source? If no, would there be alternatives?
Perhaps this running on Brave is a step more “decentralized”/open source.

Very curious. Amazing project.
I’ll do some research on my end, but here are my questions for now.

You rock Drew.

I believe chromium may have the ability to serve this function but this requires a google account so this method isnt very decentralized, gonna back track and do it with xrdp, this is easier but that will offer a solution for those wishing to avoid the centralization related to google.

Alright. I also think with xrdp it could be nice.

If you want some documentation for this, check this link:

It looks like it is feasible quickly.

Main source: https://github.com/neutrinolabs/xrdp/issues/1723

This post has been updated with sectionized steps and video links under each section that lead to that specific step

added pictures of required inputs and expected outputs to each step.

For anyone that wants to work on automating this process this medium article has the steps needed to do it on Google cloud and uses tools I think we can use on the grid

1 Like