# Gazebo远程服务器如何连接本地GUI

> 原文链接：https://robotics.hellobike.com/pitfalls/2024-06-02-robotics-se-111526
> 频道：pitfalls | 更新日期：2024-06-02 | 标签：auto, stackexchange, gazebo, gazebo-plugin, gazebo-ignition
> 核心摘要：在远程机器用gz sim -s跑服务端，本地用gz sim -g跑GUI，并确保同一LAN和GZ_PARTITION一致。

# Gazebo远程服务器如何连接本地GUI

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Running Gazebo simulation on a remote linux computer and access the GUI on another computer](https://robotics.stackexchange.com/questions/111526/running-gazebo-simulation-on-a-remote-linux-computer-and-access-the-gui-on-anoth)（Robotics Stack Exchange #111526）

**状态**：已解决

## 问题

想在更强的远程无头Linux服务器运行Gazebo仿真后端，并在另一台较弱电脑访问GUI；不想用VNC，尽量避免X11，不清楚新版Gazebo如何分离服务端和客户端。

## 环境

Gazebo Garden；Ubuntu 22；远程无头Linux服务器；本地较弱Linux电脑，另有Windows电脑。

## 解决办法

1. 在远程服务器运行Gazebo服务端：使用`gz sim -s`。
2. 在本地电脑运行Gazebo GUI客户端：使用`gz sim -g`。
3. 确保两台电脑在同一个LAN中。
4. 确保两台电脑的环境变量`GZ_PARTITION`取值相同。

原问题作者：robot_student；采纳答案作者：Martin Pecka。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #111526：Running Gazebo simulation on a remote linux computer and access the GUI on another computer](https://robotics.stackexchange.com/questions/111526/running-gazebo-simulation-on-a-remote-linux-computer-and-access-the-gui-on-anoth)