0

It'll be no shock that some non-elementary OS apps don't look right with the default elementary OS theme. I understand that theming is a Hard Problem™.

Sometimes buttons don't look like buttons, or half the buttons have bevels and the other half don't, or UI controls have white text on a grey background color, or sometimes the aesthetics are just bad.

Seahorse, MenuLibre, and Remmina are just a few examples.

Screenshot of Seahorse (Passwords and Keys) showing default elementary OS theme

However, you can specify a custom theme for a GTK app with the GTK_THEME environment variable, and in many cases using the Adwaita theme fixes the display issues. Thus, this should be possible with a .desktop file, too; for example, Exec=env GTK_THEME=Adwaita seahorse.

However, annoyingly, this modification doesn't work for certain applications. Seahorse is one. Running env GTK_THEME=Adwaita seahorse from a terminal however, has the expected effect.

What gives?

1 Answer 1

1

tl;dr: comment out the line that starts with DBusActivatable in the .desktop file.

This section of the always-reliable Arch wiki article for desktop entries was clutch:

Modify command line arguments

To change or add the command line arguments, edit the Exec= line to append the desired options. As an example, with the original line commented out:

# ~/.local/share/applications/steam.desktop
...
# Exec=/usr/bin/steam-runtime %U
Exec=/usr/bin/steam-runtime -no-browser %U
...

Also remove DBusActivatable=true (or set it to false) if present as it will cause the Exec line to be ignored.[2]

That "[2]" refers you to this section of the documentation on gtk.org, which elaborates:

If DBusActivatable is true and the desktop file name looks like a valid application ID, then the Exec line will be ignored and your application will be started by way of D-Bus activation instead (using the name of the desktop file as the application ID). (emphasis mine)

The bolded part is key: the .desktop filename in this case is /usr/share/applications/org.gnome.seahorse.Application.desktop, which, yep, looks like "a valid application ID." I don't know what all the DBus activation stuff is all about, but who cares. I fixed my problem.

Comment out that line with a # and problem solved. Yes, I do this as root, for reasons beyond the scope of this question, and yes, I'm OK with having to repeat that step if an update to the package ships a new .desktop file. Those are minor inconveniences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.