openEuler-22.03-LTS 怎么安装x11vnc

openEuler-22.03-LTS 怎么安装x11vnc 有安装成功的么大神么 知道一下小白 谢谢了!!!

使用tigerVNC

1.下载vnc server:
[root@localhost bshang]# wget https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-x64.rpm
–2023-12-27 14:08:00-- https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-x64.rpm
Resolving downloads.realvnc.com (downloads.realvnc.com)… 65.8.161.81, 65.8.161.36, 65.8.161.14, …
Connecting to downloads.realvnc.com (downloads.realvnc.com)|65.8.161.81|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 14228028 (14M) [application/x-redhat-package-manager]
Saving to: ‘VNC-Server-6.11.0-Linux-x64.rpm’

VNC-Server-6.11.0-Linux-x64.rpm 100%[===================================================================================>] 13.57M 8.54MB/s in 1.6s

2023-12-27 14:08:03 (8.54 MB/s) - ‘VNC-Server-6.11.0-Linux-x64.rpm’ saved [14228028/14228028]

2.安装vnc server:
[root@localhost bshang]# rpm -ivh VNC-Server-6.11.0-Linux-x64.rpm
error: Failed dependencies:
xterm is needed by realvnc-vnc-server-6.11.0.47988-1.x86_64

3.安装vnc server的依赖:
[root@localhost bshang]# yum install xterm
Last metadata expiration check: 3:24:52 ago on Wed 27 Dec 2023 10:43:40 AM CST.
Dependencies resolved.

  1. 配置文件:/root/.vnc/xstartup

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” &
exec dbus-launch startdde &
fi

5:启动vnc server:
[root@localhost ~]# vncserver :1

WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

New ‘localhost.localdomain:1 (root)’ desktop is localhost.localdomain:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log

6:使用vnc viewer进行链接其中vnc server的地址为:server ip:1

1 Like