As many long-term readers of this blog know, I am pretty firmly entrenched into my Gnome 3 workflow and I try to keep my desktop experience as consistent as possible between the various machines and operating systems that I run. Over the years, I have been spending more and more time using Ubuntu and have become a real fan of the look and feel of the Yaru theme.
I thought it would be fun to document how I make my OpenBSD 7.3 system look and feel as close as I can to my current Ubuntu 23.10 (daily) system. As a result, this blog post might not be too useful for most of my readers so feel free to bail out. If, however, you have an interest in knowing how to tweak OpenBSD in this way, then by all means press on!
Installing the Basics
First, we assume a fresh install of OpenBSD that is fully patched up. We need to get some housekeeping out of the way so that we have a basic system on which to start customizing so I’ll detail the steps below:
# Set up APMD on the laptop for power management $ doas rcctl enable apmd $ doas rcctl set apmd flags -A $ doas rcctl start apmd # Add my user to the staff login class $ doas usermod -L staff USERNAME # Modify the following in /etc/login.conf ... staff:\ :datasize-cur=4096M:\ :datasize-max=infinity:\ :maxproc-max=512:\ :maxproc-cur=256:\ :openfiles-max=102400:\ :openfiles-cur=102400:\ # Modify /etc/sysctl.conf kern.maxfiles=102400 # Install the base software needed $ doas pkg_add gnome gnome-tweaks gnome-extras vim $ doas rcctl disable xenodm $ doas rcctl enable multicast messagebus avahi_daemon gdm # Install additional software and utilities $ doas pkg_add filerfox chromium libreoffice nextcloudclient $ doas pkg_add keepassxc aisleriot evolution evolution-ews $ doas pkg_add tor-browser shotwell gimp
Tweaking the Themes and Extensions
OK. After rebooting and logging into a vanilla Gnome desktop through gdm, time to add the yaru theme. This can be found by searching for “yaru-remix” on https://www.gnome-look.org and installing it manually as follows:
# Download yaru-remix-complete-20.10.tar.xz $ cd ~ $ mkdir .themes $ cd .themes $ mv ~/Downloads/yaru-remix-complete-20.10.tar.xz $ unxz yaru-remix-complete-20.10.tar.xz $ tar xf yaru-remix-complete-20.10.tar $ mv themes/* . $ rmdir themes $ doas mv icons/* /usr/local/share/icons $ rmdir icons $ doas mv wallpaper/* /usr/local/share/backgrounds/gnome $ rmdir wallpaper $ rm yaru-remix-complete-20.10.tar
At this point, launch “extensions” and turn on “User Themes”. To pick up this change, you will have to restart Gnome so I normally just do a reboot. Once I’m back, I fire up “Tweaks” and on the “Appearance” tab, I select “Yaru-remix-dark” for Icons, Shell and Legacy Applications. I also turn on minimize and maximize on the “Window Titlebars” page and enable Mouse Click Emulation – Fingers” on the “Keyboard & Mouse” page.
Now we have something that is starting to look like Ubuntu. The next step will be to use the wonderful Gnome extension “Dash to Dock” to get that good old “Unity” looking launcher on the left. First, download the latest version of the extension (for your version of Gnome Shell – Settings -> About) from https://extensions.gnome.org/extension/307/dash-to-dock and drop to a terminal.
$ mkdir -p ~/.email@example.com $ cd ~/.firstname.lastname@example.org $ unzip ~/Downloads/dash-to-docmicxgx.gmail.com*.zip
Now fire up “Extensions” and turn on Dash to Dock. Press the “Settings” button to get to the settings for the extension. Position the dock on the screen to the “Left”, select “Panel mode” and set the icon size limit to what works for you. On the “Launchers” tab, I turn off the “Show trash can” and “Show volumes and devices” because I don’t use that functionality and would rather have room for more stuff that I can “pin” to the dock.
I typically pin Chromium, Firefox, Evolution, Files and Terminal to my dock. To accomplish this, I typically just launch the application with the Meta key and type it’s name, then hit Enter. It should now have an icon as a running application in the dock. I right-click on it and select “Pin to Dock”. I then position it by dragging it to where I’d like to see it.
Don’t Forget the Terminal
OK. So now we have the Yaru theme and a dock on the left that looks a lot like what you have in Ubuntu. It’s time to start tweaking other aspects of the setup. To get the Ubuntu font, you will need to:
$ doas pkg_add ubuntu-fonts $ doas fc-cache
Launch tweaks again and set the Interface Text to “Ubuntu Medium” and the “Legacy Window Titles” to “Ubuntu Bold”. I also change my Antialiasing to Subpixel because it is a laptop with an LCD screen.
Now for the terminal window. From the hamburger menu on the right of the titlebar of the terminal, select “Preferences” and the “Unnamed”. On the “Text” tab, click the “Custom font” checkbox. Switch to the “Colors” tab. Here, we are going to change a lot of things. The first thing I change is to uncheck the “Use colors from system theme” and select “GNOME dark” from the “Built-in schemes”.
Then, I set the following colors:
- Background color: #481036
- Palette Color 4 (the blue one in the top row): #1572E6
Now, I need to modify things so that when I do an “ls”, I actually get colors. To accomplish that, I install the “colorls” package and alias “ls” to “colorls -G”:
$ doas pkg_add colorls # Add the following to ~/.profile: export ENV=$HOME/.kshrc # Create ~/.kshrc alias ls="colorls -G"
If you reboot, you should notice that typing “ls” shows your files color-coded based on the file type. Now, we need to edit the PS1 environment variable to get our terminal’s command prompt to look like the one in Ubuntu. To do this, add the following to your ~/.profile:
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
Now, a final reboot should have you looking pretty darned similar to Ubuntu. I’m not doing anything nutty like changing my default shell from ksh to bash (although I guess you could do that). Happy OpenBSD-ing!