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. C#的Attribute

    using System; using System.Collections; using System.Collections.Generic; using System.IO; namespace ...

  2. C# 根据ADO.NET数据库连接字符串构建EntityFrame数据库连接字符串

    为了保持开发效率,以及保持代码优雅,项目中引用了EntityFrame.但是又因为某些报表功能需要大量计算,所以又要求直接使用ADO.NET,调用存储过程进行计算. 于是乎webconfig文件中就会 ...

  3. Python 的三目运算

    其他语言:php 判定条件?为真时的结果:为假时的结果 $a=88 $b=99 $res = $a>$b?$a>$b 搞笑的Python:令人意想不到的语法形式 true_value if ...

  4. 解决MYSQL错误:ERROR 1040 (08004): Too many connections

    方法一: show processlist; show variables like 'max_connections'; show global status like 'max_used_conn ...

  5. Getting Started with Blocks

    本文来源为:developer.apple.com,仅仅是博主练习排版所用. Getting Started with Blocks The following sections help you t ...

  6. Windows 历史

  7. javascript中的true和false

    今天遇到一个问题,执行下面的代码返回true还是false?请说明理由 console.log([] == ![]) 在浏览器中运行了一下,发现结果是true.为什么会这样呢?于是查找了相关的资料. ...

  8. Intent传递类实例

    发送方: Intent intent = new Intent(); intent.setClass(mContext, HomeDetailReportActivity.class); intent ...

  9. 程序员应该是使用git

    我来梳理下我想用git做的事情应该拥有那些功能: 本地的git命令以及图形界面,好让我在没有联网的时候创建git版本控制记录历史功能 一个github账号,好让我可以把本地的git仓库同步到那里 功能 ...

  10. Arduino101学习笔记(六)—— 高级IO

    1.位移输出函数(8位) 输入value数据后Arduino会自动把数据移动分配到8个并行输出端. 其中dataPin为连接DS的引脚号, clockPin为连接SH_CP的引脚号, bitOrder ...