# Trouble with gitk and ActiveState tcltk on OS X

5 messages from 2008-02-10 to 2008-02-11. Participants: Seth Falcon, Shawn O. Pearce, Kalle Olavi Niemitalo, Jay Soffian.
Thread: https://gitlist.dev/t/12015

## Seth Falcon, 2008-02-10 21:15

Subject: Trouble with gitk and ActiveState tcltk on OS X
Message-ID: <m2ve4wh5sx.fsf@ziti.evri.corp>
URL: https://gitlist.dev/e/m2ve4wh5sx.fsf%40ziti.evri.corp

```
Hi all,

I'm hoping that another OS X git user can point me in the right
direction...

I installed the ActiveState tcltk and set the following in
git/config.mak:

    TCLTK_PATH=/usr/local/bin/wish8.5

With this, git gui works great (I get a real icon when switching apps
and the overall look is more consistent than when I was running with
X11 + MacPorts tcltk).

But gitk does not work.  gitk starts up but no window appears.  The
menus appear, but that's it.

If I start X11 and switch the wish path to /opt/local/bin/wish in the
gitk script, then things work.  Any suggestions for running gitk
without X11 on OS X?

Thanks,

+ seth

-- 
Seth Falcon | seth@userprimary.net | blog: http://userprimary.net/user/

```

## Shawn O. Pearce, 2008-02-11 04:49

Subject: Re: Trouble with gitk and ActiveState tcltk on OS X
Message-ID: <20080211044941.GX24004@spearce.org>
URL: https://gitlist.dev/e/20080211044941.GX24004%40spearce.org
In-Reply-To: <m2ve4wh5sx.fsf@ziti.evri.corp>

```
Seth Falcon <seth@userprimary.net> wrote:
> I'm hoping that another OS X git user can point me in the right
> direction...
> 
> I installed the ActiveState tcltk and set the following in
> git/config.mak:
> 
>     TCLTK_PATH=/usr/local/bin/wish8.5
> 
> With this, git gui works great (I get a real icon when switching apps
> and the overall look is more consistent than when I was running with
> X11 + MacPorts tcltk).

For what its worth I use the native Tcl/Tk that ships with Mac OS X,
/usr/bin/wish, which is really in /Library/Frameworks/Tk.framework.
I've never used the ActiveState Tcl/Tk package on Mac OS X.

git-gui builds against the Tk.framework I mentioned above when on
Mac OS X.  In particular the git-gui Makefile seems to ignore the
setting of TCLTK_PATH when it sees the above mentioned Tk.framework
is available in your filesystem.

The reason why you get nice icons for git-gui is because we use a
feature of the Aqua port Tcl/Tk framework that allows us to create a
full Mac OS X app by copying a tiny executable from the framework,
and supplying our own resource bundle.  The bundle configures
the icon.  Its the only way to get a custom icon on Mac OS X.

Launching gitk from within git-gui (Repository -> Visualize History)
uses the same app and bundle, so gitk inherits the icon too.
I'd also bet gitk works this way, because it isn't launching through
the ActiveState Tcl/Tk port.

In short, why not just use the native Aqua Tcl/Tk that Apple ships?
Why go through X11 and MacPorts?
 
-- 
Shawn.

```

## Kalle Olavi Niemitalo, 2008-02-11 08:26

Subject: Re: Trouble with gitk and ActiveState tcltk on OS X
Message-ID: <87myq7c30t.fsf@Astalo.kon.iki.fi>
URL: https://gitlist.dev/e/87myq7c30t.fsf%40Astalo.kon.iki.fi
In-Reply-To: <20080211044941.GX24004@spearce.org>

```
"Shawn O. Pearce" <spearce@spearce.org> writes:

> In short, why not just use the native Aqua Tcl/Tk that Apple ships?

With the Tcl 8.4b and Tk 8.4 that Apple bundles with Mac OS 10.5.1,
two-finger scrolling with the MacBook touchpad does not work in gitk,
and I think buttons in dialog boxes were sometimes invisible.
Upgrading both to 8.4.16 (Tk still Aqua) fixed these problems for me.

```

## Seth Falcon, 2008-02-11 15:51

Subject: Re: Trouble with gitk and ActiveState tcltk on OS X
Message-ID: <m2zlu71ofs.fsf@userprimary.net>
URL: https://gitlist.dev/e/m2zlu71ofs.fsf%40userprimary.net
In-Reply-To: <20080211044941.GX24004@spearce.org>

```
"Shawn O. Pearce" <spearce@spearce.org> writes:
> For what its worth I use the native Tcl/Tk that ships with Mac OS X,
> /usr/bin/wish, which is really in /Library/Frameworks/Tk.framework.
> I've never used the ActiveState Tcl/Tk package on Mac OS X.
>
> git-gui builds against the Tk.framework I mentioned above when on
> Mac OS X.  In particular the git-gui Makefile seems to ignore the
> setting of TCLTK_PATH when it sees the above mentioned Tk.framework
> is available in your filesystem.
>
> The reason why you get nice icons for git-gui is because we use a
> feature of the Aqua port Tcl/Tk framework that allows us to create a
> full Mac OS X app by copying a tiny executable from the framework,
> and supplying our own resource bundle.  The bundle configures
> the icon.  Its the only way to get a custom icon on Mac OS X.
>
> Launching gitk from within git-gui (Repository -> Visualize History)
> uses the same app and bundle, so gitk inherits the icon too.
> I'd also bet gitk works this way, because it isn't launching through
> the ActiveState Tcl/Tk port.
>
> In short, why not just use the native Aqua Tcl/Tk that Apple ships?
> Why go through X11 and MacPorts?

Hmm.  I don't doubt that I've inadvertently made things harder than
they need to be, but...

I've just tried uninstalling the ActiveState stuff and removing the
MacPorts stuff.

Indeed git gui runs, but I no longer get the nice icon (instead a
default Tcl/Tk icon with a feather).  Launching gitk from the git gui
menu results in the same behavior for me: it launches and its menu
appears, but no window.  It is quite odd because I can open the
preference window for gitk via the menu and _that_ mini window does
appear.  Same thing if I launch gitk from the command line.

If I try to open the "Git Gui.app" I get:
ziti:git-gui seth$ open Git\ Gui.app/
LSOpenFromURLSpec() failed with error -10810 for the file /Users/seth/src/git-MASTER/git-gui/Git Gui.app.

I've recently upgraded my system to Leopard, so I wouldn't be
surprised if that is related to some of these issues.

Is there a big difference between how git gui uses Tcl/Tk and gitk?
It seems really odd to me that one works and the other not so much :-\

Any other things to try or suggestions of where to look for root
causes?

Thanks again,

+ seth


-- 
Seth Falcon | seth@userprimary.net | blog: http://userprimary.net/user/

```

## Jay Soffian, 2008-02-11 17:59

Subject: Re: Trouble with gitk and ActiveState tcltk on OS X
Message-ID: <76718490802110959y10df4bc6xfe98a9de57a4f8a@mail.gmail.com>
URL: https://gitlist.dev/e/76718490802110959y10df4bc6xfe98a9de57a4f8a%40mail.gmail.com
In-Reply-To: <20080211044941.GX24004@spearce.org>

```
On Feb 10, 2008 11:49 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
> For what its worth I use the native Tcl/Tk that ships with Mac OS X,
> /usr/bin/wish, which is really in /Library/Frameworks/Tk.framework.

Under 10.5, it's /System/Library/Frameworks/Tk.framework and the app
is now /System/Library/Frameworks/Tk.framework/Resources/Wish\
Shell.app. I'll work on a patch for the git-gui Makefile in next (or
master?) to work w/both 10.4 and 10.5 if I can figure out the darn
Makefile quoting (loathe whitespace in path names).

j.

```
