Posts Tagged ‘cygwin’

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.

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.


Cygwin sshd CYGWIN environment variable

March 21, 2012

I usually follow this howto to setting up an sshd server on Windows through cygwin, ’cause I can never remember all the gotchas. Unfortunately there is one item out of date. The CYGWIN environment variable should be set to ntsec only.

To fix this I followed the instructions in this useful post. Involves changing registry settings.