GNOME Bugzilla – Bug 769792
provide a terminal export variable to track if inside builder
Last modified: 2016-09-16 05:23:11 UTC
It might be good to provide a variable (like 'INSIDE_BUILDER') when terminal emulator is run inside builder. Editors like GNU Emacs do that. Emacs sets a variable 'INSIDE_EMACS' so that any Emacs only changes (changes to shell when run inside Emacs) can use that variable to conditionally do things. The usual use cases includes: 1. shorten PS1, as there is less space for term. 2. set variables like MALLOC_CHECK_, MALLOC_PERTURB_, etc.
Seems reasonable to me. The target code for this will be in plugins/terminal/gbp-terminal-view.c and look for vte_terminal_spawn_sync(). Currently we pass NULL for the environ, so we'll need to modify that.
Created attachment 335437 [details] [review] terminal: Add INSIDE_GNOME_BUILDER This allows programs to detect when running inside Builder and perform version checks.
Review of attachment 335437 [details] [review]: LGTM
Created attachment 335666 [details] [review] terminal: Add INSIDE_GNOME_BUILDER v2 This allows programs to detect when running inside Builder and perform version checks. Update due to recent changes.
Review of attachment 335666 [details] [review]: LGTM!
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.