sodaliterocks / sodalite

🪨 A Pantheon experience for rpm-ostree
https://sodalite.rocks
MIT License
209 stars 6 forks source link

the .desktop file generated by distrobox does not work #72

Closed Heus-Sueh closed 1 year ago

Heus-Sueh commented 1 year ago

image

I try to open it but nothing happens it seems the error has to do with terminal not being gnome terminal or konsole I don't know if the error has to do with the desktop patheon or distrobox

electricduck commented 1 year ago

(Disclaimer: this answer is based on my rudimentary knowledge of GNOME/Glib, some quick research, and my own personal experience)

So, Terminal= is a bit of an odd one in a .desktop file as it behaves differently depending on the DE. DEs using glib — so GNOME and Pantheon — have a hardcoded list of terminals to look through to launch from, and it seems Pantheon Terminal is missing from that list. You can try this yourself by doing gtk-launch fedora-37.desktop: you'll see it spit out an error that it cannot find a terminal.

There's also the property in dconf at org.gnome.desktop.applications.terminal exec which is set to io.elementary.terminal, but it doesn't seem this does anything.

You have two workarounds, however:

1. Launching Pantheon Terminal directly:

2. Bash wrapper

Create a file at /usr/local/bin/gnome-terminal and add the following contents:

#!/usr/bin/env bash
shift
io.elementary.terminal -x $@

Don't forget to set it as executable too (sudo chmod +x /usr/local/bin/gnome-terminal).

Since /usr/local/bin/ is in your $PATH, glib will search for gnome-terminal in there too and should fire it up; this command acts as a stub to redirect it to Pantheon Terminal. I would hardcode this into Sodalite itself, but it will make it impossible to install GNOME Terminal afterwards, which some users might legitimately need.


I also noticed you have a few errors in your desktop file:

Further Reading