在Linux下用vnc远程桌面,centos中默认没有安装VNC

查询系统是否安装VNC

# rpm -q tigervnc tigervnc-server

安装VNC服务

# yum install tigervnc tigervnc-server -y

为vncserver设置密码

[root@localhost ~]# vncserver

You will require a password to access your desktops.

Password:<输入vnc登录密码>
Verify:<再次输入vnc登录密码> New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain: Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:.log [root@localhost ~]#

配置vnc

为了防止黑屏,需要修改一下/root/.vnc/xstartup,注释下面两行并添加一行内容

# vi /root/.vnc/xstartup

#xterm -geometry 80x24++ -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &

修改用户配置文件

# vi /etc/sysconfig/vncservers

注释上面两行,最后增加下面两行

VNCSERVERS="2:root"
VNCSERVERARGS[]="-geometry 1024x768 -depth 32"

改变xstartup的权限

# chmod 777 /root/.vnc/xstartup

防火墙开放端或者也可以直接关闭防火墙

查看端口号

# netstat -antpl

关闭防火墙

# service iptables stop

打开防火墙的监听端口

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT //在此行下方增加
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -j ACCEPT
保存退出,重启防火墙
service iptables restart

启动VNC

# /etc/init.d/vncserver start

然后在Windows中用客户端登录

输入设置的VNC密码

连接成功

centos6.5远程桌面连接(VNC\SPice)的更多相关文章

  1. linux远程桌面连接 VNC Server

    更新源 # sudo apt-get update 安装vnc4server # sudo apt-get install vnc4server 修改vnc远程连接密码 # vncpasswd 编辑v ...

  2. 通过VNC Viewer使用VMware虚拟机的远程桌面连接

    本文转自:http://www.14blog.com/archives/185 要在VMware虚拟机中使用远程桌面连接?方法有两个:一种是在虚拟机中做“端口映射”,当然,这个稍显复杂(虚拟机端口映射 ...

  3. CentOS7配置图形界面及设置vnc远程连接、windows远程桌面连接

    安装CentOS桌面 yum groupinstall "GNOME Desktop" 重启,进入终端,将启动模式变更为图形模式 systemctl set-default gra ...

  4. 树莓派3_win10下使用"远程桌面连接"与树莓派通信(使用VNC实现连接后)

    -----------------------------------------------------------学无止境------------------------------------- ...

  5. Windows与Linux相互远程桌面连接

        对于远程桌面连接Linux,大家可能会第一时间想到使用VNC,,远程桌面Windows,大家第一时间会想到使用Windows自带的远程桌面.那么有没有办法,使得在Linux中可以远程Windo ...

  6. 远程桌面连接KVM虚拟机

    问题描述 有些时候,由于网络存在问题,虚拟机无法获取到IP地址,无法使用spice或vnc来连接虚拟机,但是又需要连到虚拟机来排查故障 解决办法 编辑虚拟机配置 设置xml命名空间 <domai ...

  7. 阿里云服务器上开启linux远程桌面连接

    一.说明: 本文的目的是实现在windows机器上利用远程桌面连接来访问远程的linux桌面. 这里使用的是阿里云服务器,操作系统为Centos6.5. 二.基本步骤: 1.首先保证服务器已经安装完毕 ...

  8. linux 远程桌面连接

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

  9. xmanager远程桌面连接Linux

    远程桌面连接Linux,两种工具:vnc.xmanager xmanager使用参考如下,暂未整理: Xmanager连接Centos的远程桌面 | 大爱 http://lovesoo.org/xma ...

随机推荐

  1. Java基础七(Eclipse工具)

    今日内容介绍1.Eclipse开发工具2.超市库存管理系统 ###01Eclipse的下载安装 * A: Eclipse的下载安装  * a: 下载 * http://www.eclipse.org ...

  2. 【添加最新版本的mysql的jdbc连接jar包】java.math.BigInteger cannot be cast to java.lang.Long异常

    [问题描述] 从我的电脑把项目拷贝到guo小中的win8电脑,but出现了那个错误,估计他的mysql是最新版本的. [如何下载连接jar包] 链接:https://pan.baidu.com/s/1 ...

  3. svelte 构建快速web 应用的工具

    svelte 和angular vue reat 类似,都是方便快速的创建用户界面,最大不同的地方是svelte 转换你的app 是在构建时,而不是运行时,所以好处就是不用花费太多的操作在,框架的 抽 ...

  4. openresty redis all in one docker demo

      一个简单的docker demo 集成openresty+ redis,可以实现基于redis的动态修改反向代理的处理 环境准备 docker-compose 文件 version: " ...

  5. 续drone 1.0 新界面调整

    接以前的内容,drone 最新发布的版本又有界面信息的调整了,更方便了. 环境准备 docker-compose 文件 version: '3' services: drone-server: ima ...

  6. How To Use the AWK language to Manipulate Text in Linux

    https://www.digitalocean.com/community/tutorials/how-to-use-the-awk-language-to-manipulate-text-in-l ...

  7. Be Careful When Using Bit Field

    Below illustration is based on MSP430, IAR. See the implementation below. typedef struct { uint8_t g ...

  8. 00centos安装

    CentOS6.9及CentOS7.4的安装详细步骤 安装前的准备工作:1 VMware已经安装好2 镜像文件下载好(在这里,我用的是CentOS-6.9-x86_64-bin-DVD1.iso和Ce ...

  9. 为什么js 的constructor中是无限循环嵌套:Foo.__proto__.constructor.prototype.constructor.prototype.constructor.prototype.xxx ?

    constructor始终指向创建当前对象实例的(构造)函数. 任何函数都是Function类的一个实例 那么根据上述可知:任何函数的constructor属性都指向Function类,而Functi ...

  10. redis : 桌面管理工具 redis-desktop-manager使用指南

    概要:一款好用的Redis桌面管理工具,支持命令控制台操作,以及常用,查询key,rename,delete等操作. 下载软件,请点击下面链接,进入下载页,选择对应版本: https://redisd ...