腾讯云服务器上快速安装xterm

在腾讯上申请了一台云服务器,默认安装CentOS7.2 64位,3年价格700元,价格还是蛮实惠的。1CPU,1G,可以用于一些新的软件的安装和测试。非常方便。

使用中发现默认xterm不安装,考虑到有些软件还是需要图形支持的。还是需要配置一个X Server环境,以方便使用。
X Server 使用Xming X Server,小巧玲珑。

  • 安装xterm
[root@VM_0_10_centos ~]# yum install xterm 
Loaded plugins: fastestmirror, langpacks
epel                                                     | 5.4 kB     00:00
extras                                                   | 3.4 kB     00:00
os                                                       | 3.6 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/7): epel/7/x86_64/group_gz                              |  88 kB   00:00
(2/7): epel/7/x86_64/updateinfo                            | 987 kB   00:00
(3/7): extras/7/x86_64/primary_db                          | 205 kB   00:00
(4/7): os/7/x86_64/group_gz                                | 166 kB   00:00
(5/7): updates/7/x86_64/primary_db                         | 6.5 MB   00:00
(6/7): os/7/x86_64/primary_db                              | 6.0 MB   00:01
(7/7): epel/7/x86_64/primary_db                            | 6.8 MB   00:01
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package xterm.x86_64 0:295-3.el7 will be installed
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: xterm-295-3.el7.x86_64

还是不能运行。

[root@VM_0_10_centos ~]# xterm
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s
xterm: DISPLAY is not set
  • 需要安装xauth
[root@VM_0_10_centos ~]# yum install xauth
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-xauth.x86_64 1:1.0.9-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch           Version                 Repository  Size
================================================================================
Installing:
 xorg-x11-xauth         x86_64         1:1.0.9-1.el7           os          30 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 30 k
Installed size: 48 k
Is this ok [y/d/N]: y
Downloading packages:
xorg-x11-xauth-1.0.9-1.el7.x86_64.rpm                      |  30 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                          1/1
  Verifying  : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                          1/1

Installed:
  xorg-x11-xauth.x86_64 1:1.0.9-1.el7

Complete!
  • 退出当前session,重新登录
Last login: Thu Jul 11 00:29:29 2019 from 117.139.208.24
/usr/bin/xauth:  file /root/.Xauthority does not exist
[root@VM_0_10_centos ~]#

出现了xauth的提示,应该没有问题了。

[root@VM_0_10_centos ~]# xterm
xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'
  • 安装成功
image.png
  • 测试其他x程序
[root@VM_0_10_centos ~]# yum install xclock
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-apps.x86_64 0:7.7-7.el7 will be installed
--> Processing Dependency: libxkbfile.so.1()(64bit) for package: xorg-x11-apps-7.7-7.el7.x86_64
...

[root@VM_0_10_centos ~]# xclock
image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一、Python简介和环境搭建以及pip的安装 4课时实验课主要内容 【Python简介】: Python 是一个...
    _小老虎_阅读 11,146评论 0 10
  • X Window其实是一种规范,它有很多不同的实现,在Linux系统下最流行的是实现Xorg和XFree86,微软...
    wind315阅读 4,763评论 0 1
  • 1.描述计算机的组成及其功能 (一)计算机的组成 1.CPU 2.CPU风扇 3.BIOS 4.内存 5.硬盘 6...
    whamai阅读 5,404评论 0 1
  • 在公司避免不了会给电脑重装系统,小到几台大到几十上百台,如果就只有几台手动安装就可以了,那么如果几十上百台,手动安...
    jie0112阅读 7,154评论 0 4
  • 最近在做一款自驾游产品,目的当然是解决用户在周末或者小长假驱车游玩的需求。目标用户是有车一族,不喜欢宅居,愿意...
    leoplodchang阅读 2,773评论 0 0