【问题标题】:Emacs hangs when run through SSHing to my Ubuntu Box (13.10)通过 SSH 连接到我的 Ubuntu Box (13.10) 时,Emacs 挂起
【发布时间】:2025-12-05 11:20:09
【问题描述】:

运行 Ubuntu 13.10,我在 sshing 到我的盒子时无法运行 emacs

ssh -l username someipaddress

当我运行 emacs 时,它只是挂起。

我最近也安装了 dbus-x11 。在安装 dbus-x11 之前,我在尝试运行 emacs 时会崩溃。

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

(emacs:3306): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

我有另一个 ubuntu 机器 (12.10)(虽然是 vm)从不同的提供商运行。但是我运行 emacs 没有问题。在这两种情况下,我都使用 apt-get 来安装 emacs。

【问题讨论】:

  • 听起来好像是在尝试在 X 中运行 Emacs;而且您没有转发 X 显示。试试emacs -nw
  • 成功了!谢谢!您能否将您的评论放在答案中,您值得称赞。
  • 你知道我如何转发 X 显示
  • X11 转发设置正确

标签: ubuntu emacs ssh ubuntu-13.10


【解决方案1】:

听起来好像是在尝试在 X 中运行 Emacs;而且您没有转发 X 显示。尝试emacs -nw 在终端中运行它。或者,如果您正在 SSH 的机器 正在运行 X,您可以在 SSH 命令行上添加 -X-Y 以转发 X —— 这样可以让任何 X 程序您在遥控器上运行将在您的本地显示器上显示他们的窗口。

(-X-Y 的不同之处在于 -Y 告诉 SSH 将远程 X 客户端视为受信任的;请参阅 What is the difference between ssh -Y (trusted X11 forwarding) and ssh -X (untrusted X11 forwarding)? 了解更多信息。我发现如果您使用 -X 并且有很长时间-运行 X 转发 SSH 连接,SSH 最终会关闭转发;我的理解是 -Y 在关闭 SSH 连接之前不会发生这种情况。)

【讨论】:

    【解决方案2】:

    还要检查您的主目录中文件/目录的所有权(包括隐藏!)就像 archlinux.org 的以下回复所建议的那样,我的 ~/.dbus 是 root 拥有的。

    $ sudo chown -R myusrid:mygroupid ~/.dbus
    

    https://bbs.archlinux.org/viewtopic.php?pid=1233613#p1233613

    【讨论】:

      【解决方案3】:

      我遇到了同样的问题,这为我解决了:

      sudo apt-get install dbus-x11
      

      【讨论】:

        最近更新 更多