![]() |
VOOZH | about |
We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.
Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.
Follow TNS on your favorite social media networks.
Become a TNS follower on LinkedIn.
Check out the latest featured and trending stories while you wait for your first TNS newsletter.
If you develop for the Linux desktop, you know how important it is to not only have the right environment to work with but also one that can be easily recreated and managed.
There are all sorts of tools for that, such as VirtualBox and VMware. But there’s a command line virtual machine manager that’s far more efficient to use than either of those systems. That tool is called Multipass.
Multipass uses KVM on Linux, Hyper-V on Windows and HyperKit on MacOS (yes, you can install Multipass on those other OSes as well). Multipass supports metadata for cloud-init, so you can even simulate a cloud environment from your desktop.
For many, Multipass is a great way to quickly spin up a Linux virtual machine and develop from the command line for servers. But if you’re a desktop developer, what do you do?
You add a full desktop environment into the mix.
Let me show you how it’s done.
To make this work, you’ll need an OS that supports Multipass. I’ll show you how to install Multipass on Linux, macOS and Windows. It doesn’t matter which OS you use since working with Multipass is the same on each.
To install Multipass on Linux, you’ll need a distribution that supports Snap. If you don’t already have Snap installed, it can be done with a command like:
sudo apt-get install snapd -y
If you’re using a Fedora-based distribution, the command is:
sudo dnf install snapd -y
If you use an Arch-based distribution, the process requires an AUR helper, which can be installed like so:
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Snapd with:
yay -Sy snapd
Start and enable the service with the command:
sudo systemctl enable –now snapd.socket
If you’re using macOS, the installation requires Homebrew, which can be installed with:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
Once Homebrew is installed, add Multipass with:
brew install –cask multipass
Installing Multipass on Windows requires that you download the proper installer from the Multipass website. Once you’ve downloaded the installer, run it and walk through the wizard.
Next, we’re going to launch a new virtual machine with Multipass. First, find the version of Ubuntu you want to use with:
multipass find
The above command will list all the available releases, of which we’ll use version 24.04 LTS. To launch the virtual machine, issue the command:
multipass launch 24.04
One the VM is launched, verify it with:
multipass list
With the VM running, access its shell with:
multipass shell NAME
Where NAME is the randomly generated name for the VM. You will immediately be taken to the bash prompt of the running VM.
The VM will be text-based only, so we need to install the desktop. Before we can do that, update apt with:
sudo apt-get update
Next, we’ll install the Cinnamon desktop and an RDP client (hint, hint) with the command:
sudo apt-get install cinnamon xrdp xorgxrdp -y
The installation of the desktop will take anywhere from two to 10 minutes (depending on the power of your hosting machine).
With the desktop installed, you’ll want to add a new user (so you can access the desktop via RDP). To do that, issue the command:
sudo adduser USER
Where USER is the name of the user.
Give that new user sudo privileges by adding them to the sudo group with:
sudo usermod -aG sudo USER
Where USER is the name of the new user.
You’re all set and ready to access the desktop.
Note: If you run into an issue where there’s not enough disk space, you’ll need to stop the VM with:
multipass stop NAME
Where NAME is the name of the virtual machine.
Resize the disk with:
multipass set local.NAME.disk=SIZE
Where NAME is the name of the VM and SIZE is the desired size (in GB).
For example:
multipass set local.worthwhile-cusk.disk=32G
Before you attempt to access the desktop, you need to find the VM’s IP address, which can be done with the command:
ip a
The IP address will be in the form of 10.235.112.241
Now that you’ve done that, make sure to reconfigure the Xsession-manager with the command:
sudo update-alternatives –config x-session-manager
Make sure to select the option for the Cinnamon desktop.
Once you know the IP address, you’ll need to open an RDP client, such as Remmina. Point that client to the IP address of the virtual machine and then, when prompted, log in.
The screen will be fairly small (Figure 1), but you should still be able to work with it.
Figure 1
You can now start developing for the Linux desktop environment. Granted, you are limited to Ubuntu, but given the popularity of that desktop, that should give you a good start.