Leopard 中什么配置文件设置 $DISPLAY?
根据 此,为了在 Leopard 中获得最佳结果我的 $DISPLAY 变量应以 /tmp/launchd
开头。 唉,我的 $DISPLAY 变量是 /tmp/launch-aLhnOW/:0
我没有在其中任何一个中设置 $DISPLAY ...
- /private/etc/profile
- /private/etc/bashrc
- ~/ .bash_profile
- ~/.profile
...所以我怀疑X11正在读取其他一些配置文件。 有什么建议么?
我特别需要确保它没有在任何地方设置。 根据链接的文章:
从 Dock 启动 X11.app 会给你两个图标,将其设置为自动启动也是禁忌,如果你在任何配置文件中设置了 DISPLAY,你会遇到灾难。
According to this, for best results in Leopard my $DISPLAY variable should start with /tmp/launchd
. Alas, my $DISPLAY variable is /tmp/launch-aLhnOW/:0
I do not set $DISPLAY in any of these ...
- /private/etc/profile
- /private/etc/bashrc
- ~/.bash_profile
- ~/.profile
... so I suspect there is some other configuration file that X11 is reading. Any suggestions?
I specifically need to ensure that it is not set anywhere. Per the linked article:
Starting X11.app from the dock will get you two icons, setting it to auto-launch is also a no-no, and if you have set DISPLAY in any of your configuration files you get a disaster.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你的
DISPLAY
变量看起来没问题。 我不认为它是由配置文件设置的。通常,您有一个 launchd 配置文件,例如
/System/Library/LaunchAgents/org.x.startx.plist
。 其中包含一个部分:我相信这会导致 launchd 打开一个套接字并将 DISPLAY 变量设置为其路径。 当程序联系此套接字时,launchd 会调用 startx。
I think your
DISPLAY
variable looks all right. I don't think it is being set by a configuration file.Normally you have a launchd configuration file such as
/System/Library/LaunchAgents/org.x.startx.plist
. This contains a section:I believe this causes launchd to open a socket and set the
DISPLAY
variable to its path. When a program contacts this socket,startx
is invoked by launchd.您应该能够在
~/.MacOSX/environment.plist
文件中设置它。 详细信息可以在此处找到。You should be able to set it in the
~/.MacOSX/environment.plist
file. Details can be found here.