gitk broken on cygwin

After recently updating cygwin I found that gitk no longer would launch.

$ gitk
Application initialization failed: couldn't connect to display ":0"
Error in startup script: couldn't connect to display ":0"
   while executing
"load /usr/lib/tk8.5/../../bin/libtk8.5.dll Tk"
   ("package ifneeded Tk 8.5.11" script)
   invoked from within
"package require Tk"
   (file "/usr/bin/gitk" line 10)

Turns out that Tk has switched to using X11, so to keep using up to date Tcl/Tk code cygwin had to make the switch. Here’s some details.

To get gitk working again I had to install the cygwin packages xorg-server and xinit.
Then I started the X server (I recommend using startxwin)

$ startxwin


Some old gitk settings caused this error:

unknown color name "SystemButtonFace"


So I had to remove the gitk config file

$ rm ~/.gitk


Back up and running again, if a little heavier weight. If you don’t use a lot of the other cygwin features I would recommend using MsysGit or GitExtensions for git on Windows. I like the linux style interface so I will stick with cygwin.


Tags: ,

4 Responses to “gitk broken on cygwin”

  1. Adam Fawcett Says:

    Thank you muchly. I hadn’t realised that installing xorg-server wasn’t enough to actually start it, but that’s most likely just my naivety in regards to Linux.

  2. KDW Says:

    Thanks for posting that. Pain spared, much appreciated.

  3. Tim Says:

    You could use the intergrated Git-BASH while working with git. No orphan running process will be found, when gitk is closed.

    Other advantage is: the user dont have to get rid of installing many linux-wise packages.

  4. jdramer Says:

    Yeah, I use git bash a lot too. I just prefer cygwin for things like rsync and sshd.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: