[deepin exploration] tigervnc-server经常出问题,求助
Tofloor
poster avatar
森林的天空
deepin
2025-10-07 11:14
Author

折腾了半天,终于vnc服务可以正常运行,但是tigervnc客户端登录后发现屏幕黑屏,没有

画面,查看了efenye-euler:1.log,journalctl -xeu vncserver@:1.service,都提示dde-session不存在,dnf安装也没有源。

通过安装这个,感觉linux太难用了,就一个vncserver中的exstart命令,按照默认配置文件搞不定,按照大模型的提示,也搞不定,千辛万苦服务可以启动了,发现黑屏,太难了。

1、服务器环境:

[root@efenye-euler .vnc]# uname -a
Linux efenye-euler 5.10.0-79.uel20.x86_64 #1 SMP Wed May 21 01:25:23 CST 2025 x86_64 GNU/Linux

[root@efenye-euler .vnc]# cat /etc/os-release
PRETTY_NAME="UOS Server 20"
NAME="UOS Server 20"
VERSION_ID="20"
VERSION="20"
ID=uos
HOME_URL="https://www.chinauos.com/"
BUG_REPORT_URL="https://bbs.chinauos.com/"
VERSION_CODENAME=fuyu
PLATFORM_ID="platform:uel20"

2、vncserver@:1.service关键配置

[Service]
Type=forking
User=efenye
Group=efenye
WorkingDirectory=/home/efenye

PIDFile=/home/efenye/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
#ExecStart=/usr/bin/vncserver -autokill %i
#ExecStart=/usr/bin/vncserver -autokill %i -geometry 1440x900 -localhost=0 -alwaysshared
ExecStart=/usr/bin/vncserver :1 -geometry 1920x1080 -depth 24 -localhost=0 -xstartup /home/efenye/.vnc/xstartup
ExecStop=/usr/bin/vncserver -kill %i
Restart=on-success
RestartSec=15

3、xstartup配置

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
if [ -f /etc/profile ]; then
. /etc/profile
fi
if [ -f $HOME/.profile ]; then
. $HOME/.profile
fi
exec dbus-launch --exit-with-session dde-session &
if [ -r $HOME/.Xresources ]; then
xrdb $HOME/.Xresources
fi

Reply Favorite View the author
All Replies
森林的天空
deepin
2025-10-07 11:19
#1

更新一下xstartup

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=uname -s
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
gnome)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
exec sh /etc/X11/xinit/xinitrc
fi
[ -r ​HOME/.Xresources ] && xrdb HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Reply View the author
森林的天空
deepin
2025-10-07 12:24
#2

最无语的是官方给的service的配置、xstarup的配置,无法启动,借助豆包,千辛万苦,不停的更换与试错,终于找到了一个适合的配置,起码能正常用了,但是日志中还是有各种变量、dbus等小问题,但是不影响基本的远程了。

我真的很疑惑,为啥要这样,包括欧拉、统信都这样,官方的配置文件基本没用,而且连

最基本的dnf 命令补全都没有,让普通用户设置个服务就要看脚本么,处理操作系统底层么,如果是这样,太难了。

Reply View the author
lot
deepin
2025-10-08 09:45
#3

我用这个脚本deepin25没问题

#!/bin/bash

password="yhlin"  # 设置密码

# Step 1: 安装x11vnc
echo $password | sudo -S sudo apt update && sudo apt install x11vnc -y

# Step 2: 设置x11vnc密码
sudo x11vnc -storepasswd $password /etc/x11vnc.pass

# Step 3: 创建服务自动启动
sudo tee /etc/systemd/system/x11vnc.service > /dev/null <
Reply View the author
森林的天空
deepin
2025-10-08 11:55
#4
lot

我用这个脚本deepin25没问题

#!/bin/bash

password="yhlin"  # 设置密码

# Step 1: 安装x11vnc
echo $password | sudo -S sudo apt update && sudo apt install x11vnc -y

# Step 2: 设置x11vnc密码
sudo x11vnc -storepasswd $password /etc/x11vnc.pass

# Step 3: 创建服务自动启动
sudo tee /etc/systemd/system/x11vnc.service > /dev/null <

我昨天晚上也换成x11vnc了,在欧拉、deepin上都可以跑通了

Reply View the author
BigFish
deepin
2025-10-08 13:08
#5

建议官方把VNC远程集成到系统里,学习一下银河麒麟kylinos.

Reply View the author
森林的天空
deepin
2025-10-08 15:29
#6
BigFish

建议官方把VNC远程集成到系统里,学习一下银河麒麟kylinos.

再搞个优化过的KVM+优化过的vnc/spice客户端,让虚拟机桌面的体验最佳就好了,我自己安装的kvm,自带的remote-viewer ,感觉总是卡卡的,优化了一天了,一般般。

Reply View the author
BigFish
deepin
2025-10-09 17:11
#7
森林的天空

再搞个优化过的KVM+优化过的vnc/spice客户端,让虚拟机桌面的体验最佳就好了,我自己安装的kvm,自带的remote-viewer ,感觉总是卡卡的,优化了一天了,一般般。

大概率不会集成,商业版uos上有收费的彩虹平台,deepin集成KVM的话会跟uos抢用户。

Reply View the author
森林的天空
deepin
2025-10-09 18:30
#8
BigFish

大概率不会集成,商业版uos上有收费的彩虹平台,deepin集成KVM的话会跟uos抢用户。

哈哈,集成优秀的虚拟化平台,deepin可以走订阅制服务,如果系统很稳定,虚拟机又好用,用户会越来越多,与主流的pc厂家做预装,用户会越来越多。

Reply View the author