【问题标题】:Cannot open GUI applications with XQuartz mac无法使用 XQuartz mac 打开 GUI 应用程序
【发布时间】:2021-04-02 18:19:19
【问题描述】:

我正在使用 xquartz 从 Mac 机器登录到 Ubuntu 服务器。使用ssh -X <username>@<ip> 命令登录后,我试图启动nautilus,但它一直给出以下错误:

Unable to init server: Could not connect: Connection refused

(nautilus:14914): Gtk-WARNING **: 14:05:38.090: cannot open display: 0:0

理想情况下,xquartz 应该相应地设置适当的显示。但是有些问题正在发生。我还尝试了以下命令:

launchctl load -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

但没有成功。

【问题讨论】:

    标签: macos ubuntu ssh remote-access xquartz


    【解决方案1】:

    验证您的 (OS/X)XQuartz 安装

    $> brew info xquartz
    xquartz: 2.8.1 (auto_updates)
    https://www.xquartz.org/
    /usr/local/Caskroom/xquartz/2.8.1 (103.5MB)
    ...
    

    验证您的 .ssh_config:

    $> cat .ssh/config
    Host *
        ForwardX11 yes
        ForwardX11Trusted yes
        ForwardAgent yes
    

    启动您的 X11 应用或服务:

    $> launchctl start org.xquartz.startx
    
    $> launchctl list | grep -i quart
    96701   -9  org.xquartz.startx
    
    

    导出您的 X11 服务器:

    $> export DISPLAY=:0
    
    

    连接到您的远程主机并进行测试:

    $> ssh -Y remote_host
    Last login: Mon Apr 26 13:14:01 2021 from host
    $> xclock
    
    

    【讨论】:

      猜你喜欢
      • 2023-03-17
      • 1970-01-01
      • 2022-06-29
      • 1970-01-01
      • 2021-08-21
      • 2019-06-22
      • 2015-10-17
      • 2013-12-28
      • 2019-12-10
      相关资源
      最近更新 更多