root根用户登录在/root目录下
#rpm -q vnc vnc-server查询已安装vnc的客户端和服务器端
vnc-4.1.1-36
vnc-server-4.1.1-36

#vi /etc/sysconfig/vncservers将developer用户名加入vncservers文件中
如下所示:
# VNCSERVERS="2:myusername"
VNCSERVERS="2:developer"
创建一个vnc的口令
#vncpasswd
Password:
Verify:
启动vnc服务
#sudo /sbin/service vncserver start
Starting VNC server:2:developer      [FAILED]
后来改为用户developer,并在/home/developer目录下创建vnc的口令
[developer@developer ~]$vncpasswd
Password:
Verifty:
$ls -d .vnc
.vnc
$ls .vnc
passwd
$/sbin/service vncserver start
Starting VNC server:2:developer runuser:cannot set groups:Operation not permitted  [FAILED]
$sudo /sbin/service vncserver start
developer is not in the sudorers file.This incident will be reported.
退出仍用root用户
#sudo /sbin/service vncserver start
Starting VNC server:2:developer xauth:creating new authority file /home/developer/.Authority
New 'developer.fw:2(developer)'desktop is developer.fw:2
Creating default startup script. /home/developer/.vnc/xstartup
Starting applications specified in /home/developer/.vnc/xstartup
Log file is /home/developer/.vnc/developer.fw:2.log   [OK]
这次成功了.
#cd .vnc 
(/home/developer/下)
#ls
developer.fw:2.log 
developer.fw:2.pid passwd xstartup
#vi xstartup
下面两行的注释去掉。
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
保存退出
重启vncserver
#sudo /sbin/service vncserver restart
Shutting down VNC server:2:developer   [OK]
Starting VNC server:2:developer
New 'developer.fw:2(developer)'desktop is developer.fw:2
Starting application specified in /home/developer/.vnc/xstartup
Log file is /home/developer/.vnc/developer.fw:2.log  [OK]
在本机上试连接到vncserver
#vncviewer localhost:2
成功,打开了一个vnc窗口,输入口令,进入。

客户端的配置
如客户端为windows ,用putty或vnc客户端
客户端为linux:
1.vncviewer localhost:2 在本机执行
2.用ssh
ssh -L 5901:localhost:5901 -l foo myserver
需在sudo vi /etc/sysconfig/iptables中打开5901端口,
然后重启iptables
sudo /sbin/service iptables restart
或者直接用ip地址ssh -L 5901:localhost:5901 -l foo 192.168.x.x

linux 远程桌面的配置的更多相关文章

  1. linux 远程桌面连接

    我们知道在windows下面我们可以用远程桌面连接来控制其它电脑, 但linux 远程桌面连接?不过在说怎样连接之前还是要先明确一个概念,为什么我标题没有用linux中的远程桌面连接呢, 这是因为Li ...

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

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

  3. window用Xmanager4.0的Xstart连接linux远程桌面

    安装包: xorg-x11-xauth xterm.x86_64 0:253-1.el6 Execute command path:/usr/bin/xterm Xstart连接Linux远程桌面有一 ...

  4. Linux远程桌面(三)

    上一篇中的vnc配置已经很方便了,这一篇介绍更为简单的xmanager的配置,xmanager画面好一丢丢. Xmanager服务器配置             Linux远程桌面(二):vnc之xi ...

  5. Linux远程桌面(二)

    上一篇远程桌面采用的独立服务配置不适用于过多用户,这一篇采用超级Internet服务器搭建vnc服务可以解决多用户问题.  vnc之xinetd服务搭建配置 Linux远程桌面(一):vnc之独立服务 ...

  6. Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7)(转载)

            您多久访问一次Linux桌面? 您使用什么工具来访问远程桌面? Xrdp是一个开源工具,允许用户通过Windows RDP访问Linux远程桌面. 除了Windows RDP之外,xr ...

  7. Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7)

    Xrdp - 通过Windows的RDP连接Linux远程桌面(Ubuntu/CentOS/Redhat 7) 您多久访问一次Linux桌面? 您使用什么工具来访问远程桌面? Xrdp是一个开源工具, ...

  8. Windows Server 2019远程桌面服务配置和授权激活

    参考Windows Server 2016远程桌面服务配置和授权激活方法可适用于Windows Server 2019     Server 2016默认远程桌面连接数是2个用户,如果多余两个用户进行 ...

  9. centOS5.5 配置vnc,开启linux远程桌面

    如何远程控制centOS桌面? 如何使用windows远程控制centOS桌面? 1.查看本机是否有安装vnc(centOS5默认有安装vnc) rpm -q vnc vnc-server 如果显示结 ...

随机推荐

  1. 编程风格规范google版

    python's  coding style,google 命名

  2. 攻城狮在路上(壹) Hibernate(十二)--- Hibernate的检索策略

    本文依旧以Customer类和Order类进行说明.一.引言: Hibernate检索Customer对象时立即检索与之关联的Order对象,这种检索策略为立即检索策略.立即检索策略存在两大不足: A ...

  3. JavaScript - call(this)

    为什么使用call(this), 而不是直接使用(function(){})(); "use strict" function Foo() { (function() { cons ...

  4. php mysql PDO基本操作

    <?php $dbh = new PDO('mysql:host=localhost;dbname=localhost', 'root', ''); $dbh->setAttribute( ...

  5. HR外包系统 - 薪资项目分类

    序号    薪资项目编码规则    6到9开头1    普通工资项目加项    7开头三位,7XX,不够时,从71XX开始2    普通工资项目减项    8开头三位,8XX,不够时,从81XX开始3 ...

  6. 如何在Salesforce中进行代码开发

    两种方式: 1):用Salesforce自带的在线开发模式 Setup --> App Setup --> Develop --> than you can select 'Page ...

  7. javase基础笔记2——数据类型和面向对象

    API:Application program interface  程序调用一个方法去实现一个功能 正则表达式:regex 用来匹配的 javaEE里边有三大框架 SSH struts spring ...

  8. python学习-爬虫

    转载自 静觅的博客 最普通下载网页 import urrlib2 response = urllib2.urlopen("http://www.baidu.com") print ...

  9. 汇编学习(四)——算术运算程序

    (一)跳转指令 一.无条件跳转指令(不管标志寄存器,执行到这句直接跳转) 1.段内直接跳转指令 (1)指令格式: JMP SHORT short_label; IP<--IP+DB,即代码直接跳 ...

  10. 对于c语言int类型和float,以及double类型表示范围的计算

    首先说一下我原来错误的认识 int是32个bit, 如果我们把第一位理解为符号位,那么很显然int的范围是-(2^31-1)~2^31-1 但是实际上我们都知道int的最小值是-2^31次.. 为什么 ...