当前位置:首页 > Windows程序 > 正文

window用Xmanager4.0的Xstart连接linux远程桌面

2021-03-25 Windows程序

xterm.x86_64 0:253-1.el6

Execute command path:/usr/bin/xterm 

Xstart连接Linux远程桌面有一个好处,服务器端不用做什么设置,开启SSH即可。

服务器要有桌面环境,和X Window

用XDMCP连接,服务器端得做一些配置,麻烦。

菜单

Xmanager Enterprise 4 -- Xbrowser 

新建一个Xstart会话


技术分享


 

协议选ssh

执行命令 点击后面的按钮选GNOME

建好后打开这个会话就可以连接到远程桌面了,很简单。

连接上后任务栏里有三个菜单,

一个是显示linux的头部菜单

一个是显示linux的任务栏

一个是显示linux的桌面

如何退出

在任务栏(右侧)里右键关闭xmanager

还可以用如下方法建Xstart会话

菜单

Xmanager Enterprise 4 -- Xstart


技术分享


 

如果报错:已拒绝x11转移申请,

(首先检查 etc/ssh/sshd_config 中 设置 X11Forwarding yes
但是在某些主机上,无论你在客户端如何设置,都无法正确的使能X11 forwarding功能,登录后DISPLAY永远是空值。sshd_config文件也没有将X11 forwarding功能禁用。
解决办法:
原来X11 forwarding依赖“xorg-x11-xauth”软件包,所以必须先安装“xorg-x11-xauth”软件包。
yum install xorg-x11-xauth)

服务器上应该装有X Window,见文后连接。

服务器要没有桌面环境,会报如下错误

[17:18:41] Start timer (TIMER_SHUTDOWN, 180).
bash: /usr/bin/gnome-session: No such file or directory

----------------------------------------------------------------------------------------------------------------------------------------------

通过xstart启动gnome桌面的具体调置

启动xstart,命名一个session,输入主机名,悬着SSH,,输入用户名和密码,

Execution Command框:

若启动GNOME,填写DISPLAY=$DISPLAY /usr/bin/gnome-session,若启动KDE,填写DISPLAY=$DISPLAY /usr/bin/startkde

 修改配置

1)依次点击 开始--》所有程序--》XManager 3 ——》Xconfig,然后双击你当前正在使用的配置(有个小对勾,一般是Default Profile)。

2)Window Mode 选择 Multiple Windows Mode,然后点击Settings, 选择Multiple Windows Mode选项卡,Window对应下拉框选择 Remote Only 或者Automatic Switch,点击确定

3)options 请选中 Terminate at Reset

4)点击确定。

无法启动xstart的几个错误及解决

错误一:连接时出现:Can‘t open display: localhost:10.0

 _X11TransSocketINETConnect() can‘t get address for localhost:6010: Name or service not known

/usr/bin/xterm Xt error: Can‘t open display: localhost:10.0

解决方法:

在/etc/hosts 中加入 

127.0.0.1 localhost

ipaddress  hostname  

之后能进入图形界面,注意是实际ip和机器名

错误二:slc5和slc4的xterm目录不一样,需要注意。

/usr/X11/bin/xterm: Command not found.

将Excution command改为

/usr/bin/xterm -ls -display $DISPLAY

即可

------------------------------------------------------------------------------------------------------------------------

[16:21:58] Host authentication initiated…
[16:21:58]  Hostkey fingerprint:
[16:21:58]  ssh-dsa 1024 18:4c:c3:f8:71:0f:d2:b2:e1:4c:21:f8:33:49:9a:9a
[16:22:00]  Accepted. Verifying host key…
[16:22:00]  Verified.
[16:22:00] User authentication initiated…
[16:22:00]  Sent user name ‘oracle’.
[16:22:00]  Sent password.
[16:22:00]  Access granted.
[16:22:00] Sent X11 forwarding request…
[16:22:00]  Succeeded.
[16:22:00] Sent the command line.
[16:22:00]  /usr/X11R6/bin/xterm -ls -display $DISPLAY
[16:22:00] Start timer (TIMER_SHUTDOWN, 180).
/usr/X11R6/bin/xauth:  creating new authority file /home/oracle/.Xauthority
bash: /usr/X11R6/bin/xterm: No such file or directory
[16:22:01] Connection closed

解决思路:

[root@localhost ~]#  rpm -qf /usr/bin/xterm
xterm-215-4.el5

查询到缺少该rpm包,安装该包

挂载光驱

[root@localhost ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom
[root@localhost ~]#cd /mnt/cdrom

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/67041.html