Post-Steps: Ubuntu 24.04 Desktop (Rev: 07/30)

This is a more opinionated post than usual: I live on the command line on Linux. As such, I perform a few extra steps after a fresh installation to get to a “usable” system.

May 25, 2024
💡
This is a more opinionated post than usual: I live on the command line on Linux. As such, I perform a few extra steps after a fresh installation to get to a “usable” system.
 
Revision: 20240730-0 (init: 20240525)
 
This post discusses post-installation steps for a Ubuntu (Desktop, minimal install) Noble Numbat installation. Some will adapt to server instances. Please use its components as you see fit.
 
 
Ubuntu 24.04 LTS (Noble Numbat) is a significant release with several notable improvements and features. I will note only a few:
  • Linux Kernel 6.8: This improves hardware support, security, performance, and file systems.
  • GNOME 46: The latest version of GNOME with improved performance, memory usage, and numerous UI refinements.
  • New Firmware Update Tool: This makes updating firmware for devices more convenient.
A few of the novel changes in Noble Numbat can be seen
 
This is a quick guide to get some functionalities in place for using the OS.

Remote access

SSH

Desktop installs do not install openssh-server during setup. I want ssh access to this box:
sudo apt install openssh-server
After copying my .ssh keys over, I also sudo apt keychain

Tailscale

Tailscale is a Zero-Conf Virtual Private Network (VPN) that creates a NAT-traversal-capable Mesh Network over Wireguard. The IPs in your mesh are on the 100. subnet, a range of IP addresses reserved for Carrier-Grade NAT (CGNAT).
To clarify the above slightly:
  • establishes a mesh network (their "tailnet") where each device connects directly to every other device.
  • leverages the WireGuard protocol, known for its speed and security, providing strong encryption for your network traffic.
I have been a Tailscale believer since 2021. I even wrote a piece on “rdesktop access on Unraid using a Jump Desktop RDC with an ssh-tunnel over Tailscale” in 2022.
Tailscale provides many other features (Magic DNS, Exit Node with Mullvad integration, Taildrop, …). For an excellent technical overview of the solution, please see https://tailscale.com/blog/how-tailscale-works
Once you have your account, follow the Ubuntu Installation steps (you might need to sudo apt install curl first).
For remote access systems (or servers), it is also possible to Disable key expiry from your Machines dashboard’s host ... menu.

NextDNS

If you are a NextDNS.io customer, go to your https://my.nextdns.io/ page and look up the Linux’s “systemd-resolved” instructions.
Edit the /etc/systemd/resolved.conf file and enter the provided configuration data.
If you want to track the device, add its name before the NextDNS ID. For example, if you have something like DNS=IPv4or6#ID.dns.nextdns.io adapt it to show your HOST: DNS=IPv4or6#HOST-ID.dns.nextdns.io as described in the “Identify your devices” section of that page.
Restart the service for the changes to take effect: sudo service systemd-resolved restart

Remote Desktop: nomachine

The purpose of this remote desktop is to allow access to the remote screen from the login window, and to enable my user to perform operations on it. I used to be an x11vnc user. With the transition to Wayland, I started looking for alternate solutions, and settling on NoMachine which adds sound and dropping files from a system to another. Because I am the only person accessing the system, I only need one connection, be it other the local subnet (direct or Wireguard VPN) or Tailscale.
After downloading the .deb file for our x86_64 system, and sudo dpkg -i installing it, the tool will enable the NX service on port 4000.
Because we will likely have many interfaces created when we add Dockge to our system, we will edit the /usr/NX/etc/server.cfg file to modify the NXdListenAddress setting to only access the subnet IP of our host to used. There are many other settings that can be changed from the configuration file, please see https://kb.nomachine.com/AR02N00877 for additional details.
From the “NoMachine” application, select the “Settings → Server → Security” so we can control host access further:
  • Uncheck “Allow guest desktop sharing access to this server”
  • Uncheck “Only allow user connections for desktop sharing”
  • Check “Make access available when the system is still in the login screen”
  • Check “Don't require acceptance if the user logged in as a system user”

Software installation methods

Unattended upgrades and Ubuntu Pro

Please refer to “Unattended Upgrades on Ubuntu Linux” for details on how to do this.

Bringing back .deb support

Downloaded .deb files do not install when double-clicking on them as in previous releases (test installing Chrome, 1Password, Visual Studio Code, or WaveBox’s .deb, for example). You can use the terminal and install those using sudo apt install <FULL_PATH>.deb
To regain the ability to open those files from the file manager, use the App Center application and search for the gdebi debian package.
20240616 add: this might not be needed in the future per “Ubuntu is Finally Adding DEB Installer Support to App Center.”

Fixing AppImages

When trying to use .AppImage files the first time, you will get an AppImages require FUSE to run error (test with Stacer‘s .AppImage, for example)
sudo apt install libfuse2t64 will solve this, and now you can start the tool.

Updating snap-store

A .snap file is a compressed SquashFS file system containing all the application's necessary files and directories in a compressed format.
Snap will automatically update its own applications (as long as they are closed), but updating itself often requires some help.
sudo killall snap-store sudo snap refresh

Adding Flatpak support

A Flatpak file contains the entire application, including its binaries, libraries, and other dependencies. This ensures the application can run independently of the host system's libraries and configurations.
FlatHub gives you access to many valuable applications, such as Extension Manager.
To get access to it, follow the instructions at https://flathub.org/setup/Ubuntu
This will add flatpak support, and selecting the Install button from packages listed on https://flathub.org/ will allow you to install the downloaded files.
Note that at the time of this write-up, no noble version is yet available at https://ppa.launchpadcontent.net/flatpak/stable/ubuntu/dists/. As such, sudo nano /etc/apt/sources.list.d/flatpak-ubuntu-stable-noble.sources and replace noble by jammy on the Suites line.
After installing Extension Manager, you can add additional Gnome Extensions, such as Astra Monitor, Caffeine, Net Speed Simplified, or Clipboard Indicator, when browsing for extensions.

Homebrew: on Linux too

brew became popular on MacOS and has been ported to Linux.
One reason to use brew is that although you might have an apt or snap version of many tools available, the brew version is likely more recent than the one available with those package managers.
For example, on 22.04, brew was required to get a recent version of podman to support the NVIDIA Container toolkit. On 24.04, apt info podman tells us we have 4.9.3, while brew info podman shows 5.0.3 available.
Follow the instructions at https://brew.sh/ to install the brew command (we recommend a sudo apt install git git-lfs before attempting to install it).
 
After following the recommended instructions (and performing the steps in the “Next steps” section of the installer), you can install a few useful tools (do a brew info NAME to get details on each tool)
brew install buf ctop duf eza fd fx fzf hyfetch keychain tldr zoxide
If you are looking for more interesting CLI utilities, see https://dev.to/lissy93/cli-tools-you-cant-live-without-57f6

Nix

nix-env is a unique and powerful package manager with a distinct approach to software installation and management; each package is defined using a purely functional language as a function of its inputs (dependencies), leading to deterministic and reproducible builds.
nix-shell is designed to create isolated and reproducible shell environments: you can test tools without installing them.
Each software is installed in its own directories, which support running multiple versions of the same tool. Each directory contains everything related to that installation. One key thing is that Nix guarantees that the same package build will always produce the same result, regardless of the machine or time.
To install the package manager component, see https://nixos.org/download/#nix-install-linux and follow the recommended post-installation instructions (including adding the start command to your .bashrc).
After your installation, select a package to install (you can see all available packages at https://search.nixos.org/packages). You can test a package before installing it. For example, with imgcat: nix-shell -p imgcat. After the installation, you will be in a [nix-shell:~]$ where you can check which imgcat and then run an imgcat /usr/share/plymouth/ubuntu-logo.png command. When you exit this shell, you will see that which imgcat shows that it is not available anymore.
To install the tool, follow the package’s nix-env “on Non NixOS” instructions; here nix-env -iA nixpkgs.imgcat. After this, which imgcat will show the tool available on your system.
 
We only discussed Nix as a package manager here; there is much more that Nix can do related to building content. Check https://nix.dev/tutorials/ to see more.

Shell

I have been on Z Shell since before it became the default shell for MacOS, and use the popular oh-my-zsh with powerline-10k

Z Shell

You can confirm it is installed on your host by trying to install it: sudo apt install zsh
To change your default shell to zsh use chsh -s /usr/bin/zsh
After installation, run it (type zsh) and follow the interactive “Z Shell configuration function for new users"

Oh-my-zsh

Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes […]
To install it, follow the instructions from https://ohmyz.sh/#install
Then, look at the list of plugins and enable some by adding them to the plugins= line inside your ~/.zshrc
Some plugins will require you to install commands to support them; those can be installed either as apt, brew, or nix-env.
For example:
  • extract: archive extractor. Adds the extract command
  • eza: ls replacement (requires eza installation). You can also configure it (add before the plugins= line in ~/.zshrc):
zstyle ':omz:plugins:eza' 'dirs-first' yes zstyle ':omz:plugins:eza' 'git-status' yes zstyle ':omz:plugins:eza' 'header' yes zstyle ':omz:plugins:eza' 'show-group' yes zstyle ':omz:plugins:eza' 'time-style' long-iso
  • fzf: fuzzy finder (requires fzf installation)
  • isodate: prints ISO dates. Adds isodate and other commands
  • jsontools: JSON terminal tool. Adds pp_json and other commands
  • keychain: ssh-agent handler (requires keychain installation). You need to configure what agent it will run and the identities to use (before the plugin= line again), for example:
zstyle :omz:plugins:keychain agents ssh zstyle :omz:plugins:keychain identities id_ed25519 id_rsa zstyle :omz:plugins:keychain options --quiet
  • python: python helper. Adds mkv, vrun and other commands.
  • systemadmin: adds a series of aliases and functions that make a sysadmin's life easier. Adds psmem10, pscpu10, geteip, getip, and other commands
  • urltools: URL en/decode tools. Adds urlencode and urldecode commands
For example, with all the above, our plugins= line would look like:
plugins=(extract eza fzf git history isodate jsontools keychain python systemadmin urltools)
Notes:
  • when installing “oh-my-zsh”, you might lose content from your original Zshell configuration file. This content should be in the .zshrc.pre-oh-my-zsh file. Copy its content at the beginning of your .zshrc file.
  • Similarly, you might find the Nix and Homebrew commands at the end of your .bashrc file (if bash was your original shell); please add those to your .zshrc before the plugins= since you might have installed the tools required by those plugins using brew or nix. Once done, ssh to your host to confirm everything is functional: no missing packages indicated by the shell prompt, nix-env -qa --installed "*" and brew list return some installed packages (if any).

Powerline10k

Powerlevel10k (p10k) is a popular theme for the Zsh shell that allows you to display various information segments (current directory, git status, time, system load, and more) on your command line.
Before installing p10k, install the recommended fonts following the instructions at https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#meslo-nerd-font-patched-for-powerlevel10k (”GNOME Terminal” section, after downloading all the fonts, double click on them to install)
Then install it within “oh-my-zsh” following https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#oh-my-zsh
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc
Open a new shell (if you have not logged out of your account since switching, you might need to start zsh) and follow the guided prompt to complete the configuration wizard. I do not enable “instant prompt” as I will add neowofetch to my interactive shells next.
When you restart your shell, you will see the enhanced prompt you decided on.
Edit the .p10k.sh file to see that you can edit the POWERLEVEL9K_LEFT_PROMPT_ELEMENTS and POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS to match your preferences (including adding more lines of context).

Interactive shells

At the end of your .zshrc add an interactive shell separator
# If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac
Now, below this, we can add our aliases, or run commands that we want to be run at each next shell.
 
For example, neowofetch (installed by installing hyfetch).
Run it once to see information about your system. This will also create its default configuration file (at ~/.config/neofetch/config.conf), which you can edit to suit your needs (for example, display the gpu_driver, disk, local_ip, public_ip, users, and locale in the main section, or the memory_unit and add to thedisk_show).
 
In your .zshrc add after the interactive separator:
echo ""; neowofetch

Docker & Podman

For details on this setup, please see “Setting up NVIDIA docker & podman (Ubuntu 24.04)”. The document's first section covers the CPU installation steps even if you do not have a GPU.

Dual booting?

If case you are dual booting, you might want to check those two sites for helpful information:

Troubleshooting

Error when doing an apt update

This might be related to your network handling of IPv6.
This https://askubuntu.com/a/787491 fixed it for my OpenStack VMs.

Revision History

  • 20240730-0: moved from x11vnc to NoMachine + removed fd as it is not in the list of oh-my-zsh plugins anymore
  • 20240616-0: Added note about deb being native again soon
  • 20240612-0: Added Troubleshooting section
  • 20240531-0: Added dual boot section.
  • 20240530-0: Extended note about Z shell bringing over bash content
  • 20240529-0: Initial public release