Skip to content

Create Ubuntu XRDP Full VM flist for ThreeFold Grid with desktop environment and remote access capabilities.

License

Notifications You must be signed in to change notification settings

mik-tf/ubuntu_xrdp_fullvm_flist

Repository files navigation

Ubuntu XRDP Full VM Flist Creator

Table of Contents


Introduction

This repository contains a script to create a Full VM flist with Ubuntu and XRDP for the ThreeFold Grid. The flist includes a desktop environment (XFCE) and XRDP, allowing for remote desktop access to your deployed VM.

Prerequisites

  • A Linux system with root access
  • Sufficient disk space (at least 10GB free)
  • A ThreeFold ZOS Hub account with an API key
  • make utility installed on your system (optional, for Makefile method)

Usage

Manual Method

  1. Clone this repository:

    git clone https://github.com/Mik-TF/ubuntu_xrdp_fullvm_flist.git
    cd ubuntu_xrdp_fullvm_flist
    
  2. Make the script executable:

    chmod +x create_fullvm_ubuntu_xrdp_flist.sh
    
  3. Run the script with sudo privileges, providing your ThreeFold ZOS Hub API key as an argument:

    sudo ./create_fullvm_ubuntu_xrdp_flist.sh YOUR_API_KEY_HERE
    

    Replace YOUR_API_KEY_HERE with your actual ThreeFold Hub API key.

Using Makefile

  1. Clone this repository:

    git clone https://github.com/Mik-TF/ubuntu_xrdp_fullvm_flist.git
    cd ubuntu_xrdp_fullvm_flist
    
  2. Run the build command using make:

    make build
    
  3. When prompted, enter your ThreeFold ZOS Hub API key.

  4. Wait for the script to complete. This may take some time depending on your internet connection and system performance.

  5. Once completed, the script will have created and uploaded an flist named ubuntu-24.04_fullvm_xrdp.tar.gz to your ThreeFold Hub account.

What the Script Does

  1. Installs necessary packages
  2. Creates a base Ubuntu system using debootstrap
  3. Installs XFCE desktop environment and XRDP
  4. Configures a non-root user for XRDP access
  5. Sets up firewall rules
  6. Creates and uploads the flist to the ThreeFold Hub

Notes

  • The default non-root user created is xrdpuser with password xrdppassword. It's recommended to change this password after first login.
    • Simply set the variable PASSWORD="your password here" when deploying the VM on the Dashboard
    • You can also update your password with the command sudo passwd on the VM
  • The script requires an active internet connection throughout its execution.
  • Ensure you have the latest version of the script by pulling from this repository before each use.

Troubleshooting

If you encounter any issues:

  1. Check your internet connection
  2. Ensure you have sufficient disk space
  3. Verify that you're using a valid ThreeFold API key
  4. Review the script output for any error messages

For persistent issues, please open an issue in this GitHub repository.

Clean Up

To remove the created files after running the script, you can use either of the following methods:

Manual method:

sudo rm -rf ubuntu-noble
sudo rm ubuntu-24.04_fullvm_xrdp.tar.gz
sudo rm -rf logs

Using Makefile:

make delete

Both methods will remove the ubuntu-noble directory, the ubuntu-24.04_fullvm_xrdp.tar.gz file, and the logs directory.

Server Side: Dashboard Deployment

Once the Flist is set, deploy it on the Dashboard via the Micro VM page.

  • Go to Micro VM page
  • Under VM Image, select ̀Other and insert the Flist URL
  • Under Entry Point, make sure nothing is written
  • Open the Environment Variables windows and set the environment variables:
    • Name: LOCALIP
    • Value: The local PC IP you're using
      • You can use curl ifconfig.me to see your public IP address
    • Name: PASSWORD
    • Value: The password you want for your xrdp user
  • Choose a node with IPv4 network and click Deploy

Client Side: Install Remote Desktop Connection for Windows, MAC or Linux

For the client side (the local computer accessing the VM remotely), you can use remote desktop connection for Windows, MAC and Linux. The process is very similar in all three cases.

Simply download the app, open it and write the IPv4 address of the VM. You then will need to write the username and password to enter into your VM.

Download the App

Connect Remotely

  • General process
    • In the Remote app, enter the following:
      • the IPv4 Address of the VM
      • the VM root-access username and password
    • You now have remote desktop connection to your VM

License

This work is under the Apache 2.0 license.

About

Create Ubuntu XRDP Full VM flist for ThreeFold Grid with desktop environment and remote access capabilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published