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. mxnet环境搭建随记

    安装mxnet还是遇到不少麻烦事,现在简单记一下,挖个坑,后续详细补充,打算写一下我的mxnet探索之旅. 更新: 具体安装mxnet,cuda,opencv过程已经补坑——点击进入 不知道为什么,在 ...

  2. Android - 控件android:ems属性

    Android - 控件android:ems属性http://blog.csdn.net/caroline_wendy/article/details/41684255?utm_source=tui ...

  3. 【翻译十三】java-并发之饥饿与活锁

    Starvation and Livelock Starvation and livelock are much less common a problem than deadlock, but ar ...

  4. PHP不同域名cookie共享(单点登录实现原理)

    PHP使用P3P完成COOKIE跨域操作实际实用中,类似的需求有,比如说我们有两个域名,我们想实现在一个域名登录后,能自动完成另一个域名的登录,也就是单点登录(SSO)功能.为了测试的方便,先编辑ho ...

  5. golang heap container balance request

    package mainimport ( "container/heap" "fmt" "log" "math/rand" ...

  6. JavaScript - call(this)

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

  7. Win10 资源文件

    ResourceLoader rl = new ResourceLoader(); DisOutText.Text = rl.GetString("Display"); Resou ...

  8. php正则获取网页标题、关键字、网页描述代码

    php正则获取网页关键字,代码如下: function get_keywords($html) { $html=strtolower($html); preg_match("@<hea ...

  9. phpcms_v9 多图字段 内容页,首页,分页自定义字段调用

    phpcms_v9 多图字段 内容页,首页,分页自定义字段调用 说明:自定义多图字段名 shigongtu 1 内容页调用 {loop $shigongtu $r}      <img src= ...

  10. linux 读写锁应用实例

    转自:http://blog.csdn.net/dsg333/article/details/22113489 /*使用读写锁实现四个线程读写一段程序的实例,共创建了四个新的线程,其中两个线程用来读取 ...