Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cygwin gitk issue

I have recently installed all of the X11 packages in the cygwin setup and now have is massive annoying error with not being able to see gitk. Everything was working perfectly well until I installed this stuff.

Before I had this issue I didn't really note done any of the configuration I merely started xwinserver went to my branch and typed gitk and everything appeared. Now I have to put in my display as it claims the display is not set. I export my display settings check that it is set properly by running xclock which does appear. Then I get the issue:

1 [main] wish8.5 3436 child_info_fork::abort: data segment start: parent(0x4CF000) != child(0x67F000)
Error in startup script: unknown color name "SystemButtonFace"
while executing
"winfo rgb . $c"
(procedure "setui" line 3)
invoked from within
"setui $uicolor"
(file "C:\cygwin\bin\gitk" line 11504)

Not got a clue what this is. I have seen a couple of relevant questions but no answers.

Notes: I am using Windows 7 64 bit and using a Bash shell

Update: I am still getting exactly the same error. This is really frustrating! I may just download Debian

like image 878
bubblebath Avatar asked Feb 12 '12 10:02

bubblebath


4 Answers

I was able to get gitk working as of today with the following versions on Win 7 64 Bit :

$ cygcheck -c cygwin git gitk tcl tcl-tk
Cygwin Package Information
Package              Version        Status
cygwin               1.7.10-1       OK
git                  1.7.9-1        OK
gitk                 1.7.9-1        OK
tcl                  8.5.11-1       OK
tcl-tk               8.5.11-1       OK

The most valuable link was the one posted by aap. That led me to all the other steps.

To fix the fork failures follow this link from Cygwin FAQ. The steps I followed were as follows:

  1. Start -> Run -> ash.exe -> /bin/rebaseall (There was no output when I ran that command)

  2. One of the reasons why you might get fork failures is the presence of Antivirus/Firewall/Spyware-cleaner softwares.

    In my case the BLODA softwares listed as reasons for the fork failures was McAfee which I have on my work pc. The fix was to move the Cygwin directory inside a folder excluded by McAfee's OAS and create a symbolic link to the old location like so:
    mklink /D C:\Cygwin C:\Dev\Cygwin

    C:\Dev is the excluded folder

    The folder exclusions can be configured using the Viruscan Console. To test whether your current Cygwin directory is excluded see this.

  3. Starting GITK

    •     Method 1
          
      1. In Cygwin Console :
        startx&

      2. The title of the window that pops up must be used to set the DISPLAY env variable in Cygwin like so:
        Title : Cygwin/X:1.0, then do export DISPLAY=localhost:1.0
        Title : Cygwin/X:0.0, then do export DISPLAY=localhost:0.0

      3. Finally start gitk like so :
        gitk&

      4. What I ended up with was this :


    •     Method 2
          
      1. Create a file ~/.startxwinrc with the following contents:
        gitk&
      2. Then run the following command:
        startxwin >/dev/null 2>&1
      3. I ended up with a gitk window which looks exactly like the one before the whole 'require X' thing mentioned by aap happened :



like image 67
Ashutosh Jindal Avatar answered Sep 22 '22 13:09

Ashutosh Jindal


Seems there are three issues here.

  1. DISPLAY requirement is due to Cygwin Tk changing to require X.

  2. SystemButtonFace error is also due to the same change. The recommended fix is to remove your ~/.gitk settings file, or at least the line in that file referencing SystemButtonFace.

  3. fork issue -- seems to require rebaseall.

Note also that there is an updated version 1.7.9 of git and gitk finding its way to the cygwin mirrors, but by itself that version did not solve the problem for me.

like image 24
aap Avatar answered Sep 19 '22 13:09

aap


Based on the above answer, I did a different fix. In my ~/.bash_profile, I added the following:

startxwin >/dev/null 2>&1
export DISPLAY=localhost:0.0

I think that's a better solution than adding gitk& to the ~/.startxwinrc, since then it only works with gitk. This way you can then do git gui and other things as well.

like image 33
bender Avatar answered Sep 19 '22 13:09

bender


The other answers suggesting to remove ~/.gitk pointed in the right direction, but in new releases the config file is in ~/.config/git/gitk by default, as pointed by the manual.

like image 40
page Avatar answered Sep 19 '22 13:09

page