MacOS 使用 XQuartz 显示 Linux 软件图形界面显示

发布时间: 更新时间: 总字数:125 阅读时间:1m 作者:IP:上海 网址

MacOS 使用 XQuartz 显示 Linux 软件图形界面显示

安装

bash
brew install xquartz

使用

启动 Xquartz,Preference -> Security 勾选 Allow connections from clients

bash
# 设置 DISPLAY 环境变量
export DISPLAY=:0

# 远程主机安装 xauth 和 xclock(CentOS 下 xclock 由 xorg-x11-apps 提供)
yum install -y xorg-x11-xauth xorg-x11-apps firefox

ssh -Y user@address

# 打开界面
xclock
firefox

FaQ

  • 问题
text
X11 forwarding request failed on channel 0
  • 解决
bash
yum install -y xauth