【发布时间】:2012-03-12 16:51:04
【问题描述】:
我曾经在 Cygwin 控制台中启动 Git GUI 没有任何问题,但自从我更新 Cygwin 后,我收到以下错误消息:
$ git gui
Application initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "tk_messageBox"
while executing
"tk_messageBox -icon error -type ok -title "git-gui: fatal error" -message $err"
invoked from within
"if {[catch {package require Tcl 8.4} err]
|| [catch {package require Tk 8.4} err]
} {
catch {wm withdraw .}
tk_messageBox \
-icon error \
-typ..."
(file "/usr/lib/git-core/git-gui" line 34)
我该如何解决这个问题?
【问题讨论】:
-
您可能会考虑使用单独的非 cygwin/msys shell 来启动提供 git gui 的 Git For Windows。您只需要注意您的 cygwin/windows 路径,因此 cygwin 不会尝试使用它而不是 cygwin 版本,这可能会导致一些问题。
-
@AndrewD 将适用于 Windows 的 Git 与 Cygwin 相结合将成为一个 PITA:不同的文件名约定,甚至不同的主目录(通常),因此您必须管理两组 git 设置。