RealVNC配置自定义分辨率(AlmaLinux 8)

RealVNC 配置自定义分辨率(AlmaLinux8)

参考RealVNC官网 how to set up resolution
https://help.realvnc.com/hc/en-us/articles/360016058212-How-do-I-adjust-the-screen-resolution-of-a-virtual-desktop-under-Linux-#standard-dummy-driver-0-2

安装RealVNC驱动

[root@lymaster ~]# dnf install -y git

[root@lymaster ~]# cd ~
[root@lynode2 ~]# git clone https://github.com/RealVNC/xf86-video-vnc
Cloning into 'xf86-video-vnc'...
remote: Enumerating objects: 512, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 512 (delta 4), reused 6 (delta 2), pack-reused 502
Receiving objects: 100% (512/512), 83.00 KiB | 477.00 KiB/s, done.
Resolving deltas: 100% (330/330), done.
[root@lynode2 ~]# cd xf86-video-vnc/
[root@lynode2 xf86-video-vnc]# ./buildAndInstall 

This script will attempt to build and install the VNC virtual framebuffer driver for the Xorg server on your system.
Do you wish to continue? [y/n]:y

* Checking system
* Ensuring build dependencies are met
* Configuring build
* Building driver
* Installing driver
* Cleaning up
* Success
[root@lynode2 xf86-video-vnc]# cd /etc/X11/
[root@lynode2 X11]# ls -la
total 32
drwxr-xr-x.   8 root root 4096 Aug 10 14:17 .
drwxr-xr-x. 148 root root 8192 Aug 17 11:18 ..
drwxr-xr-x.   2 root root    6 Oct  9  2021 applnk
drwxr-xr-x.   2 root root   78 Jul 20 17:25 fontpath.d
drwxr-xr-x.   2 root root   26 Jul 20 17:24 mwm
-rw-r--r--    1 root root 1236 Aug 10 14:17 vncserver-virtual-dummy.conf
-rw-r--r--    1 root root 1029 Aug 10 14:17 vncserver-virtual-vnc.conf
drwxr-xr-x.   5 root root  142 Jul 20 15:46 xinit
-rw-r--r--.   1 root root  547 Aug 13  2018 Xmodmap
drwxr-xr-x.   2 root root   52 Jul 20 22:50 xorg.conf.d
-rw-r--r--.   1 root root  493 Aug 13  2018 Xresources
drwxr-xr-x.   2 root root   23 Jul 20 15:46 Xsession.d

配置自定义分辨率

使用git命令生成modeline参数 (宽2560 高1440 刷新率120)
[root@lymaster X11]# gtf 2560 1440 120

  # 2560x1440 @ 120.00 Hz (GTF) hsync: 185.16 kHz; pclk: 660.65 MHz
  Modeline "2560x1440_120.00"  660.65  2560 2776 3064 3568  1440 1441 1444 1543  -HSync +Vsync

向vncserver-virtual-vnc.conf的modeline参数下添加git命令生成
[root@lymaster X11]# vim vncserver-virtual-vnc.conf

RealVNC配置自定义分辨率(AlmaLinux 8)_第1张图片

重启vnc的virtuald模式

重启vnc的virtuald模式,杀死cad用户的vnc虚拟桌面
[root@lymaster X11]# systemctl restart vncserver-virtuald.service 
[root@lymaster X11]# ps -ef|grep vnc|grep cad
root      247084       1  0 10:43 ?        00:00:00 vncserver-x11-virtual: cad@:1 [session]
cad       247085  247084  0 10:43 ?        00:00:00 /usr/bin/vncserver-virtual -nocheckpasswd -execSessionDirectly -outputFd 12 -pamXdgRuntime -pamDbus
cad       247097  247085  0 10:43 ?        00:00:00 /usr/libexec/Xorg :1 -config vncserver-virtual-vnc.conf -auth /home/users/cad/.Xauthority -pn
cad       247126  247085  0 10:43 ?        00:00:00 /usr/bin/vncserver-x11-core -virtual -newinstance
cad       247139  247126  0 10:43 ?        00:00:00 /usr/bin/vncagent virtual 0
cad       247500  247126  0 10:43 ?        00:00:00 /usr/bin/vncserverui virtual 0
cad       247508  247500  0 10:43 ?        00:00:00 /usr/bin/vncserverui -statusicon 0
[root@lymaster X11]# kill -9 247097
[root@lymaster X11]# ps -ef|grep vnc|grep cad
root      247084       1  0 10:43 ?        00:00:00 vncserver-x11-virtual: cad@:1 [session]
cad       247085  247084  0 10:43 ?        00:00:00 /usr/bin/vncserver-virtual -nocheckpasswd -execSessionDirectly -outputFd 12 -pamXdgRuntime -pamDbus

登陆vnc,手动设置分辨率
RealVNC配置自定义分辨率(AlmaLinux 8)_第2张图片

你可能感兴趣的:(almaLinux8,linux)