RHEL 8.1 - Tiger vnc 连接后显示黑屏

RHEL 8.1 - Tiger vnc 连接后显示黑屏

我已按照下面链接中显示的说明在 Red Hat 8 Enterprise 服务器上安装 TigerVNC。

https://www.howtoing.com/install-and-configure-vnc-server-in-centos-7/

但是,当我从 Windows vnc 客户端连接到服务器时,我只看到黑色显示屏,并且只有鼠标指针在工作。这似乎是一个相当普遍的问题,但到目前为止我在谷歌上搜索的所有内容似乎都没有帮助/适用。

日志文件中有一条错误消息可能是问题所在:

导入环境失败:进程 org.freedesktop.systemd1 已退出,状态为 1

这是整个日志文件:

Xvnc TigerVNC 1.9.0 - built Jan 28 2020 09:21:11
Copyright (C) 1999-2018 TigerVNC Team and many others (see README.rst)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12003000, The X.Org Foundation

Thu Mar 26 10:48:35 2020
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
Failed to import environment: Process org.freedesktop.systemd1 exited with status 1

Thu Mar 26 10:48:38 2020
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)

Thu Mar 26 11:03:41 2020
Connections: accepted: 192.168.0.17::2372
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)

Thu Mar 26 11:03:48 2020
VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888

任何想法/想法都将受到欢迎。

编辑:~/.vnc/xstartup 的内容

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
# Assume either Gnome will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session ]; then
    vncserver -kill $DISPLAY
fi

编辑2:

/lib/systemd/system/ 的内容[电子邮件受保护]

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=simple

# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver_wrapper <USER> %i
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

/etc/gdm/custom.conf 的内容

# GDM configuration storage

[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=true
WaylandEnable=false
#TimedLoginEnble=true
#TimedLogin=engineering
#TimedLoginDelay=5

[security]

[xdmcp]


[chooser]

[debug]
# Uncomment the line below to turn on debugging
Enable=true

相关内容