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

2019-07-11  本文已影响0人  chimpansee

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

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

[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
[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!
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
[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
上一篇 下一篇

猜你喜欢

热点阅读