VNC server

来自Shiyin's note
(重定向自Fedora 18: VNC server
跳到导航 跳到搜索

安装

yum install tigervnc-server

配置

  • 网上说的/etc/sysconfig/vncservers文件不需要修改,因为vncserver并不需要作为服务启动,每个用户可自己单独启动,参考下面的使用。
systemctl enable vncserver命令启动
  • 防火墙:用firwall-config进行
  • X的配置文件,~/.vnc/xstartup
  • vncserver -geometry 1600*1200 (可以配置默认的窗口大小)

tigernvnc-1.10

  • fc32中tigervnc升级到1.10之后,vncserver命令不再直接可用,而是采用服务方式来管理
  1. usr/share/doc/tigervnc/HOWTO.md
  2. 编辑/etc/tigervnc/vncserver.users文件,给用户添加编号(n号仍然对应5900+n端口)
  3. 然后使用systemctl启动服务 (窗口配置文件是~/.vnc/config)systemctl start vncserver@:n
  4. 编辑~/.vnc/config 文件,注意添加session,删掉localhost选项(不然不能从网络连接)

fedora 34

  • Quick HowTo:
  1. Add a user mapping to /etc/tigervnc/vncserver.users.
  2. Adjust the global or user configuration. See the vncsession(8) manpage for details. (OPTIONAL)
  3. Run `systemctl enable vncserver@:<display>.service`
  4. Run `systemctl start vncserver@:<display>.service`
  • 现在的配置文件是.vnc/config
session=xfce
geometry=2000x1200

使用

  • vncpasswd产生用户密码
  • vncserver启动一项vnc服务,注意产生的服务在display n上面,对应的端口就是5900+n
防火墙默认只开5901-5903端口,所以理论上只能有3个用户开vnc服务。
  • 无法远程访问问题 (tigervnc-standalone-server ubutun上)
vncserver localhost no

vnc客户端

  • windows下tightVNC
退出全屏 Ctrl+Alt+Shift+F

其它

  • xrdp似乎也是用的VNC
  • 在升级fc30后发现,xfce4和gnome桌面都无法启动,排查原因是和anaconda3.6版本冲突,注释anaconda的启动环境或者升级到3.7之后解决问题。
  • Repeated authentication requests in remote session
systemctl stop pcscd.socket
systemctl stop pcscd
systemctl disable pcscd.socket
systemctl disable pcscd.service


  • ubutun18.04 上运行 vncserver -geometry 1600x1200 -SecurityTypes VncAuth,TLSVnc