我需要桌面来运行 GUI 吗?

Dav*_*uer 3 ssh window-manager xorg

我正在按照Ubuntu 文档中的指南设置轻量级 VM

我想要做的是 ssh 进入虚拟机,然后启动一个 GUI 应用程序。我不需要/想要一个桌面。

首先我安装了 xorg。但我无法启动 gui。文档中的下一步是安装“窗口管理器”,但不清楚为什么需要这样做。

运行 gui 的最小程序是什么?

我在ubuntu.SE上问过这个问题,但所有的答案都需要安装一个窗口管理器,所有这些都提供了一个桌面。最好的答案是继续安装一个窗口管理器,然后限制 startx 对 .xintrc 文件的作用。

安装 openbox 将我原来的 VM 的大小从 0.9GB 增加到 2.2GB。我想最小化我的虚拟机的大小。允许我启动 GUI 的最小程序组是什么?

Gil*_*il' 7

如果您只想从远程显示器运行 GUI 应用程序,而不想在虚拟机中拥有图形环境,那么除了应用程序及其依赖的任何库之外,您不需要安装任何其他东西。

您不需要安装 X 服务器,它提供了运行 GUI 应用程序的能力(它为应用程序提供了用于绘图的底层画布)。

您不需要安装窗口管理器或桌面环境:它们提供诸如自动窗口放置、在多个工作区之间切换的方法、操作窗口的键盘和鼠标命令、启动应用程序的方法、各种小部件和小程序(小或多或少永久显示在屏幕某处的项目),......虽然您可以在没有窗口管理器的情况下运行 GUI,但它几乎无法使用。但是您只需要(实际上,只能)有一个单独的窗口管理器用于您的显示:如果您远程运行 GUI 应用程序,它仍然由您的本地窗口管理器管理。


Bil*_*hor 5

If you are accessing the program remotely, you don't need a GUI or window manager on the server. SSH can be configured to do X11Forwarding. You will need an X-server on your end to do provide the display, keyboard, and mouse.

Alternatively, there are Xservers which provide a dummy display driver. This can be usefull if you need an Xserver, but don't need to interact with or view the output using the XWindow display. The most common use I have seen for this is report generation.

A RDP or VNC Xserver can be used to provide a Display without a window manager. You will need to provide the display id to the program. Some programs have a display parameter, but typically a DISPLAY environment variable is used to specify the display.

用 VNC 和 RDP记录了我在远程桌面上发布的内容。如果您只需要显示器,您可以跳过安装 xdm。您也可以跳过 xinetd 并从命令行运行 VNC 服务器。