On Fri, Mar 22, 2013 at 12:19 PM, Timo Sand <timo.j.s...@gmail.com> wrote:
> well my use case is actually that I'm trying to use the gem
> 'gem-browse' which uses 'git web--browse'
> I'm not using Apple Terminal, I'm using iTerm2 and there doesn't seem
> to be a SECURITYSESSIONID set, at least echo didn't find any. But
> neither did I find it on Apple Terminal either.
I noticed this the other day, but I think SECURITYSESSIONID only gets
set when Screen Sharing is enabled. I had Screen Sharing enabled,
launched iTerm2 and saw the variable. I closed iTerm2, turned off
Screen Sharing, and relaunched iTerm2 to find the variable missing.
As a result, I'm not SECURITYSESSIONID is a good mechanism for
determining whether the terminal is associated a GUI or not.
Unfortunately, I don't know of a better way.
> What troubles me is that this issue has only arisen recently, earlier
> this worked fine for me
The following patch fixes the issue by recognizing iTerm2 as a GUI terminal.
>From 5d282325f9374b25609a8704661c252304b4d18a Mon Sep 17 00:00:00 2001
Date: Fri, 22 Mar 2013 13:23:07 -0400
Subject: [PATCH] git-web--browse: recognize iTerm as a GUI terminal on OS X
Signed-off-by: John Szakmeister <j...@szakmeister.net>
git-web--browse.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 1e82726..1ff5379 100755
@@ -120,6 +120,7 @@ if test -z "$browser" ; then
# SECURITYSESSIONID indicates an OS X GUI login session
if test -n "$SECURITYSESSIONID" \
+ -o "$TERM_PROGRAM" = "iTerm.app" \
-o "$TERM_PROGRAM" = "Apple_Terminal" ; then
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html