Can't find a usable init.tcl when trying to open Git GUI

2,754 views
Skip to first unread message

Joshua Poehls

unread,
Jun 5, 2010, 7:05:35 PM6/5/10
to msysGit
I just installed the latest 1.7.0.2 release and whenever I try to open
Git GUI I get the following error dialog.

I looked in C:\program files\git\lib\tcl8.5 and found an init.tcl file
that appears (at least to me) to be valid. At least it has a lots of
stuff in it (25 KB worth).

Any ideas on what I can try to get rid of this error?

I am running Windows 7. (I actually have this same release of msysgit
installed on another Windows 7 computer and it doesn't have this
problem.)

---------------------------
Error in Wish
---------------------------
Can't find a usable init.tcl in the following directories:
{C:\program files\git\lib\tcl8.5} {C:/Program Files/Git/lib/
tcl8.5} {C:/Program Files/Git/lib/tcl8.5} {C:/Program Files/lib/
tcl8.5} {C:/Program Files/Git/library} {C:/Program Files/library} {C:/
Program Files/tcl8.5.8/library} C:/tcl8.5.8/library


This probably means that Tcl wasn't installed properly.

---------------------------
OK
---------------------------

Andrew Rollins

unread,
Jun 14, 2010, 3:33:34 AM6/14/10
to msysGit
Also having this problem, though I could swear things were working
fine just a couple weeks ago, and I don't think I changed anything.
I'm on Windows 7. Stumped so far.

- Andrew

Konstantin Khomoutov

unread,
Jun 14, 2010, 7:16:33 PM6/14/10
to msysGit
On Jun 14, 11:33 am, Andrew Rollins <andrew...@gmail.com> wrote:
> Also having this problem, though I could swear things were working
> fine just a couple weeks ago, and I don't think I changed anything.
> I'm on Windows 7. Stumped so far.
>
> - Andrew
>
> On Jun 5, 7:05 pm, Joshua Poehls <jos...@zduck.com> wrote:
>
> > I just installed the latest 1.7.0.2 release and whenever I try to open
> > Git GUI I get the following error dialog.
>
> > I looked in C:\program files\git\lib\tcl8.5 and found aninit.tclfile
> > that appears (at least to me) to be valid. At least it has a lots of
> > stuff in it (25 KB worth).
>
> > Any ideas on what I can try to get rid of this error?
>
> > I am running Windows 7. (I actually have this same release of msysgit
> > installed on another Windows 7 computer and it doesn't have this
> > problem.)
>
> > ---------------------------
> > Error in Wish
> > ---------------------------
> > Can't find a usableinit.tclin the following directories:
> >     {C:\program files\git\lib\tcl8.5} {C:/Program Files/Git/lib/
> > tcl8.5} {C:/Program Files/Git/lib/tcl8.5} {C:/Program Files/lib/
> > tcl8.5} {C:/Program Files/Git/library} {C:/Program Files/library} {C:/
> > Program Files/tcl8.5.8/library} C:/tcl8.5.8/library
>
> > This probably means that Tcl wasn't installed properly.
>
> > ---------------------------
> > OK
> > ---------------------------
>
>

Could you (and Joshua) please verify if the TCL_LIBRARY environment
variable can be a culprit as described in [1]?
To be honest, I have no idea where to look specifically, so possibly
do this:
1) Inspect environment variables (using "My computer" applet or by
running "cmd.exe /k set" from the "Run command..." window).
2) Try running the "set" command in the Git bash window, if you're
using it.

Also may be grepping for "TCL_LIBRARY" in the files under %programfiles
%\Git (and specifically its "etc" subdirectory) might yield something.

In any case please report back. If you find nothing, I'll try to ask
fellow Tclers for help (since Pat Thoyts seems to be not paying close
attention to this stuff presently, or has no time etc).

1. http://wiki.tcl.tk/TCL_LIBRARY

Andrew Rollins

unread,
Jun 14, 2010, 5:40:53 PM6/14/10
to msysGit
I was getting this error when using the shell right click "Git GUI
Here" functionality and from command line. Here is my workaround.
Sorry if it's a little quick and dirty.

* Get ActiveTcl http://www.activestate.com/activetcl/downloads

* Goto this key in registry:
HKEY_CLASSES_ROOT\Directory\shell\git_gui\command

* Change the value under default from:
"C:\Program Files\Git\bin\wish.exe" "C:\Program Files\Git\libexec\git-
core\git-gui" "--working-dir" "%1"
to:
"C:\bin\ActiveTcl8.5.8.2.292682-win32-ix86-threaded.exe" "C:\Program
Files\Git\libexec\git-core\git-gui" --working-dir "%1"

(replacing C:\bin\... with wherever you put the ActiveTcl download)

Now, with ActiveTcl*.exe, the pathing doesn't quite work the way they
have it with the built-in wish.exe, and for me it expected files to
reside in C:\Git instead of my install location of C:\Program Files
\Git. Instead of going through scripts and fixing this, I just made a
junction using sysinternals junction tool:

http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

so I did something like:

junction C:\Git "C:\Program Files\Git"

After this, my right click "Git GUI Here" worked.

As for command line, I think you have to change C:\Program Files\Git
\cmd\*.cmd files to use ActiveTcl instead of wish where you see the
"@start wish.exe ..." commands. Keep in mind that with the start cmd,
you have to be careful with quotes. Example:

start notepad.exe

carries different meaning from

start "notepad.exe"

Give it a try in a cmd window and you'll see what I mean, so be
careful how you quote things. To be safe, use

@start "whatever title" "C:\bin\ActiveTcl.exe" ...

Hope this helps someone.

Johannes Schindelin

unread,
Jun 14, 2010, 7:52:07 PM6/14/10
to Andrew Rollins, msysGit
Hi,

On Mon, 14 Jun 2010, Andrew Rollins wrote:

> I was getting this error when using the shell right click "Git GUI Here"
> functionality and from command line. Here is my workaround. Sorry if
> it's a little quick and dirty.
>
> * Get ActiveTcl http://www.activestate.com/activetcl/downloads
>
> * Goto this key in registry:
> HKEY_CLASSES_ROOT\Directory\shell\git_gui\command
>
> * Change the value under default from:
> "C:\Program Files\Git\bin\wish.exe" "C:\Program Files\Git\libexec\git-
> core\git-gui" "--working-dir" "%1"
> to:
> "C:\bin\ActiveTcl8.5.8.2.292682-win32-ix86-threaded.exe" "C:\Program
> Files\Git\libexec\git-core\git-gui" --working-dir "%1"
>
> (replacing C:\bin\... with wherever you put the ActiveTcl download)

Could you find out what was the real issue (i.e. what was the real issue
with your setup and wish.exe)?

Hth,
Johannes

Andrew Rollins

unread,
Jun 14, 2010, 9:21:07 PM6/14/10
to msysGit
On Jun 14, 7:16 pm, Konstantin Khomoutov <khomou...@gmail.com> wrote:
> Could you (and Joshua) please verify if the TCL_LIBRARY environment
> variable can be a culprit as described in [1]?
> To be honest, I have no idea where to look specifically, so possibly
> do this:
> 1) Inspect environment variables (using "My computer" applet or by
> running "cmd.exe /k set" from the "Run command..." window).
> 2) Try running the "set" command in the Git bash window, if you're
> using it.
>
> Also may be grepping for "TCL_LIBRARY" in the files under %programfiles
> %\Git (and specifically its "etc" subdirectory) might yield something.
>
> In any case please report back. If you find nothing, I'll try to ask
> fellow Tclers for help (since Pat Thoyts seems to be not paying close
> attention to this stuff presently, or has no time etc).
>
> 1.http://wiki.tcl.tk/TCL_LIBRARY

It doesn't look like I have that environment variable set. It isn't
set for a normal cmd, nor is it set in git bash.

Andrew Rollins

unread,
Jun 14, 2010, 9:23:06 PM6/14/10
to msysGit
On Jun 14, 7:52 pm, Johannes Schindelin <Johannes.Schinde...@gmx.de>
wrote:
> Could you find out what was the real issue (i.e. what was the real issue
> with your setup and wish.exe)?
>
> Hth,
> Johannes

I don't have much time at the moment, but I can probably poke around
more later. I'm not too familiar with wish, so any pointers to
material explaining what it does would help.

Dave M

unread,
Jun 22, 2010, 5:06:06 PM6/22/10
to msysGit
I have the same problem after installing Git-1.7.0.2-preview20100309
on windows 7. I am using 64 bit on a dual processor AMD machine.

Here is what I see. I have an icon for Git GUI in my frequently used
programs in the start menu since I have been playing with it. If I
click on Git GUI, I get the exact symptoms described by the original
poster. If I right clock Git GUI and select "Run as administrator",
the program seems to work correctly. So it would seem that there is a
problem with file permissions, but I have not had time to figure out
exactly which files or how to fix it.

Dave

Dave M

unread,
Jun 22, 2010, 9:57:14 PM6/22/10
to msysGit
I have the same problem after installing Git-1.7.0.2-preview20100309
on windows 7. I am using 64 bit on a dual processor AMD machine.

Here is what I see. I have an icon for Git GUI in my frequently used
programs in the start menu since I have been playing with it. If I
click on Git GUI, I get the exact symptoms described by the original
poster. If I right click Git GUI and select "Run as administrator",
the program seems to work correctly. So it would seem that there is a
problem with file permissions, but I have not had time to figure out
exactly which files or how to fix it.

Dave

( I tried to post this once and I don't see it showing so I am posting
again. With my luck they will both show or neither)

Dave M

unread,
Jun 25, 2010, 12:22:46 PM6/25/10
to msysGit
I have the exact same symptoms as the original poster. Running
windows 7 on an AMD dual core.

What I found is that if I run wish.exe I get the exact error described
above. If I run wish.exe as an administrator, it works fine.
Installing the 1.7.0.2 release as an administrator does not solve the
problem.

To solve the problem in the short term, I went to wish.exe with
explorer and right clicked and from the context menu properties-
>compatibility->"run this program as an administrator". Once I
changed the compatibility setting in wish.exe to run it as an
administrator, it seemed to work correctly.

This means that I probably need to learn a bit more about the Windows
7 file access privileges to come up with a more correct fix, but this
is good for now. Hope this helps.

Dave M

Dave M

unread,
Jun 22, 2010, 5:06:16 PM6/22/10
to msysGit
I have the same problem after installing Git-1.7.0.2-preview20100309
on windows 7. I am using 64 bit on a dual processor AMD machine.

Here is what I see. I have an icon for Git GUI in my frequently used
programs in the start menu since I have been playing with it. If I
click on Git GUI, I get the exact symptoms described by the original
poster. If I right clock Git GUI and select "Run as administrator",

Johannes Schindelin

unread,
Jun 28, 2010, 8:16:31 AM6/28/10
to Dave M, msysGit
Hi,

On Fri, 25 Jun 2010, Dave M wrote:

> I have the exact same symptoms as the original poster. Running
> windows 7 on an AMD dual core.
>
> What I found is that if I run wish.exe I get the exact error described
> above. If I run wish.exe as an administrator, it works fine.

Just an idea: could you copy /bin/install.exe.manifest to
/path/to/init.tcl.manifest (and maybe adjust the values therein)?

Ciao,
Johannes

Konstantin Khomoutov

unread,
Jun 28, 2010, 7:41:31 PM6/28/10
to msysGit
On Jun 25, 8:22 pm, Dave M <dmil...@tecolote.net> wrote:

> What I found is that if I run wish.exe I get the exact error described
> above.  If I run wish.exe as an administrator, it works fine.
> Installing the 1.7.0.2 release as an administrator does not solve the
> problem.
>
> To solve the problem in the short term, I went to wish.exe with
> explorer and right clicked and from the context menu properties->compatibility->"run this program as an administrator".  Once I
>
> changed the compatibility setting in wish.exe to run it as an
> administrator, it seemed to work correctly.
>
> This means that I probably need to learn a bit more about the Windows
> 7 file access privileges to come up with a more correct fix, but this
> is good for now.  Hope this helps.

What if you run it as a normal user with UAC turned off (set to the
lowest level)?
Reply all
Reply to author
Forward
0 new messages