2024-09-21
I am not a designer. At least, not in the sense that I can design pleasing-looking user interfaces. I can program user interfaces, and implement features, but I have little intuition for knowing what colors look good together, how big the specific elements should be relative to each other, or what specific typeface works best in this context.
I can, however, generally tell whether something looks good or not. As the (lack of) styling on this site can attest, I may not be a connoisseur of good taste, but I am generally able to look at something and tell if I and others would accept it as usable. This means I can, with enough time, brute-force my way into something passable when I need to.
I could be mistaken, but this appears to be where the developers of Qubes OS are at as well. If you've not heard of Qubes before, it's a wonderful operating system that runs everything in virtual machines[1] to provide separation between domains, where "domains" can be whatever you'd like—e.g., you can have a VM for all things work, and a VM for all things personal, and a compromise of one doesn't immediately turn into a compromise of the other the way it would in most operating systems. The individuals who have developed it over the years have done an amazing job building a system to allow that with impressively little friction for the user, but the user interface appears to have been designed by engineers to look cutting-edge in the late 90s.
It's at least better than it used to be—take a look at some of the screenshots on the Qubes site (I checked, and that border really is 255-0-0 red). Again, don't get me wrong, the interface is impressively good at accomplishing what it seeks to accomplish, and I doubt I would have been able to do much better if I were the one designing it with no help. But while I certainly wouldn't pick myself to create the styling for an OS, thankfully, we don't have to rely on my skill or taste. In the tradition of free and open source software, we can steal (with love) from another project that has done the hard work for us. In this case, we can modify Qubes' Xfce desktop environment configuration by stealing the design choices of Xubuntu—the Ubuntu derivative that uses Xfce.[2] I don't know that all of their choices are my favorites, but I do know I like the look of a default Xubuntu install better than the look of a default Qubes install, and that gives us an easier place to start from when forming preferences.
Here is what the UI looks like with a more Xubuntu-inspired aesthetic:
This is a set of instructions to get a Qubes OS Xfce install looking more like a Xubuntu install. The main focus here is on aesthetic configuration. While some behavioral configuration is listed as well, most people know whether they prefer things like window snapping, raise on click, etc.; going from "I don't like how this looks" to "this looks good" is much harder, at least in my opinion. The result will of course not look exactly like Xubuntu, since they are ultimately very different operating systems with different requirements—e.g., Qubes needs to let the GUI VM (typically dom0, which I'll assume from here on) draw all the window borders, making client-side decorations (CSD) always redundant.[3]
While these steps could be scripted, I'm presenting them mostly from the perspective of navigating the settings manager, since the bulk of the configuration is in dom0 or template VMs, which you should not get in the habit of connecting to a network or running random scripts in. If you would prefer to see the raw config files, you can use the links in the Sources at the end to find the relevant Xubuntu configs (do not use them without reading them though, they contain references to things that don't exist in Qubes).
The instructions in this section primarily apply to dom0. You can also run the Xfce settings manager to configure these for individual qubes, but do not use it in template VMs if you want it to be the default settings in new qubes—see the next section for details.
In dom0, first install whiskermenu, and some themes. Run the following in a dom0 terminal (you'll need to type it in manually; the four greybird packages should already be installed in Qube's Xfce default if you want to save some keystrokes):
sudo qubes-dom0-update xfce4-whiskermenu-plugin \
elementary-xfce-icon-theme dmz-cursor-themes \
greybird-dark-theme greybird-light-theme \
greybird-xfce4-notifyd-theme greybird-xfwm4-theme
Then, in the Settings Manager app, set the following settings (settings that default to the same values in Qubes, as of this writing, are elided):
Greybird
elementary Xfce dark
Noto Sans Regular
9
Slight
RGB
[4]xfconf-query -c xsettings -p /Xft/Lcdfilter -n -t string -s lcddefault
[6]48
64
Greybird
24
qubes-logo
)transparent
transparent
22
Greybird
Noto Sans Bold
9
Shade
(the up arrow)DejaVu Sans Mono Regular
10
(sometimes called DejaVu Sans Mono Book
)#B7B7B7
#131926
#0F4999
#163B59
on left setting (leave as-is for right)#FFFFFF
)#44AA44
#0039AA
[7]#AA22AA
#1A92AA
#777777
#FF8787
#4CE64C
#DED82C
#295FCC
#CC58CC
#4CCCE6
qvm-run
command.250 ms
DMZ (White)
(dom0 only)To get other qubes to look consistent with the above settings, you'll either need to use an Xfce template VM, or install the desired Xfce packages yourself.
You'll also want to install elementary-xfce-icon-theme
and greybird
theme package equivalents available in the respective package manager (whiskermenu and cursor themes aren't necessary, those get handled by dom0).
In Debian templates, those packages are elementary-xfce-icon-theme
and greybird-gtk-theme
, respectively; in Fedora templates, they're named the same as the dom0 packages.
If you only want individual qubes to share the settings, you can just launch xfce4-settings-manager
from within that qube and repeat the steps from the previous section, skipping anything labeled as dom0 only.
Note that doing so in the template VMs will not cause the settings to apply to qubes that use it, and that changing any setting in a qube will prevent any future defaults for that component (configured in the template) from applying.
Once you configure defaults in the template, you can apply different modifications to the settings in individual qubes, allowing distinct configurations for different domains—e.g., you can use different terminal colors, or different notification themes and positions, for different qubes.
To get settings to be the default on all qubes based on a template, you need to modify the respective default config files in the template VM.
These might have different locations depending on the distro you're using, but should generally be located somewhere in /etc/xdg/
and /usr/share/
.
The following diff/patch sets the relevant Appearance settings in debian-xfce templates.
The values for RGBA
,[4] DPI
,[5] and Lcdfilter
[6] will depend on your display, as before.
You can copy and paste it into a file on the template VM (or a disposable VM if you want to try it out first), then apply it with sudo patch /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml < xsettings.patch
(where xsettings.patch
is whatever you named the file).
Alternatively, you can just edit xsettings.xml
as root with your favorite text editor by hand, inserting the updated values and, in the case of DPI
, type.
Either way, you should probably make a backup of the file first.
--- /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.orig
+++ /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
@@ -6,9 +6,9 @@
<channel name="xsettings" version="1.0">
<property name="Net" type="empty">
- <property name="ThemeName" type="string" value="Xfce"/>
- <property name="IconThemeName" type="string" value="Tango"/>
- <property name="DoubleClickTime" type="int" value="400"/>
+ <property name="ThemeName" type="string" value="Greybird"/>
+ <property name="IconThemeName" type="string" value="elementary-xfce-dark"/>
+ <property name="DoubleClickTime" type="int" value="250"/>
<property name="DoubleClickDistance" type="int" value="5"/>
<property name="DndDragThreshold" type="int" value="8"/>
<property name="CursorBlink" type="bool" value="true"/>
@@ -18,17 +18,17 @@
<property name="EnableInputFeedbackSounds" type="bool" value="false"/>
</property>
<property name="Xft" type="empty">
- <property name="DPI" type="empty"/>
- <property name="Antialias" type="int" value="-1"/>
- <property name="Hinting" type="int" value="-1"/>
- <property name="HintStyle" type="string" value="hintnone"/>
- <property name="RGBA" type="string" value="none"/>
- <!-- <property name="Lcdfilter" type="string" value="none"/> -->
+ <property name="DPI" type="int" value="96"/>
+ <property name="Antialias" type="int" value="1"/>
+ <property name="Hinting" type="int" value="1"/>
+ <property name="HintStyle" type="string" value="hintslight"/>
+ <property name="RGBA" type="string" value="rgb"/>
+ <property name="Lcdfilter" type="string" value="lcddefault"/>
</property>
<property name="Gtk" type="empty">
<property name="CanChangeAccels" type="bool" value="false"/>
<property name="ColorPalette" type="string" value="black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"/>
- <property name="FontName" type="string" value="Sans 10"/>
+ <property name="FontName" type="string" value="Noto Sans 9"/>
<property name="MonospaceFontName" type="string" value="Monospace 10"/>
<property name="IconSizes" type="string" value=""/>
<property name="KeyThemeName" type="string" value=""/>
Next, save the contents of Xubuntu's terminalrc to /etc/xdg/xfce4/terminal/terminalrc
(with any modifications to the values you prefer).
You can also make the default color scheme available as a preset if you save the xubuntu-dark.theme to /usr/share/xfce4/terminal/colorschemes/
.
If you'd like the Xubuntu source view themes (i.e., configuration for fonts and colors in Gtk+ programs like Mousepad or Meld that support syntax highlighting), you can find the configuration files for each gtksourceview version in the next section, and save them to the respective location in /usr/share/gtksourceview-*/styles/
.
Default settings for Gtk+ programs you may wish to modify can be found in /usr/share/glib-2.0/schemas/
.
Note that if you're modifying files (or, to a lesser extent, adding files) in /usr
, they're liable to get clobbered during template updates, especially between major revisions—the rule of thumb is that your system-wide settings should go in /etc
, while /usr
(other than /usr/local
) is for assets the distro maintains, but these systems weren't made with Qubes in mind, and it was assumed the values we're setting in /usr
would instead be stored on a per-user basis.
Eventually, it would be nice if there was a (well-vetted) tool in dom0 that let you configure all these things in one place, but that's a project for another day.
The upstream Xubuntu configs are mainly spread across two repos: xubuntu-default-settings and xubuntu-artwork. The most relevant files are listed here, though other potentially useful information can be found by poking around those repos, the xfce4-settings documentation, the Xubuntu documentation, and the XSettingsRegistry.
xubuntu-dark.xml
for
gtksourceview-2.0
and
gtksourceview-5;
and xubuntu-light.xml
for
gtksourceview-2.0
and
gtksourceview-5: Color themes for GTK source views (files for 3.0 and 4 are just symlinks to the files for 2.0)More specifically, Qubes runs the Xen hypervisor with a bunch of custom configuration and applications to make it usable as a desktop OS; see the Qubes Introduction page for a decent jumping-off point into how it works. ↩
Xubuntu itself steals much of its styling from the work of the Shimmer Project, though there is considerable overlap in membership between those projects. ↩
Bonus tip related to this: you can get rid of Firefox's redundant CSD by going to the "customize toolbar" screen, under "more tools", and enabling the "Title Bar" setting at the bottom.
You can also try installing the gtk3-nocsd
package in Debian templates, which attempts to hack away CSD in Gtk+ 3 applications that don't provide a setting to disable it, but it can be a bit buggy, and has had no upstream updates since 2016 (though there does seem to be recent downstream Debian maintenance). ↩
RGB
is the most common subpixel order, but the correct value depends on your display(s).
If you're not sure, you can use a test page to figure it out, or you can just try each option:
look closely at some text in that window, change the setting, then hit "All settings" and navigate back to this dialogue to see how that text changed.
One setting should look sharper than the others (possibly None
if you have non-rectangular pixels on your display), though the difference between None
and the best option will be smaller the higher the pixel density of your display.
If you have multiple displays with different sub-pixel orders (especially common if you have one of your displays rotated), you'll have to make some compromise. ↩ ↩2
Qubes does not forward DPI information, so you'll likely want to set this manually and get it to match across qubes. Similar to subpixel order, there is a "correct" value that depends on the display, and is impossible to set correctly if you have multiple displays at different pixel densities. Just set it to whatever looks good and legible to you. More information on DPI scaling can be found on the Qubes community forum. ↩ ↩2
LCD filtering improves the quality of subpixel rendering on LCD panels by reducing color fringing effects. The default Xfce config leaves it disabled by default, but Xubuntu enables it. Unlike other settings, you'll need to fully log out and log back in (or reboot) for this one to take effect. See the xfce4-settings documentation and the Arch wiki font configuration page for more details. ↩ ↩2
I find this color difficult to read when displayed on the default background, so I set it a bit lighter (but still darker than Light Blue). You can test it with echo $(tput setaf 4) blue text
. ↩