Xmanager7 解决图形显示问题及常用技巧

错误信息

  1. ssh服务器的x11 forwarding报错的解决
  2. xmanager运行报错:bash: /usr/bin/xterm: No such file or directory
  3. xshell链接服务器 /usr/bin/xauth: file /root/.Xauthority does not exist

1. ssh服务器的x11 forwarding报错的解决

在这里插入图片描述

# 1. 检查linux主机的配置
# 需要远程linux主机上配置OpenSSH服务,启用X11 Forwarding。在OpenSSH的配置文件中(/etc/ssh/sshd_config),打开如下两项:

AllowTcpForwarding yes
X11Forwarding yes

# 打开这两个选项,然后重启sshd服务。
# 注意:
# 使用X11 Forwarding并不需要在远程主机上运行桌面系统,即执行startx。使用X11 Forwarding需要安装rpm包xorg-x11-xauth,如果你在安装linux系统时,如果选择了安装X Window System,那这个包是默认安装的。

# 2. 安装xorg-x11-xauth 和 xclock,xclock 是用来测试gui输出的
[root@i-vfyxrtmx ~]# yum -y install xorg-x11-xauth xclock

# 3. 重启sshd, 或者 /etc/init.d/sshd restart 
[root@i-vfyxrtmx ~]# systemctl restart sshd

2. xmanager运行报错:bash: /usr/bin/xterm: No such file or directory

# 1.原因: xterm没有安装,解决办法是下载然后安装即可。
# 如果机器可以用yum,则直接使用yum安装xterm即可:
# 如果没有网络,则在某台操作系统大版本相同的机器上(最好是同版本)先下载安装包,然后再上传安装。

yum install -y xterm

# 2. 下载 xterm, 下载不了换成yumdownloader即可
# libXpm是xterm的依赖包,libXaw是libXpm的依赖包
yum install --downloadonly --downloaddir=. xterm   
yumdownloader libXpm libXaw      #下载依赖包,下载软件包的另一种写法,如果上边的语句下载不了xterm改用这个命令下载

# 3. 安装, 上传到目标机器的某个目录,以root执行 或者 rpm -Uvh逐个包装即可
yum localinstall xterm

3. xshell链接服务器 /usr/bin/xauth: file /root/.Xauthority does not exist

在这里插入图片描述

# 1. 错误复现
xshell连接服务器的时候提示 /usr/bin/xauth: file /root/.Xauthority does not exist

# 2.原因分析: 一般是因为新服务刚安装好,在root下没有这个隐藏文件导致的,事实上他是可以自己自动重建的,也就是虽然有此提示,但在提示完后也自动创建了这个文件.
# .Xauthority文件可以在每个用户主目录中找到,用于存储xauth用于X会话的身份验证。启动X会话后,cookie将用于验证与该特定显示的连接。
[root@gaosh-1 ~]# ls .Xauthority 
.Xauthority

# 3. 解决方案
一般的解决方案是退出重新登录即可,事实上这个也算不上报错,最多是个提醒

最后成功图形显示

在这里插入图片描述

4. xshell配色方案

先上图
在这里插入图片描述
配色方案 :skycolor.xcs, 或者自行下载,https://download.csdn.net/download/coolhe21cn/87808871

[skycolor]
text=00ff80
cyan(bold)=00ffff
text(bold)=e9e9e9
magenta=c000c0
green=80ff00
green(bold)=3c5a38
background=042028
cyan=00c0c0
red(bold)=ff0000
yellow=c0c000
magenta(bold)=ff00ff
yellow(bold)=ffff00
red=ff4500
white=c0c0c0
blue(bold)=1e90ff
white(bold)=fdf6e3
black=000000
blue=00bfff
black(bold)=808080
[Names]
name0=skycolor
count=1
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

若行若冲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值