elementary / default-settings

Default settings for elementary OS
GNU General Public License v3.0
39 stars 28 forks source link

Set environment variable TERM to io.elementary.terminal #133

Closed jeremypw closed 3 years ago

jeremypw commented 5 years ago

The environment variable TERM defaults to xterm. It should be set to io.elementary.terminal on initial install. (There should also be a way for the user to change/reset this but that is another issue).

jeremypw commented 5 years ago

Fixing this would faciliate a workaround in slingshot handling or applications or commands that need to be run in a terminal window by allowing the preferred terminal program to be identified correctly.

see https://github.com/elementary/applications-menu/issues/232

davidmhewitt commented 3 years ago

We shouldn't be changing this variable, it's more of an identifier of the capabilities of the terminal than it is the name of an executable to launch.

The code in GLib, via the linked issue, doesn't even check this environment variable, it's hardcoded to use xterm if none of the other hardcoded list of terminals are available.

davidmhewitt commented 3 years ago

It sounds to me that the correct solution to this problem is to submit a PR to GLib to add our terminal into the list, and put a workaround in applications menu itself to intercept launches of terminal applications and pass them to our terminal if it's installed, otherwise carry on doing what its doing now.

worldofpeace commented 3 years ago

That code in GLib is a serious pain for everyone. @davidmhewitt Are we sure it will be accepted or does the elementary project get special treatment https://gitlab.gnome.org/GNOME/glib/-/issues/2324 ?

worldofpeace commented 3 years ago

Perhaps there's discordance within the codebase itself :rofl: https://gitlab.gnome.org/GNOME/glib/-/commit/0b0fcfad11cadd43ff1ce96800ebbce70016ffc3

davidmhewitt commented 3 years ago

I don't know whether elementary terminal would be accepted into the list. But I know that changing the TERM environment variable isn't the solution, which is the part that's relevant to this discussion.

jeremypw commented 3 years ago

If the correct solution is not to change this repo then please close this issue.

worldofpeace commented 3 years ago

Decided to test the waters with a reasonable pawn https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1946 and this confirmed that they don't want to accept that and want terminal maintainers to contribute https://gitlab.gnome.org/GNOME/glib/-/issues/338.