Switch from hardcoding gnome-terminal to using xdg-terminal-exec#170
Open
michel-slm wants to merge 1 commit intop-e-w:masterfrom
Open
Switch from hardcoding gnome-terminal to using xdg-terminal-exec#170michel-slm wants to merge 1 commit intop-e-w:masterfrom
gnome-terminal to using xdg-terminal-exec#170michel-slm wants to merge 1 commit intop-e-w:masterfrom
Conversation
This is packaged in various Linux distros already: https://repology.org/project/xdg-terminal-exec/versions and we can't assume that gnome-terminal is preinstalled anymore (CentOS Stream 10, RHEL 10 and derivatives, Fedora 47+ and Ubuntu have switched to ptyxis by default) (not sure why the openSUSE version number is weird) Signed-off-by: Michel Lind <salimma@fedoraproject.org>
0ddcd29 to
be26861
Compare
mwilck
requested changes
Sep 8, 2025
|
|
||
| For GNOME 45 and newer, you need `xdg-terminal-exec` since on newer GNOME | ||
| releases we cannot assume `gnome-terminal` is preinstalled. | ||
|
|
Collaborator
There was a problem hiding this comment.
AFAICS the xdg-terminal-exec is still a proposal, and not an accepted standard.
This may work on new installations, but has high potential of breaking existing ones. I, for one, use a openSUSE Tumbleweed, and while my distro is fully up to date, I don't have xdg-terminal-exec on my system.
Side note: There is no Fedora 47, and the openSUSE "version number" (I suppose you're referring to Tumbleweed, which is a rolling distro) is just date expression.
| // Run shell immediately after executing the command to keep the terminal window open | ||
| // (see http://stackoverflow.com/q/3512055) | ||
| argv = ["gnome-terminal", "--", "bash", "-c", activeLine.bash + "; exec ${SHELL:=bash}"]; | ||
| argv = ["xdg-terminal-exec", "--", "bash", "-c", activeLine.bash + "; exec ${SHELL:=bash}"]; |
Collaborator
There was a problem hiding this comment.
For now, I'd only accept a commit that would test if xdg-terminal-exec was available and fall back to gnome-terminal otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is packaged in various Linux distros already: https://repology.org/project/xdg-terminal-exec/versions
and we can't assume that
gnome-terminalis preinstalled anymore (CentOS Stream 10, RHEL 10 and derivatives, Fedora 47+ and Ubuntu have switched to ptyxis by default)(not sure why the openSUSE version number is weird)