关于TightVNC的安装和使用可参考:
在Ubuntu 16.04上安装和配置VNC
使用VNC过程中遇到的问题总结
TurboVNC + VirtualGL
TurboVNC下载地址:https://www.turbovnc.org/
https://sourceforge.net/projects/turbovnc/files/
VirtualGL下载地址:
https://sourceforge.net/projects/virtualgl/files/
下载
TurboVNC + VirtualGL
安装包:https://download.csdn.net/download/qq_45445740/87713640?spm=1001.2014.3001.5501
turbovnc-3.0.3-amd64.deb、 virtualgl-3.1-amd64.deb
sudo dpkg -i turbovnc-3.0.3-amd64.deb
sudo dpkg -i virtualgl-3.1-amd64.deb
安装完成可在 /opt/
目录下查看
/opt/VirtualGL/bin/vglserver_config
[root@aubo]# /opt/VirtualGL/bin/vglserver_config
1) Configure server for use with VirtualGL
2) Unconfigure server for use with VirtualGL
X) Exit
Choose:
1
WARNING: Configuring this server for use with VirtualGL will disable the
ability to log in locally with a Wayland session.
Continue?
[Y/n]
Y
Restrict 3D X server access to vglusers group (recommended)?
[Y/n]
Y
Restrict framebuffer device access to vglusers group (recommended)?
[Y/n]
Y
Disable XTEST extension (recommended)?
[Y/n]
Y
/etc/group
文件添加用户,最后一行改成如下:vglusers:x:1001:root,aubo
/etc/turbovncserver.conf
,修改$useVGL
的值为1,并取消注释 # $wm = "";
useVGL = 1;
# $autokill = 1;
关于turbovncserver.conf
配置文件,这是TurboVNC服务器的配置文件,用于配置VNC服务器的各种参数和选项。其中包括桌面分辨率、颜色深度、字体路径、安全类型、VNC用户目录、使用VGL等。用户可以根据需要取消注释并编辑这些选项,以满足自己的需求。此外,还可以设置VNC密码、X.509证书、X启动脚本等。
##
## Configuration of the TurboVNC Server.
##
## This file uses Perl syntax, although only one-line assignments
## are allowed. Assignments can be applied to the following variables:
##
## $geometry -- desktop geometry, WIDTHxHEIGHT or
## W0xH0+X0+Y0[,W1xH1+X1+Y1,...,WnxHn+Xn+Yn]
## $depth -- color depth in bits per pixel (between 8 and 32)
## $desktopName -- X desktop name
## $vncUserDir -- path to TurboVNC user directory (session information,
## VNC passwords, and log files are stored here)
## $fontPath -- X font path
## $securityTypes -- comma-separated list of security types to enable
## (passed to Xvnc in the -securitytypes argument)
## $generateOTP -- 1 to generate an initial one-time password. (OTP
## authentication must be enabled and permitted)
## $wm -- the window manager to use (for instance, "mate" or "2d".)
## This variable is ignored if $xstartup or $noxstartup is
## specified.
## $useVGL -- 1 to run the window manager using VirtualGL. This variable
## is ignored if $xstartup or $noxstartup is specified.
## $autokill -- 1 to automatically kill the TurboVNC session when the
## X startup script finishes or 0 to leave it running
## $noVNC -- directory containing noVNC
## $passwdFile -- path to VNC password file to use with VNC Password
## authentication
## $x509CertFile -- path to X.509 signed certificate file (in PEM format) to
## use with X.509 encryption
## $x509KeyFile -- path to X.509 private key file (in PEM format) to use with
## X.509 encryption
## $xstartup -- path to alternative X startup script
## $noxstartup -- 1 to start the TurboVNC session with no X startup script
## $serverArgs -- additional arguments to pass to Xvnc (refer to the Xvnc man
## page for a list of accepted arguments)
##
## These settings are the default. Uncomment and edit to change.
#
# $geometry = "1240x900";
# $depth = 24;
$desktopName = "TurboVNC ($ENV{USER})";
# $vncUserDir = "$ENV{HOME}/.vnc";
# $fontPath = "";
# $securityTypes = "TLSVnc, TLSOtp, TLSPlain, X509Vnc, X509Otp, X509Plain, VNC, OTP, UnixLogin, Plain";
# $generateOTP = 0;
# $wm = "";
$useVGL = 1;
# $autokill = 1;
# $noVNC = "";
# $xstartup = "${exedir}xstartup.turbovnc";
# $noxstartup = 0;
# $serverArgs = "";
## Here is an example of setting the font path:
#
# $fontPath = "/usr/lib/X11/fonts/misc/"
# $fontPath = "$fontPath,/usr/lib/X11/fonts/75dpi/";
## You might wish to create the TurboVNC user directories under /tmp, to
## ensure that VNC passwords are always kept on the local filesystem. To do
## that, uncomment the line below. Note that in this case, Xvnc will search
## for the .Xauthority file in this same directory by default.
#
# $vncUserDir = "/tmp/$ENV{USER}-vnc";
## These settings are the default. Uncomment and edit to change.
#
# $passwdFile = "$vncUserDir/passwd";
# $x509CertFile = "$vncUserDir/x509_cert.pem";
# $x509KeyFile = "$vncUserDir/x509_private.pem";
/opt/TurboVNC/bin/vncserver :1
xstartup.turbovnc
的文件,修改此文件的内容如下:(先生成文件,再去修改内容)#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#export VGL_DISPLAY=:1
#export DISPLAY=:1
/opt/VirtualGL/bin/vglrun -d :0 /usr/bin/startxfce4
/opt/TurboVNC/bin/vncserver -kill :1
/opt/TurboVNC/bin/vncserver :1
turbovnc.service
sudo nano /etc/systemd/system/turbovnc.service
[Unit]
Description=TurboVNC Server
After=syslog.target network.target
[Service]
Type=forking
User=root
Group=root
ExecStart=/opt/TurboVNC/bin/vncserver :1 -depth 24
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable turbovnc.service
sudo systemctl start turbovnc.service
sudo systemctl status turbovnc.service
如果服务已经开机自启动,则输出的信息中应该包含“Loaded: loaded (/etc/systemd/system/turbovnc.service; enabled; vendor preset: enabled)”这一行。
turboVNC启动后,通过ps -aux | grep Xvnc
查看服务是否已启动
参考:
https://www.xiexianbin.cn/linux/vnc/turbovnc/index.html
https://blog.csdn.net/weixin_44831881/article/details/119810165