2013年1月29日星期二

cygwin无法启动gitk

  安装cygwin以后运行gitk提示
  $ gitk
Application initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: no display name and no $DISPLAY environment variable
    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)
虽然有英文解释这个原因,但是对菜鸟来说还是没有可操作性的,大体就是换成了X11,需要安装xinit
















但是安装好以后仍不能正常运行gitk,通过一位日本朋友的方法成功解决,参见这里


简单就是就是

startxwin >/dev/null 2>&1

export DISPLAY=localhost:0.0


但是运行gitk仍然会出现这样提示

Error in startup script: unknown color name "SystemButtonFace"


while executing

"winfo rgb . $c"

(procedure "setui" line 3)

invoked from within

"setui $uicolor"

(file "/usr/bin/gitk" line 11522)

然后

rm ~/.gitk (我没能成功,幸好有everything这种神奇,在C:\Users\Administrator发现了它,手动删除,我的环境变量有问题?我不大明白)
startxwin >/dev/null 2>&1

export DISPLAY=localhost:0.0

下面运行一下gitk,是不是可以了~
环境
$ cygcheck -c cygwin git gitk

Cygwin Package Information

Package Version Status

cygwin 1.7.17-1 OK

git 1.7.9-1 OK

gitk 1.7.9-1 OK

另外在安装包的时候,最后出现以下提示
Package: Unknown package pango1.0.sh exit code 1
解决方法

Hi there, recently we did a couple of "fresh" Cygwin installations, and came across an issue. Some package dragged in libpango1.0 as dependency. That noteable's postinstall script fails with exit code 1, causing some confusion. Some inspection of /etc/postinstall/pango1.0.sh quickly showed the reason: /usr/bin/pango-querymodules > /etc/pango/pango.modules
 The directory /etc/pango does not exist. Creating it beforehand resolves the error. 
 Regards, -- Martin Baute solar@...


This will be fixed in the next release of pango1.0. Yaakov Cygwin Ports










没有评论:

发表评论