Build with Naz : Ubuntu 24.04 setup and config for dev productivity
- Introduction
- Related videos
- What comes with the scripts
- Running the scripts
- Gnome Extensions
- Keyboard remapping
- Chrome issues w/ Wayland
- libfuse2 and AppImage issues
- Settings -> Key mappings
- OBS Studio issues
- Fontconfig
- Build with Naz video series on developerlife.com YouTube channel
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.
Related videos #
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:
fish
as the default login shell. All the configuration scripts are written infish
.bass
is also installed to allow for runningbash
scripts infish
.rustup
,brew
, andflatpak
withflathub
as package managers.docker
anddocker-compose
for containerization.obs-studio
for screen recording and streaming.vlc
,mpv
for media playback.chrome
for web browsing.vscode
for code editing.- Lots of Gnome extensions for desktop customization.
nerd-fonts
for terminal font customization. Along withguake
andtilix
for terminal emulators. Along withtmux
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:
- https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/0-bootstrap.bash
- https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/1-install.fish
- https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/2-install-docker.bash
- https://raw.githubusercontent.com/nazmulidris/rust-scratch/main/ubuntu24/3-install-fonts.fish
Optional scripts:
- https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/install-agent-into-bin.fish
- https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/fix-gnome-session-path-env-var-linuxbrew.fish
- https://github.com/nazmulidris/rust-scratch/blob/main/ubuntu24/fix-usr-local-bin-symlinks.fish
Gnome Extensions #
- Tactile tiling support
- Tiling shell tiling support
- Weather in top bar
- Vitals in top bar
- Emoji chooser in top bar
- Clipboard history
- Burn my windows animation for window open and close
- Just Perfection ultra GNOME customization
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
.
- https://askubuntu.com/questions/977876/changing-command-super-q
- https://flameshot.org/docs/guide/wayland-help/
- https://github.com/Ulauncher/Ulauncher/wiki/Hotkey-In-Wayland
- https://askubuntu.com/questions/26056/where-are-gnome-keyboard-shortcuts-stored
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
fromdefault
towayland
- More info
libfuse2 and AppImage issues #
On Ubuntu 24.04 I ran into some issues w/ libfuse2
and running AppImage
s.
- Ubuntu 24 does not come w/
libfuse2
out of the box (for good reasons), and instead it haslibfuse3
. - And
AppImage
currently only supportslibfuse2
.
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 toX11
by default. If you see blurry windows in Chrome, you may need to set this in your Chrome too (usingchrome://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 AppImage
s, which is more complex:
libfuse2
is not included with Ubuntu 24.04.AppImage
s are difficult to run (since they needlibfuse2
installed).- To run them, have to pass an extra flag in the terminal or
.desktop
file(eg foruhk-agent
). here’s a workaround (to keep from installinglibfuse2
).
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 forflameshot
, andulauncher
. - 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.
- https://jichu4n.com/posts/how-to-set-default-fonts-and-font-aliases-on-linux/
- https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
- https://en.wikipedia.org/wiki/Fontconfig
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.
- YT channel
- Playlists
👀 Watch Rust 🦀 live coding videos on our YouTube Channel.
📦 Install our useful Rust command line apps usingcargo 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 terminalgiti in action
edi in action