7

When I'm loading gitk I get an error about an argument

Error in startup script: bad argument "zoomed": must be normal, iconic, or withdrawn
    while executing
"wm state . $geometry(state)"
    (procedure "makewindow" line 320)
    invoked from within
"makewindow"
    (file "/usr/local/git/bin/gitk" line 11250)

Anybody knows a solution? I'm working on Mac OS X 10.6.3

thx!

Jonas
  • 121,568
  • 97
  • 310
  • 388
23tux
  • 14,104
  • 15
  • 88
  • 187

4 Answers4

4

Look for the ~/.gitk startup script in your home directory. It will probably contain a line like set geometry(state) normal. Make sure the ~/.gitk file has Unix-style line endings rather than DOS line endings, i.e. LF not LFCR.

You may be able to fix things up by deleting ~/.gitk and allowing it to be recreated when you next run gitk, as noted by ejfresch. ~~~

Steve Pitchers
  • 7,088
  • 5
  • 41
  • 41
  • This fixed the problem, it was "zoomed" instead of "normal" by changing it to normal the issue stopped immediately! – AmazingMiki Sep 18 '22 at 16:42
4

I had this problem on Lion. This was my solution:

cd 
rm -rf .gitk
ejfresch
  • 51
  • 4
  • This doesn't solve anything. In what directory do you change? And is .gitk a file or a dir? Please provide more information (btw, I solved it already) – 23tux Dec 15 '11 at 09:55
  • with the command cd (without any argument) you go to your home directory. – ejfresch Dec 15 '11 at 15:08
  • 1
    The file .gitk is a configuration file for gitk (It contains a lot of parameters including the ones for the geometry settings). If you delete it, gitk will regenerate this file (with the right settings). That's why this solution worked for me! I know you already solved this problem, but in my case I did not have any .bashrc file in my home directory. So, your solution was not applicable. – ejfresch Dec 15 '11 at 15:18
3

As mention in this blog post:

使用Macport安裝mercurial結果安裝了一堆相依的library,結果造成gitk不能執行

Err... I meant:

The results using Macport installation, mercurial installs a bunch of dependencies of the library, resulting in a gitk which can not perform.

Gitk will use the wrong tk library version.

The issue was that the first installation has modified the .bashrc with:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

modifying the original PATH (/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin)

Try instead in the .bashrc:

export PATH=$PATH:/opt/local/bin:/opt/local/sbin
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thx, that was the issue. I've found this article to, but I can't read japanese (or chinese...???) :-D big thx! – 23tux Apr 13 '10 at 20:28
  • @23tux: err... just so we are clear: I can't read Chinese (it is Chinese) either. Hence the translate.google link ;) – VonC Apr 13 '10 at 20:55
0

I had this problem recently on Ubuntu 18.04.

I deleted .config/git/gitk in the home directory and everything was fine again.

mknaranja
  • 341
  • 1
  • 2
  • 6