Allow non-hardcoded terminals for launching App with .desktop fiels having a Terminal=true setting.
Currently the list of terminals which are potential used is hard coded:
https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gdesktopappinfo.c#L2589
But this can lead to problems if you e.g. have neither of this terminals installed or generally use a different terminal application and don't want to have a special case for in-terminal applications.
Potential solutions could be:
-
To use
gsettings
org.gnome.desktop.default-applications.terminal
exec
andexec-arg
keys. Given that you probably only run into this problem on a non gnome desktop using a gnome desktop setting might seem strange. But then if you have a program installed which uses gio to launch applications you probably also have gsettings on your system. -
The simpler solution would be to have two environment variables. Maybe a extension to the XDG Desktop Entry Spec. E.g.
XDG_LAUNCH_APPLICATION_TERMINAL_EXEC
andXDG_LAUNCH_APPLICATION_TERMINAL_EXEC_ARG
.
(I also heard some rumors somewhere I think that some people are working on customizing the desktop application launch process so that e.g. you can automatically put any launched desktop application in a cgroup, or sandbox or similar. This might move the whole "decide on the terminal to host the terminal application" question out of gio. But I don't remember where I heard it from and if it's relevant at all).
I'm fine with writing PR(s) myself, but I don't know the direction this project wants to take this direction.