Mac OS X Lion 上 Bash 中的 & 符号行为
我之前在 ubuntu 10.04 LTS 上使用 bash 作为默认 shell 环境。最近切换到 Mac,似乎无法弄清楚为什么使用 & 符号调用的程序无法启动。我认为这是一个启动脚本修改或环境变量,要么是 bash var,要么与我需要在 .profile 中设置的 X11 有关,但我找不到任何相关信息。
我可以从菜单栏打开一个新的终端窗口或选项卡并运行 emacs,但我习惯于能够键入:
emacs foo.txt &
在它自己的窗口中启动 emacs。在 Mac OSX Lion 上,我得到一个停止的 pid。
替代。我用 emacs 给出了这个例子,但后来我尝试输入:
xterm 和 xterm
这会按预期生成一个新的 xterm 窗口。 OS X Lion 中加载的 emacs(默认)是否配置为不支持 X?
I previously used bash on ubuntu 10.04 LTS as my default shell environment. Recently switched to Mac and can't seem to figure out why programs called with ampersand don't launch. I figure it is a startup script modification or environment variable, either bash var or having to do with X11 that I need to set in .profile, but I can't find any info on this.
I can open a new terminal window or tab from the menubar and say run emacs, but I'm used to being able to type:
emacs foo.txt &
to launch emacs in it's own window. On Mac OSX Lion, I get back a stopped pid.
Alt. I gave the example with emacs, but then I tried out typing:
xterm &
and that spawns a new xterm window as expected. Is emacs (default) that comes loaded in OS X Lion configured without X support?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
OS X Lion 没有安装 X,因此您无法在 X 模式下打开标准 emacs。您想要启动后台进程,这失败了,因为 emacs 无法连接到任何 x 服务器,并且 bash 打印消息,表明您的后台进程已停止。
OS X Lion has no X installed so you can't open standard emacs in X mode. You want to start a background process, this fails because emacs can't connect to any x server and bash prints the message, that you background process was stopped.
OS X 不是一种 X 环境。它是构建在 BSD 平台上的 Apple 操作系统。
话虽这么说,OS X 10.7 (Lion) 应该已经附带了可供安装的 x11。我会问您是否进行了升级以获取 Lion 还是全新安装。如果您进行了升级,则可能没有安装 x11 应用程序,因此您无法访问运行 x11 应用程序。
那将是我要检查的第一个地方。查看是否有任何附加组件不是您从 Lion 安装盘安装的。
OS X is not a type of X environment. It is a Apple operating system built onto a BSD platform.
That being said, OS X 10.7 (Lion) is supposed to have shipped with x11 available to be installed with it. I would ask if you did an upgrade to get to Lion or a fresh install. If you did an upgrade, you might not have installed the x11 application with it that would give you access to running the x11 applications.
That would be the first place I'd check. See if there are any extras you didn't install from the Lion install disks.