root/finance, hm/finance
 
一,安装tigervnc-server VNC软件包

[root@localhost ~]# yum install tigervnc-server

[root@localhost ~]# rpm -qc tigervnc-server
/etc/sysconfig/vncservers
[root@localhost ~]# chkconfig --level 35 vncserver on
 
二.目的:以vistor用户启动第一个端口,即5901,以student用户启动第二个端口,即5902
[root@localhost ~]# vim /etc/sysconfig/vncservers
VNCSERVERS="1:visitor 2:student"
 
以vnc使用用户登录系统,创建vnc密码,vncpasswd
[root@localhost ~]# su - visitor
[visitor@localhost ~]$ vncpasswd
Password: 输入密码
Password must be at least 6 characters - try again
Password: 再次输入密码
Verify:
 
启动服务一次,生成缺省模板 /home/visitor/.vnc/xstartup
[visitor@localhost ~]$ vncserver 
 
New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1
 
Starting applications specified in /home/visitor/.vnc/xstartup
Log file is /home/visitor/.vnc/localhost.localdomain:1.log
查看已经打开的vnc服务,关闭服务
[visitor@localhost ~]$ vncserver -list
 
TigerVNC server sessions:
 
X DISPLAY #     PROCESS ID
:1              5567
[visitor@localhost ~]$ vncserver -kill :1
Killing Xvnc process ID 5567
[visitor@localhost ~]$ exit
logout
 
[root@localhost ~]# su - student
[student@localhost ~]$ vncpasswd 
Password:
Verify:
[student@localhost ~]$ vncserver 
xauth:  creating new authority file /home/student/.Xauthority
 
New 'localhost.localdomain:1 (student)' desktop is localhost.localdomain:1
 
Creating default startup script /home/student/.vnc/xstartup
Starting applications specified in /home/student/.vnc/xstartup
Log file is /home/student/.vnc/localhost.localdomain:1.log
 
[student@localhost ~]$ vncserver -list
 
TigerVNC server sessions:
 
X DISPLAY #     PROCESS ID
:1              8764
[student@localhost ~]$ vncserver -kill :1
Killing Xvnc process ID 8764
[student@localhost ~]$ exit
logout
 
 
三,启动服务
[root@localhost ~]# /etc/init.d/vncserver start
正在启动 VNC 服务器:1:visitor 
New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1
 
Starting applications specified in /home/visitor/.vnc/xstartup
Log file is /home/visitor/.vnc/localhost.localdomain:1.log
 
2:student 
New 'localhost.localdomain:2 (student)' desktop is localhost.localdomain:2
 
Starting applications specified in /home/student/.vnc/xstartup
Log file is /home/student/.vnc/localhost.localdomain:2.log
 
                                                           [确定]
四.添加防火墙配置
[root@localhost ~]# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
[root@localhost ~]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]
 
五.远程访问
 vnc-viewer
 172.19.19.185:1
 
全屏切换: F8,系统菜单--Full Screen
六.使用安全的SSH进行连接
 
VNC 是明文的,不安全的.连接过程可能会被窃听,干扰.可以使用SSH通道加密,然后再由远程主机的回环地址通信,加大了安全性.
[root@localhost ~]# vim /etc/sysconfig/vncservers
VNCSERVERARGS[1]="-localhost"
 
[11:30:18 talen@BJB0300 ~ ]$ vncviewer -via visitor@172.31.0.128 localhost:1
这里的localhost是远程主机的回环地址,由远程主机解析
 
七.生成密码文件,无输入密码登录
[root@localhost ~]# vncpasswd virtual
Password:
Verify:
[13:43:02 talen@BJB0300 study ]$ vncviewer -passwd ~/study/virtual -via root@172.31.0.128 localhost:3
 
八.多用户配置
 
 VNCSERVERS="3:root 2:student"
 VNCSERVERARGS[2]="-geometry 800x600 -localhost"
 VNCSERVERARGS[3]="-geometry 1024x768 -localhost"
 
参考:
http://blog.chinaunix.net/uid-21142030-id-3255389.html
 

tigervnc-server安装使用的更多相关文章

  1. CentOS 7安装TigerVNC Server

    http://blog.csdn.net/wamath/article/details/76003128 1. CentOS 7安装TigerVNC Server 本文介绍如何在CentOS 7上安装 ...

  2. Linux 环境下安装配置 TigerVNC Server 并启用当前会话远程服务(X0VNC)

    曾经喜欢用 RealVNC Server 实现 Linux/Windows 的远程控制,因为 RealVNC 为收费商业软件,支持文件传输,性能优化方面也做得不错.但 RealVNC 从 5.0 版本 ...

  3. 关于SQL Server 安装程序在运行 Windows Installer 文件时遇到错误

    前几日安装sql server2008r2 的时候碰到这个问题: 出现以下错误: SQL Server 安装程序在运行 Windows Installer 文件时遇到错误. Windows Insta ...

  4. Ubuntu Server安装R和Rstudio(zz)

    Ubuntu Server安装R和Rstudio 发表于 技术天堂 2014-03-15 21:03 字数: 534 阅读量: 205 R是一个在科研领域很常用的工具,经常用R的年轻人或者经常上统计之 ...

  5. linux下subversion server安装手册

    linux下subversion server安装手册 安装基于的Linux版本为:Red Hat Enterprise Linux Server release 6.3. 一 准备需要的安装包. ( ...

  6. SQL Server 安装 功能详解

    安装 SQL Server 功能     在“功能选择”页上,SQL Server 功能分为以下两个主要部分:实例功能和共享功能. “实例功能”表示为每个实例安装一次的组件,这样,您将具有它们的多个副 ...

  7. VMware vCenter Server安装图解教程

    安装说明: 1.安装VMware vCenter Server的主机操作系统为:Windows Server 2008 R2 2.在Windows Server 2008 R2中需要预先安装好SQL ...

  8. cmd运行sql server安装

    cmd运行sql server安装 SQL2012非群集安装_更新到最新版本.bat setup.exe /UpdateSource=.\hotfix\Latest /ACTION="Ins ...

  9. Ubuntu Server安装图形界面全过程

    转载自:http://blog.csdn.net/sunbaigui/article/details/6624110, http://mikewolfli.blog.163.com/blog/stat ...

  10. ArcSDE for SQL Server安装及在ArcMap中创建ArcSDE连接

    原文:ArcSDE for SQL Server安装及在ArcMap中创建ArcSDE连接 安装ArcSDE for SQL Server,最后一步成功后的界面如下: 在ArcMap中创建ArcSDE ...

随机推荐

  1. CentOS7.2中systemctl的使用

    CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替. 1.原来的 service 命令与 s ...

  2. TI 多模雷达1843毫米波雷达做自动泊车(用了8个雷达)

    http://e2e.ti.com/blogs_/b/behind_the_wheel/archive/2019/01/09/how-mmwave-sensors-enable-autonomous- ...

  3. POJ 2226 Muddy Fields(最小点覆盖)题解

    题意:一片r*c的地,有些地方是泥地,需要铺地板.这些地板宽1,长无限,但只能铺在泥地上不能压到其他地方,问你铺满所有泥地最少几块 思路:我们把一行中连续的泥地看成整体,并把所有横的整体里的点编成一个 ...

  4. Centos 7 官网下载安装mysql server 5.6

    Centos 7 官网下载安装 mysql server # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rp ...

  5. oracle 之 插入超长字段并包含&字符的处理方法

    oracle 在插入超长数据字符串时是默认转为varchar2类型,而这类型只有4000字节,即使通过oracle改变字符串类型为clob,也是在插入时默认转为varchar2类型. 处理方式:可以通 ...

  6. C# 里调用vb的inputbox弹出窗

    https://blog.csdn.net/hutao1101175783/article/details/16800871 先对项目添加对Microsoft.VisualBasic的引用 Inter ...

  7. (转)Understanding Memory in Deep Learning Systems: The Neuroscience, Psychology and Technology Perspectives

    Understanding Memory in Deep Learning Systems: The Neuroscience, Psychology and Technology Perspecti ...

  8. 深度学习课程笔记(五)Ensemble

    深度学习课程笔记(五)Ensemble  2017.10.06 材料来自: 首先提到的是 Bagging 的方法: 我们可以利用这里的 Bagging 的方法,结合多个强分类器,来提升总的结果.例如: ...

  9. codeforce gym/100495/problem/F Snake++——DFS应用

    emmmm.... 在被新生暴打后,我花了很久才补出这道DFS.由于WA1检查了半天,最后竟然是输出少了一个:   ,心态小崩. 这里普通的dfs算出的连通区域并不能直接当做最后的答案.所以需要类似模 ...

  10. 解决Linux服务器磁盘空间不足的问题

    在linux服务器执行程序时报错: awk: write failure (No space left on device)awk: close failed on file /dev/stdout ...