vncserver和x0vncserver用法总计

通常vncserver :port 会调用到xvnc,这时系统会新建一个虚拟桌面通过vncserver分享出去。

vncserver的用法很简单:

 vncserver -h

usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
[-autokill]
[-noxstartup]
[-xstartup <file>]
<Xvnc-options>... vncserver -kill <X-display> vncserver -list

若需要通过脚本使用vncserver,可使用如下方法:

su - $vncuser <<EOF
vncserver -kill $vncport
vncserver $vncport
EOF

而和vncserver不同,x0vncserver则是分享当前物理屏幕(类似于克隆),若通过vncserver方式出现问题,则可采用此方法。

x0vncserver常见用法:

x0vncserver -h
TigerVNC Server version 1.10., built Nov :: Usage: x0vncserver [<parameters>]
x0vncserver --version Parameters can be turned on with -<param> or off with -<param>=
Parameters which take a value can be specified as -<param> <value>
Other valid forms are <param>=<value> -<param>=<value> --<param>=<value>
Parameter names are case-insensitive. The parameters are: Global Parameters:
UseIPv6 - Use IPv6 for incoming and outgoing connections. (default=)
UseIPv4 - Use IPv4 for incoming and outgoing connections. (default=)
ZlibLevel - Zlib compression level (default=-)
ImprovedHextile - Use improved compression algorithm for Hextile encoding
which achieves better compression ratios by the cost of
using more CPU time (default=)
pam_service - Alias for PAMService
PAMService - Service name for PAM password validation (default=vnc)
PlainUsers - Users permitted to access via Plain security type (including
TLSPlain, X509Plain etc.) (default=)
GnuTLSPriority - GnuTLS priority string that controls the TLS session’s
handshake algorithms (default=NORMAL)
QueryConnect - Prompt the local user to accept or reject incoming
connections. (default=)
AcceptSetDesktopSize - Accept set desktop size events from clients.
(default=)
SendCutText - Send clipboard changes to clients. (default=)
AcceptCutText - Accept clipboard updates from clients. (default=)
AcceptPointerEvents - Accept pointer press and release events from clients.
(default=)
AcceptKeyEvents - Accept key press and release events from clients.
(default=)
DisconnectClients - Disconnect existing clients if an incoming connection is
non-shared. If combined with NeverShared then new
connections will be refused while there is a client active
(default=)
NeverShared - Never treat incoming connections as shared, regardless of
the client-specified setting (default=)
AlwaysShared - Always treat incoming connections as shared, regardless of
the client-specified setting (default=)
Protocol3. - Always use protocol version 3.3 for backwards compatibility
with badly-behaved clients (default=)
FrameRate - The maximum number of updates per second sent to each client
(default=)
CompareFB - Perform pixel comparison on framebuffer to reduce
unnecessary updates (: never, : always, : auto)
(default=)
ClientWaitTimeMillis - The number of milliseconds to wait for a client which
is no longer responding (default=)
MaxIdleTime - Terminate after s seconds of user inactivity (default=)
MaxConnectionTime - Terminate when a client has been connected for s seconds
(default=)
MaxDisconnectionTime - Terminate when no client has been connected for s
seconds (default=)
IdleTimeout - The number of seconds after which an idle VNC connection
will be dropped (zero means no timeout) (default=)
MaxCutText - Maximum permitted length of an incoming clipboard update
(default=)
RemapKeys - Comma-separated list of incoming keysyms to remap. Mappings
are expressed as two hex values, prefixed by 0x, and
separated by -> (default=)
Blackl

1、首先通过vncpasswd新建一个vnc密码。

2、将物理桌面转发出去。

x0vncserver -rfbport  -display : -PasswordFile ~/.vnc/passwd

其中:

-rfbport 指定转发到哪个端口,默认为5900。

-display 指定转发哪个物理显示器(若存在多个显示器的情况下)。

-PasswordFile 指定密码文件

A VNC  server is already running as :xx

当提示这个错误时我们会习惯性想到端口被占用,我们执行vncserver -kill :xx即可,但有时候这种方法就不灵了。

明明提示已经没有这个进程了,当执行vncserver :xx时还是说端口已在使用。

并且执行lsof :59xx时并没有其他进程占用此端口。

真这么神奇?脑壳大。。。

但理智告诉我肯定是有原因的,于是我看看了vncserver这个命令其实是一个perl脚本(PS:我们可以在这里修改vnc的默认端口,比如从59xx改到39xx。)

看看了vncserver这个脚本顿时茅塞顿开。

除了默认的59xx端口,Xvnc进程还会用到60xx端口。

于是我马上看了看60xx端口的使用情况。

What?其他进程占用了这个端口。kill掉这个进程,重新执行vncserver :xx后成功启动vnc。

正常启动后我们可以看到Xvnc会同时用到两个端口,但对外连接的应该是那个非60xx端口。

至此问题得到解决。

tigervnc使用总结的更多相关文章

  1. CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面

    CentOS 6.8 有默认的安装的 vnc 位于端口 5900 : 系统->首选项->远程桌面 勾选[共享]的选项,  取消勾选[安全]的选项, 然后防火墙添加 5900 端口 基本就可 ...

  2. ubuntu 安装tigervnc

    root@iZ25q0jd99eZ:~# apt-get install tigervnc Reading package lists... Done Building dependency tree ...

  3. 用windows远程连接linux桌面(使用tightvnc或者tigervnc)

    一.安装tightvnc: tightvnc的安装在安装包中有详细的说明(README文件) 首先你要确保linux已经安装jpeg和zlib库, 2.编译 执行如下两个命令: [root@local ...

  4. windows远程连接linux桌面---使用tightvnc或者tigervnc

    一.安装tightvnc: tightvnc的安装在安装包中有详细的说明(README文件) 首先你要确保linux已经安装jpeg和zlib库, 2.编译 执行如下两个命令: [root@local ...

  5. RHEL7安装配置TigerVNC

    TigerVNC使用非加密的链接,默认会被firewalld blocked 掉,想要 vnc正常工作就需要让firewalld开放相应的端口才行. vnc默认的端口号为5900,而每个vnc win ...

  6. tigerVNC远程桌面,跨内网

    tigerVNC的简单使用教程(CentOS的远程桌面连接) 1.环境和软件准备 (1) CentOS 6.5下 [root@localhost ~]$ yum install tigervnc (2 ...

  7. PCanywhere/teamviewer/RDP/ultraVNC/tigerVNC/realVNC/Xmanager

    PCanywhere/teamviewer/RDP/ultraVNC/tigerVNC/realVNC/Xmanager 1, 通常应用场景一般CentOS/RHEL等linux系统不配置安装Desk ...

  8. tigervnc*

    yum install -y tigervnc* tigervnc-server vncserver www.webmin.cn http://blog.sina.com.cn/s/blog_4ba5 ...

  9. CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器

    CentOS 6.8 安装TigerVNC 实现 Linux 远程桌面并安装火狐浏览器 vnc客户端地址:https://files.cnblogs.com/files/MYSQLZOUQI/vnc- ...

  10. 放弃 Tightvnc, 选择 Tigervnc

    构建headless vnc server ,我终于放弃了Tightvnc 基于以下原因: 1) 已知的Qt5的键盘映射问题,导致virtualbox 的使用出现困难 https://unix.sta ...

随机推荐

  1. LiteOS内核教程01-IoT-Studio介绍及安装

    1. 物联网一站式开发工具 -- IoT Studio IoT Studio 是支持 LiteOS 嵌入式系统软件开发的工具,提供了代码编辑.编译.烧录 及调试等一站式开发体验,支持 C.C++.汇编 ...

  2. C++走向远洋——61(项目一、排序函数模板)

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  3. MongoDB监控及报警

    转载请注明出处:https://www.cnblogs.com/shining5/p/11142357.html MongoDB监控及报警 Prometheus是由SoundCloud开发的开源监控报 ...

  4. #2020.1.26笔记——springdatajpa

    2020.1.26笔记--springdatajpa 使用jpa的步骤: 1. 导入maven坐标 <?xml version="1.0" encoding="UT ...

  5. VGG16等keras预训练权重文件的下载及本地存放

    VGG16等keras预训练权重文件的下载: https://github.com/fchollet/deep-learning-models/releases/ .h5文件本地存放目录: Linux ...

  6. springboot1.5.9整合websocket实现实时显示的小demo

    最近由于项目需要实时显示数据库更新的数据变化情况,一开始想过在前端使用ajax异步轮询方法实现,但后面考虑到性能和流量等要求,就放弃该方法而选择使用websocket(毕竟现在springboot整合 ...

  7. Markdown语法说明及常用软件推荐(附链接)

    Markdown语法同样支持HTML标签 以下所有字符均为英文字符 标题 标题级别由#决定,一个为一级 样例 # 一级标题 ## 二级标题 ### 三级标题 #### 四级标题 ##### 五级标题 ...

  8. C# BASS音频库 + 频谱基本用法

    效果图: 使用了 BASS.dll.  BASS.NET.dll   和  PeakMeterCtrl.dll 前面两个负责播放   最后一个负责绘制频谱,本文重点讲的是频谱部分,播放音频部分注意一点 ...

  9. 2020ubuntu1804server编译安装redis5笔记(二)配置redis

    前一篇笔记记录了ubuntu1804server编译安装redis5,接下来要配置redis5了 网址:https://www.cnblogs.com/qumogu/p/12435694.html 第 ...

  10. socket TCP 从0实现音频传输 ALSA 播放

    RTP标准是采用 UDP 发送,有不少现成的开源库,但不在本文讨论的范围内.UDP 用户数据报,不提供流程,安全传输的功能,但速度快,能提供多播,广播,没有序列号 SEQ ,有 MTU 限制,1500 ...