Posts Tagged ‘git’

gitk broken on cygwin

June 6, 2012

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.
http://cygwin.com/ml/cygwin-apps/2011-10/msg00083.html
http://cygwin.com/ml/cygwin-announce/2012-02/msg00011.html
http://cygwin.com/ml/cygwin/2012-02/msg00447.html

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.

Advertisements