sentos 上安装vnc图形界面

摘要:
验证:root“#桌面编号:用户监听590*端口VNCSERVERRGS[1]=”-geometry1200x800“#VNCSERVRERSvariableisalistofdisplay:

一、安装gnome图形化桌面

 

CentOS 6.3 64位

#yum groupinstall -y "X Window System"

#yum groupinstall -y "Desktop"

#yum groupinstall -y "Chinese Support"

二、安装vncserver并配置

1.安装vncserver

#yum install -y tigervnc-server

 

2.配置vncserver

1).配置为开机自启动

#chkconfig --level 345 vncserver on

2).配置vnc密码

#vncserver

You will require a password to access your desktop.

Password:

Verify:

3).配置为使用gnome桌面

修改 /root/.vnc/xstartup文件,把最后的 twm & 删掉 加上 gnome-session &。

# vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see this URL:
# http://kbase.redhat.com/faq/docs/DOC-7028

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1200x800"
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

4).配置vncserver启动后监听端口和环境参数

修改/etc/sysconfig/vncservers 文件添加以下内容

# vi /etc/sysconfig/vncservers

VNCSERVERS="1:root"

# 桌面号:用户    监听 590* 端口

VNCSERVERARGS[1]="-geometry 1200x800"

# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see this URL:
# http://kbase.redhat.com/faq/docs/DOC-7028

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1200x800"
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

5).重启vncserver服务

#service vncserver restart

三、允许root访问图形界面和生成新的machine-id

 

#sed -i 's/.*!= root.*/#&/' /etc/pam.d/gdm 
#dbus-uuidgen >/var/lib/dbus/machine-id

四、关闭selinux和NetworkManager服务

 

1.检查selinux服务并关闭

#vi /etc/selinux/config

确认里面的SELINUX字段的值是disabled,如果不是则改为disabled。

 

[root@AY1404171530212980a0Z ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
~

2.关闭NetworkManager服务

#chkconfig --del NetworkManager

五、测试登录:

 sentos 上安装vnc图形界面第1张

sentos 上安装vnc图形界面第2张

来自于:http://help.aliyun.com/view/11108189_13435402.html?spm=5176.7224473.1997282753.8.VYQqHa

免责声明:文章转载自《sentos 上安装vnc图形界面》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Provisioning Profilesvue前端使用axios传参注意事项下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

搭建express服务器

express是一个基于Node.js的极简的web应用程序开发框架。 首先为应用程序创建一个package.js文件 npm init -y 在项目目录添加index.js文件 const express = require('express') const app = express() app.get('/', (req, res) => r...

mysql(2)-启动mysql报错The server quit without updating PID file!

mysql启动报错 今天启动mysql又一次报错:The server quit without updating PID file!记得上次出现这个问题的时候,尝试了一些常规的方法,未果,所以索性重新进行安装。但是,相同的问题今天又出现了!!!OH, my god!恰巧今天时间充裕,尝试各种办法,终于皇天不负有心人,经过一个小时的奋战后,终于让我给搞...

操作系统/应用程序、操作中的“并发”、线程和进程,python中线程和进程(GIL锁),python线程编写+锁

并发编程前言:       1、网络应用            1)爬虫 直接应用并发编程;            2)网络框架 django flask tornado 源码-并发编程            3)socketserver 源码-并发编程       2、运维领域            1)自动化开发-运维开发(机器的批量管理,任务的批量执...

WPF实现无刷新动态切换多语言(国际化)

1. 在WPF中国际化使用的是 .xaml文件的格式       如图:Resource Dictionary (WPF)        2. 创建默认的语言文件和其他语言文件        这里以英语为默认语言,新建一个 Resource Dictionary (WPF)文件,并命名为DefaultLanguage.xaml,内容如下:    <R...

php新手:XAMMP打开开源php代码

1.启动XAMPP 打开XAMPP启动 Apache 和 MySql 如果发现默认的80端口被IIS占用了 请参考 这个 如何改变apache被占用的端口 2.将源代码复制到 磁盘(XAMPP安装目录)htdocs 下自己创建一个文件夹内 3.打开网址http://localhost:82/ 82端口为Apache使用,如果默认被占用,请在第一步中修...

squid故障汇总

1、COSS will not function without large file support (off_t is 4 bytes long. Please reconsider recompiling squid with --with-large-files Bungled squid_webcache.conf 。。。。。。。 检查是否在编译...