从rhel7.4开始,vnc server options 存储在/root/.vnc/config文件中,该文件的内容如下: [root@hgsec434 .vnc]# cat config ## Supported server options to pass to vncserver upon invocation can be listed ## in this file. See the following manpages for more: vncserver(1) Xvnc(1). ## Several common ones are shown below. Uncomment and modify to your liking. ## # securitytypes=vncauth,tlsvnc # desktop=sandbox # geometry=2000x1200 # localhost # alwaysshared [root@hgsec434 .vnc]#
比如 resolution, color depth, 之前在ExecStart表示如下: ExecStart=/sbin/runuser -l testuser1 -c "/usr/bin/vncserver %i -geometry 1024x768 -depth 24"
具体有哪些options,请见 man 1 vncserver 参考:https://access.redhat.com/solutions/966063