假设:
我希望能够用VNC客户端从macOS连接到Rocky服务器,并在XFCE桌面上启动图形应用程序。
sudo dnf install -y xorg-x11-xauth
sudo dnf groupinstall -y "xfce"
sudo dnf install -y x11vnc
sudo dnf install -y xterm现在,根据我的理解,我应该运行startx,然后运行x11vnc。在运行startx时,我得到以下输出:
xauth: file /home/username/.serverauth.1502 does not exist
/usr/libexec/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console.出于好奇,我尝试用sudo运行它:
xauth: file /root/.serverauth.1530 does not exist
...
Failed to connect to bus: No medium found
dbus-update-activation-environment: error: unable to connect to D-Bus: /usr/bin/dbus-launch terminated abnormally without any error message
** (process:1562): WARNING **: 17:08:37.589: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Failed to execute child process ?dbus-launch? (No such file or directory)
xinit: connection to X server lost
waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.我不知道我是否试图做正确的事情,如果是,我不知道为什么我不能startx没有错误。
哪些正确的设置步骤可以连接到安装了最小包的Linux服务器,从另一个具有VNC客户端的系统连接到Linux服务器,并启动XFCE桌面环境?
发布于 2023-02-03 17:18:12
您可以尝试直接运行X应用程序,而不是VNC。Linux机器将执行应用程序,但所有的图形命令都将发送到您的桌面。
你需要一个"X服务器“在你的桌面上。如果你有Mac,那就试试https://www.xquartz.org/
拥有XQuartz之后,打开到Linux机器的ssh连接并运行任何X应用程序。例如,xclock,因为它几乎总是作为X11包的一部分安装。
如果它不能立即运行-尝试在ssh上启用X11转发:
/etc/ssh/sshd_config或您的个人~/.ssh/config。 X11Forwarding yes
X11UseForwarding yes然后运行您需要的应用程序。
如果您坚持使用VNC,那么首先将服务器变成普通工作站(添加键盘、监视器)会更容易。安装您需要的所有应用程序和VNC服务器。好了。
https://unix.stackexchange.com/questions/734230
复制相似问题