Introduction #

I’ve provided scripts for setting up a new Ubuntu 24.04 desktop machine. They have been tested on a fresh install of Ubuntu 24.04 LTS. They contain all the software that is needed for Rust development, OBS Studio use, and general developer productivity. They are highly opinionated for my use case, but you can modify them to suit your needs. I’ve also recently migrated from Pop_OS! 22.04.

This video shows what the scripts do after you run them, and how they make your Ubuntu 24.04 desktop environment look and feel. This article is really a companion to the video.


This video is all about keyboard customization and productivity on Linux. It’s a great companion to the scripts that I’ve provided in this article. It is highly reliant on the use of the UHK v2 keyboard.


What comes with the scripts #

💡 You can get the scripts from the rust-scratch repo.

Here is a non exhaustive list of software that will be installed:

  1. fish as the default login shell. All the configuration scripts are written in fish. bass is also installed to allow for running bash scripts in fish.
  2. rustup, brew, and flatpak with flathub as package managers.
  3. docker and docker-compose for containerization.
  4. obs-studio for screen recording and streaming.
  5. vlc, mpv for media playback.
  6. chrome for web browsing.
  7. vscode for code editing.
  8. Lots of Gnome extensions for desktop customization.
  9. nerd-fonts for terminal font customization. Along with guake and tilix for terminal emulators. Along with tmux for terminal multiplexing.

To download Ubuntu 24.04, visit the Ubuntu website and prepare a USB drive with the ISO file for installation. You can use Popsicle to create a bootable USB drive.

Running the scripts #

Lots of customized font configurations are included in the scripts. You can clone the repo and run the scripts, or just copy the links below and run them in your terminal.

You can run the following commands to get this on your machine. The first script 0-bootstrap.bash has to be installed first. It installs fish shell and makes it the default and installs flatpak and flatpak flathub. It also installs bass to allow running bash scripts in fish. The remainder of the scripts can be run in any order.

sudo apt install -y curl git
cd ~/Downloads/
git clone https://github.com/nazmulidris/rust-scratch/
cd rust-scratch/ubuntu24/
./0-bootstrap.bash
# You will need to reboot after running the 0-bootstrap.bash script

Once you reboot, you can run the following scripts.

cd ~/Downloads/rust-scratch/ubuntu24/
./1-install.fish
./2-install-docker.bash
./3-install-fonts.fish

You can see the contents of the scripts by clicking on the links below:

  1. https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/0-bootstrap.bash
  2. https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/1-install.fish
  3. https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/2-install-docker.bash
  4. https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/3-install-fonts.fish

Optional scripts:

  1. https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/install-agent-into-bin.fish
  2. https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/fix-gnome-session-path-env-var-linuxbrew.fish
  3. https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/fix-usr-local-bin-symlinks.fish

Gnome Extensions #

Keyboard remapping #

Tilix and quake mode #

tilix and its quake mode is disabled in Wayland. So I installed guake. You can use tmux to manage the panes in this guake terminal with ease.

Remap Super+Q #

The following links show you how to remove the default binding for the Super+Q key to close the current window. This is useful if you want to use that binding to launch the guake terminal. I used to use tilix in quake mode, but that doesn’t work in Wayland, so I am using guake for that now. But I’m still using tilix.

Remap Caps Lock to Ctrl #

Here’s a snippet to allow you map your Caps Lock key to the Ctrl key:

function remapCapsLockKey
    echo "Remapping caps lock key"
    # https://opensource.com/article/21/5/remap-caps-lock-key-linux
    dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:ctrl_modifier']"
    # dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:ctrl']"
end

Chrome issues w/ Wayland #

If you find Chrome to be blurry (or AppImages or Electron apps), then you may need to do the following to fix this in Wayland:

  • Navigate to chrome://flags
  • Change Preferred Ozone Platform from default to wayland
  • More info

libfuse2 and AppImage issues #

On Ubuntu 24.04 I ran into some issues w/ libfuse2 and running AppImages.

  • Ubuntu 24 does not come w/ libfuse2 out of the box (for good reasons), and instead it has libfuse3.
  • And AppImage currently only supports libfuse2.

Approach 1 - simple #

Instead of installing libfuse2, however, if you don’t want to do that you can simply run the your XYZ.AppImage using the following command (once it’s been marked as executable):

chmod +x XYZ.AppImage
./XYZ.AppImage \
  --no-sandbox --enable-features=UseOzonePlatform,WaylandWindowDecorations \
  --ozone-platform-hint=auto

Explanation of the flags:

  • --no-sandbox - removes the need for libfuse2
  • --enable-features=UseOzonePlatform,WaylandWindowDecorations - tells chromium in electron to do things for Wayland.
  • --ozone-platform-hint=auto - tells chromium to use Wayland if it is available. This setting is set to X11 by default. If you see blurry windows in Chrome, you may need to set this in your Chrome too (using chrome://flags/).

Here’s an example of my ~/.local/share/applications/uhk-agent.desktop file, which I use to run the uhk-agent AppImage w/ the above flags:

[Desktop Entry]
Type=Application
Name=UHK Agent
Comment=Launch UHK Agent
Categories=Utilities;
Icon=/home/nazmul/bin/uhk-agent.png
Exec=/home/nazmul/bin/UHK.Agent.AppImage --no-sandbox --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto
Terminal=false

Approach 2 - complex #

Here’s another approach to run AppImages, which is more complex:

  • libfuse2 is not included with Ubuntu 24.04. AppImages are difficult to run (since they need libfuse2 installed).
  • To run them, have to pass an extra flag in the terminal or .desktop file(eg for uhk-agent). here’s a workaround (to keep from installing libfuse2).

Here’s an example of the command to run the uhk-agent AppImage:

/UHK.Agent-4.2.0-linux-x86_64.AppImage --appimage-extract
cd squashfs-root
./uhk-agent --no-sandox

Here’s a script that uses this complex approach to unpack an AppImage into the ~/bin folder so you can run it.

Settings -> Key mappings #

  • To create keyboard shortcuts that launch a shell command, wrap it in sh -c $CMD. This is what must be done for flameshot, and ulauncher.
  • Bind ulauncher-toggle to the settings -> keyboard shortcuts in gnome.

OBS Studio issues #

obs-studio has some UI issues, and dialog boxes are quite glitchy and don’t display properly. keyboard shortcuts can’t be reliably used when the obs-studio window is not in focus. can’t really bind to settings -> keyboard shortcuts either, since there’s no command to stop recording; start recording will spawn a new process.

Fontconfig #

Custom font install using script. optional - ~/.config/fontconfig/fonts.conf change for system fonts that affect all apps. also gnome-tweaks to change fonts, and other settings.

Build with Naz video series on developerlife.com YouTube channel #

If you have comments and feedback on this content, or would like to request new content (articles & videos) on developerlife.com, please join our discord server.

You can watch a video series on building this crate with Naz on the developerlife.com YouTube channel.

👀 Watch Rust 🦀 live coding videos on our YouTube Channel.



📦 Install our useful Rust command line apps using cargo install r3bl-cmdr (they are from the r3bl-open-core project):
  • 🐱giti: run interactive git commands with confidence in your terminal
  • 🦜edi: edit Markdown with style in your terminal

giti in action

edi in action

Related Posts