- Notifications
You must be signed in to change notification settings - Fork118
Comments
Switch from hardcodinggnome-terminal to usingxdg-terminal-exec#170
Switch from hardcodinggnome-terminal to usingxdg-terminal-exec#170michel-slm wants to merge 1 commit intop-e-w:masterfrom
gnome-terminal to usingxdg-terminal-exec#170Conversation
This is packaged in various Linux distros already:https://repology.org/project/xdg-terminal-exec/versionsand 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 tobe26861Compare| For GNOME 45 and newer, you need `xdg-terminal-exec` since on newer GNOME | ||
| releases we cannot assume `gnome-terminal` is preinstalled. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
AFAICS thexdg-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 havexdg-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}"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For now, I'd only accept a commit that would test ifxdg-terminal-exec was available and fall back tognome-terminal otherwise.
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)