{"thread":{"id":"20942","subject":"[PATCH] web--browse: fix Mac OS X GUI detection for 10.6","startedAt":"2009-09-14T08:49:01Z","lastAt":"2009-09-14T08:49:01Z","messageCount":1,"participants":["Heiko Voigt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123137","messageId":"20090914084901.GB29641@macbook.lan","threadId":"20942","inReplyTo":null,"subject":"[PATCH] web--browse: fix Mac OS X GUI detection for 10.6","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2009-09-14T08:49:01Z","receivedAt":"2009-09-14T08:49:01Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Since OS X 10.6 the variable $SECURITYSESSIONID does not exist anymore,\nso lets look for the $TERM_PROGRAM variable as backup.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n git-web--browse.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-web--browse.sh b/git-web--browse.sh\nindex 4f5c740..a578c3a 100755\n--- a/git-web--browse.sh\n+++ b/git-web--browse.sh\n@@ -111,7 +111,8 @@ if test -z \"$browser\" ; then\n \tbrowser_candidates=\"w3m links lynx\"\n     fi\n     # SECURITYSESSIONID indicates an OS X GUI login session\n-    if test -n \"$SECURITYSESSIONID\"; then\n+    if test -n \"$SECURITYSESSIONID\" \\\n+\t    -o \"$TERM_PROGRAM\" = \"Apple_Terminal\" ; then\n \tbrowser_candidates=\"open $browser_candidates\"\n     fi\n     # /bin/start indicates MinGW\n-- \n1.6.5.rc1.dirty\n"}]}