vnc - RealVNC服务器企业5.0 : How to manage parameters without vncconfig?

标签 vnc vnc-server

EDIT: Already posted in serverfault forum but no answers after 2 months so I try in stackoverflow... https://serverfault.com/questions/558300/realvnc-server-enterprise-5-0-how-to-manage-parameter-as-there-is-no-more-vncco

我只是想知道新的VNC 5.0版本,我们如何通过命令行访问和更改运行参数?

确实使用 RealVNC 4.x,可以使用 vncconfig,例如:

%> vncconfig -set RandR=1600x1200,1280x1024
%> vncconfig -get RandR
1600x1200,1280x1024
%> xrandr
SZ:    Pixels          Physical       Refresh
*0   1920 x 1200   ( 488mm x 305mm )  *0   
 1   1600 x 1200   ( 406mm x 305mm )   0   
 2   1280 x 1024   ( 325mm x 260mm )   0    

但是从 5.0 开始,不再有 vncconfig 可执行文件...如 ReleaseNote 中所述:

“5.0.0,2012 年 6 月 7 日发布,VNC 服务器不再需要单独的 vncconfig 实用程序来允许配置和操作,例如文件传输以及复制和粘贴文本。”

但即使我们仍然可以通过名为“vncserverui”的图形实用程序“手动”更改 RandR 参数 -> 选项 -> 专家 -> RandR 但似乎,不再有可能通过命令行更改它 就像在 4.x 中使用 vncconfig 一样!?!

但是我尝试使用类似的新可执行文件,但没有成功:

%> vncserverui -set RandR=1024x768
VNC(R) Server 5.0.5 (r106461)
Built on Mar  4 2013 12:57:36
Copyright (C) 2002-2013 RealVNC Ltd.
This program is not intended to be run directly.
The server starts it as needed.

%> vncserver-virtuald RandR=1024x768
Unknown parameter: RandR=1024x768
VNC(R) Virtual Server Daemon 5.0.5 (r106461) 
Built on Mar  4 2013 12:57:39

那么我们该怎么办?

谢谢, 西里尔

最佳答案

经过几个月的迷茫,我对自己回答...... 因为我终于有了解决方案。

事实上,在 v5.0 中,似乎不再可能直接从命令行管理 VNC 变量/参数:-(

但是从RealVNC v5.1开始,有一种非官方的方法可以通过以下方式使用“Xvnc -setconfig”来做到这一点:

echo RandR=1920x1200,1600x1200,1280x1024 | Xvnc -setconfig -

因此,对于 csh 来说,调整 session 大小的一个有趣的别名可能是:

alias vnc-resize 'echo RandR=1920x1200,1600x1200,1280x1024 | Xvnc -setconfig -; xrandr; echo -n 
"Please enter the wanted resolution:"; xrandr -s $<'

另一种方法是更新“~/.vnc/config.d/Xvnc”文件,然后重新加载服务器:

 Xvnc -reload

关于vnc - RealVNC服务器企业5.0 : How to manage parameters without vncconfig?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21169084/

相关文章:

linux - 无法重新连接到 NX session ,错误为 : "error in locking authority file"

c - Windows 上的 LibVNC 编译错误 : Unresolved External Symbol

centos - 如何在 centOS 6 上安装 vnc-server

linux - 在 :0 instead of :1 上启动 vncserver

c - 如何在 VNC 中发送帧缓冲区更新?

linux - Ubuntu 服务器 VNC 连接

c++ - 是否可以查明 VNC 连接是否处于事件状态

google-cloud-platform - 在 Google Cloud Computing VM (UBUNTU) 上安装 VNCServer

linux - 连接到远程服务器上的 docker 内的 VNC

ios - 如何编译 Saurik 的 Veency?