文章目录

  • 安装mutter窗口管理器和xterm终端
  • 安装TigerVNC Server
  • 创建VNC Server密码
  • 配置VNC Server
  • 关闭防火墙和iptables服务
  • 启动VNC Server
  • 安装VNC Viewer
  • 连接VNC Server
  • 列出VNC Server启动的桌面
  • 停止VNC Server桌面

安装mutter窗口管理器和xterm终端

$ sudo yum install -y mutter
$ sudo yum install -y xterm
$ which mutter xterm
/usr/bin/mutter
/usr/bin/xterm

安装TigerVNC Server

$ sudo yum install -y tigervnc-server

$ which vncserver
/usr/bin/vncserver

如果启动mutter命令时汇报如下错误
```bash
$ mutter(mutter:439427): GLib-GIO-ERROR **: 11:00:34.258: Settings schema 'org.gnome.settings-daemon.peripherals.touchscreen' is not installedTrace/breakpoint trap

则需要安装依赖的包

$ sudo yum install -y gnome-settings-daemon

创建VNC Server密码

$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

配置VNC Server

# 调整分辨率至 1680x1200
$ cat ~/.vnc/config
## Supported server options to pass to vncserver upon invocation can be listed
## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
## Several common ones are shown below. Uncomment and modify to your liking.
##
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
# geometry=2000x1200
# localhost
# alwaysshared
geometry=1680x1200# create the .Xclients file
$ cat ~/.Xclients
/usr/bin/xterm &
/usr/bin/mutter$ chmod a+x ~/.Xclients
$ ls -l .Xclients
-rwxr-xr-x. 1 tony tony 35 Apr 12 00:54 .Xclients

关闭防火墙和iptables服务

# 防止VNC的侦听端口被阻挡
$ sudo systemctl stop firewalld
$ sudo systemctl disable firewalld$ sudo systemctl stop iptables
$ sudo systemctl disable iptables

启动VNC Server

第一次启动VNC Server时会提示.Xauthority文件不存在,可以忽略;VNC Server会自动创建一个。

VNC Server会创建一个桌面,编号为“:1”,实则侦听端口5901;如果编号为“:2”,则侦听5902;以此类推。

$ vncserver
xauth:  file /home/tony/.Xauthority does not existNew 'controller:1 (tony)' desktop is controller:1Starting applications specified in /home/tony/.vnc/xstartup
Log file is /home/tony/.vnc/controller:1.log$ ls -la ~/.Xauthority
-rw-------. 1 tony tony 251 Apr 12 01:11 .Xauthority

安装VNC Viewer

在Windows下,下载VNC Viewer客户端软件。
https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.20.113-Windows.exe

连接VNC Server

安装之后,启动桌面上的VNC Viewer程序。
点击File菜单,选中New Connection菜单项,弹出连接窗口,

  1. 输入VNC Server的IP地址或机器名,后面跟着要连接的窗口编号,:1或:2
    注意:不要缺少了冒号或者使用空格,或者在冒号后如何网络端口号,VNC View程序会自动的将窗口编号转换成端口号。
  2. 给这个连接起一个名字,例如“controller”。
  3. 输入连接密码,即vncpasswd命令设置的密码。
  4. 连接到VNC Server的窗口如下,可以看到xterm终端已经启动。
    注意:由于这只是一个最简单的图形环境,没有菜单可以启动新的终端,尽量不要关闭最初的xterm终端。如果不小心关闭了最后一个终端,需要登录到命令行窗口,然后执行如下命令,这样就可以在图形桌面获得一个新的终端了。
$ export DISPLAY=localhost:1
$ xterm &


安装并启动一个firefox实验一下。

列出VNC Server启动的桌面

$ vncserver -listTigerVNC server sessions:X DISPLAY #     PROCESS ID
:1              104931

停止VNC Server桌面

$ vncserver -kill :1

Linux下配置简单的图形桌面环境相关推荐

  1. linux下配置Docker的jupyter notebook环境

    jupyter notebook环境配置备忘: 1.安装:pip install jupyter 2.配置: 1)生成配置文件:jupyter notebook --generate-config 2 ...

  2. 在Linux 下配置PHP 支援GD

    本站的另一篇文章介绍了在Linux 下配置PHP + MySQL 的执行环境,而照着该篇文章安装的PHP 是未能支援GD 的. 而本文就是介绍在Linux 下安装GD,并配置PHP 支援GD. GD ...

  3. linux离线配置qt环境,Linux下配置QT环境

    一.下载Qt源码包到本机,然后解压缩 #tar zxvf qt-x11-opensource-src-4.3.2.tar.gz -C /usr/local //将qt-x11-opensource-s ...

  4. Linux 桌面版太“惨”:21 个图形桌面环境,只有 2 种设计

    编译 | 苏宓 出品 | CSDN(ID:CSDNnews) Linux 诞生的 31 年间,作为一款开源且免费的操作系统,称霸几乎整个 IT 服务器领域,同时全球超过 70% 的智能手机也都在运行它 ...

  5. linux 和android开发环境,如何在linux下配置AndroidStudio开发环境

    1.选择linux系统 个人比较推荐国产的UbuntuKylin,目前最新的系统已经更新到16.04了,这个系统集合了原生Ubuntu系统的优点,有具有中国特色,比较适合国人使用.还有一个国产系统比较 ...

  6. linux c 下信号量 windows下event_windows和linux下配置jdk环境

    一 在linux 下配置jdk 环境 ① 在官网下载安装包,这里如何下载安装包就不一一叙述,下载安装包完成后,使用rz命令上传至linux中.提前在linux中建立一个文件夹 mkdir /usr/l ...

  7. linux 卸载ava,linux下配置ava环境变量.doc

    linux下配置ava环境变量 Linux下配置JAVA运行环境: 一:配置Linux和Windows共享文件夹 在windows系统下建立文件夹 "ltw" 点add按扭进行配置 ...

  8. linux安装toncat环境变量,linux下JDK,tomcat的安装与环境变量配置

    先从网上下载jdk(jdk-1_5_0_02-linux-i586.rpm) ,下载后放在/home目录中,当然其它地方也行. 进入安装目录 #cd /home #cp jdk-1_5_0_02-li ...

  9. linux下配置squid 服务器,最简单使用方式

    linux下配置squid 1.什么是squid Squid cache(简称为Squid)是一个流行的自由软件(GNU通用公共许可证)的代理服务器和Web缓存服务器.Squid有广泛的用途,从作为网 ...

最新文章

  1. Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(andro
  2. 来人呐,有人又要抢钱啦!
  3. 解决 Out of range value adjusted for column 'ID' at row 1
  4. 如何运行含spark的python脚本
  5. Java PriorityQueue poll()方法与示例
  6. CentOS上 安装NodeJS
  7. 大屏监控系统实战(7)-后端整合MybatisPlus并暴露服务
  8. opencv-api getAffineTransform()
  9. java继承与覆盖_Java-继承与覆盖【摘抄】
  10. linux 查看添加的镜像源,linux镜像源的查看、配置以及删除
  11. go程序设计语言-前言
  12. 【VRP问题】基于节约算法CW求解带容量的车辆路径规划问题(CVRP)
  13. Java面试宝典2018
  14. @MapperScan和@Mapper的使用
  15. HTML常见问题整理1
  16. JMF(Java多媒体框架)资料汇总
  17. 编程初学者的一些学习干货笔记
  18. 11种dialogBox样式打包开源,逐一详解
  19. Unity教程初级Ruby‘s Adventure游戏实现带工程源码
  20. 教育知识与能力简答题知识点

热门文章

  1. python编程从入门到实践之外星人入侵
  2. 代数学笔记2: 域扩张(二)
  3. LSTM公式详解推导
  4. PaddlePaddle顶会论文复现 | ECO视频动作识别网络
  5. PreScan中对象沿预设轨迹运动的若干方式介绍
  6. python项目总结与展望_我做知识星球一周年总结与未来展望
  7. 基于python的科技论文_实地科研 | 上海财经大学 | 金融科技、商业分析、人工智能:机器学习、人工智能及其在金融科技中的应用(2021.1.25开课)...
  8. 【mysql基础知识】解决java写入数据库时中文乱码的问题
  9. mongodb的文档游标
  10. java 内部类 作用_java内部类的作用分析