转 SecureCRT 使用X11 转发功能打开图形化窗口
https://yq.aliyun.com/articles/53308
摘要: 有些时候,有些程序可能需要依赖图形界面才能启动,例如安装Oracle时(其实oracle支持命令行安装),例如需要启动一个图形界面的浏览器如firefox。作为服务端的系统,通常不会安装臃肿的图形界面。那么如何在不安装图形界面的的情况下启动图形界面的?听起来很矛盾,但是实际上是可行的。 X Win
有些时候,有些程序可能需要依赖图形界面才能启动,例如安装Oracle时(其实oracle支持命令行安装),例如需要启动一个图形界面的浏览器如firefox。
作为服务端的系统,通常不会安装臃肿的图形界面。
那么如何在不安装图形界面的的情况下启动图形界面的?听起来很矛盾,但是实际上是可行的。
X Window System(常被简称为X11或X),是一套基于X display protocol的windowing system,X GUI环境的功能包括窗口的绘制、移动,以及与鼠标、键盘等输入设备的交互。
X采用C/S模型(这是关键):一个X server 和多个应用程序(client)通信。server接收client的请求绘制窗口,并将来自鼠标、键盘等设备的输入传递给client。
因此 X server和client可以位于同一计算机上,例如在Linux主机上使用KDE等桌面环境就是这种模式。X server也可以通过同构网络、异构网络或Internet与client通信。
X server与client之间的通信是不加密的,这个问题可以通过SSH解决。SSH是Secure Shell的简称,SSH可以看作是通信被加密压缩版的telnet。
需要用到SSH的forwarding功能,当X server与client所在计算机都支持SSH协议时,X server与client之间不安全的TCP/IP连接可以转送到(forwarding)二者之间建立的SSH连接上。
了解原理后,我们就可以在本地自建X服务,然后服务器作为X client,把绘图的请求发给本地的X server。 这样就实现了本地显示图像的目的。
例子, 以本地为Windows为例,使用ssh连接到服务器, 把服务器的X请求转发到本地的 X server。
简单的几个步骤即可
.1. 配置服务器的sshd,重启服务
# vi /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
# service sshd restart
.2. 在windows主机安装Xming, 启动X server
option 1:
1.运行xmanger passive
2,观察右下角的Xmanager 小窗口的 端口号 (比如【:1.0】或者【:0.0】),用于本地securecrt export DISPLAY 用。
option 2:
windows下的X server可以通过Xming软件来构建。
https://sourceforge.net/projects/xming/
.3. 在windows主机安装securecrt或putty
.4. 在windows主机配置securecrt或者putty,配置对应会话的转发X11,并重新连接会话
.5. 在securecrt或putty命令行启动GUI命令
开启securecrt FORWARDX11后,会自动设置DISPLAY环境变量.
#echo $DISPLAY
localhost_ip:1.0
或者
localhost_ip:0.0
# firefox
####xmnager
xmnager server 端在windows;
需要在UNIX client 端打开X11 转发功能
/etc/sshd/sshd_config file
add two lines to ~/.ssh/config then connect the system
Host *
ForwardX11 yes
Brief
The X Window System (X or X11 for version 11, for short) is a platform independent method of providing graphics capabilities to an operating system, while also being network transparent. It is most commonly used on Unix and Unix-like systems such as Linux. X itself dates back to 1984 at MIT.
While other systems for providing graphics capabilities are possible, the standard graphical interface system on Linux is the X Window System.
X mechanics
Essentially, what X provides is a program (the X server) which controls the graphics card and performs actual graphics drawing tasks such as splitting the screen into windows, drawing the mouse pointer, drawing lines, accessing the keyboard, etc. It runs the actual video driver, as well as provides an interface through which other programs can issue drawing commands (using the X11 protocol), get input, etc, without having to know what hardware its running on Programs which attach to the X server are called X clients, and may include applications such as word processors, games, etc.
Window managers
One client is special, and is the window manager - X on its own does not manage drawing the window widgets (title bar and borders) and minimizing, maximizing, raising, and other specifics - this is delegated to the window manager. Before desktop environments became more commonly used, the window manager was the primary piece of software responsible for determining the look and feel of the GUI, however, window managers can only address look and feel at the window level - within the application consistency is derived from the use of a common toolkit, which was not a feature of X applications previously. Many window managers are available, such as metacity, kwin4, Window Maker, Enlightenment, and FVWM.
Gnome/KDE Installation and Configuration
The X/windows installing environment includes our recommended package selection as following:
Desktop shell(GNOME/KDE)
Office suit (OpenOffice.org)
Web browser
Email(Evolution)
Instant messaging
Sound and video applications
Software Development Tools
Administration Tools
A. Install Gnome/KDE from System Installation
When we start the Enterprise Linux installation, we'll find this screen: Package Group Selection
Package Group Selection
Select the package groups:
To select a package group, click on the check box beside it.
Once a package group has been selected, click on Details to view which packages are installed by default and to add or remove optional packages from that group.
Desktop
X Windows System
GNOME Desktop Environment
KDE(K Desktop Environment) and all sub categories.
Applications:
Editors ----Emacs/vim-enhanced/XEmacs
Graphical Internet
Text-based Internet
Office/Productivity
Sound and Video
Graphics
Administration Tools
Printing Support
B. No Gnome/KDE even no X Window System's environment
Using ssh X-forward to install the software.
We can use other Linux do below action:
add two lines to ~/.ssh/config then connect the system
Host *
ForwardX11 yes
a. Please install system-config-packages*.rpm by dependence:
insert CD-DISK
# mount /media/cdrom
# rpm -Uvh /media/cdrom/system-config-packages*.rpm
b. Run Redhat Package Management
# system-config-packages
After boot configuration
There are a few more steps to take before your system is ready to use.
The Setup Agent will now guide you through some basic configuration. Please fill appropriate information and click the "Next" button in the lower right corner to continue to finish setup.
Service/Server management
For Gnome please run:
# gnome-session-properties
For KDE please run:
# kcontrol
It's very easy to manage Service/Session using KDE Control Center.
X Window System log
The X Window System log file contain much useful information blow:
/var/log/Xorg.0.log
/var/log/Xorg.1.log
External links
http://en.wikipedia.org/wiki/X_Window_System
http://www.x.org
http://www.xfree86.org
转 SecureCRT 使用X11 转发功能打开图形化窗口的更多相关文章
- 怎么样putty打开图形化管理工具,在终端上
有时需要在putty这种图形终端开放的图形化管理工具将出现以下错误: [root@node2 ~]# Traceback (most recent call last): File "/us ...
- linux 在终端中打开图形化文件管理器
虽然终端十分强大,但在少数使用终端的时候,会突然需要图形化文件管理器的帮忙. 命令: xdg-open "dir" 例如 xdg-open ./ 用图形化文件管理器打开当前文件夹 ...
- xmanager 打开centos7图形化窗口
centos7 最小化安装后,个别时候需要执行一些带图形界面的命令.比如安装oracle,打开xclock等. 前置条件:centos7系统 ,xmanager 已安装 用xclock做测试 1.因为 ...
- jmeter打开图形化界面时指定代理
\apache-jmeter-4.0\bin>jmeter -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888 如果不想在每个请求里面指定代理的话可 ...
- 打开centos7图形化窗口
1. yum groupinstall "X Window System" 2. export DISPLAY=172.16.4.240:0.0 3. yum -y install ...
- PLSQL Developer图形化窗口创建数据库全过程
1.用系统管理员登陆,我这里用户名是system,密码是manager2.首先建立表空间(tablespaces),点击file->new->sql window create tab ...
- PL/SQL Developer图形化窗口创建数据库(表空间和用户)以及相关查询sql
前言:上一篇安装好oracle和pl/sql后,这篇主要讲如何创建数据库,因为接下来我的项目会连接数据库进行开发. 第一步.先用系统管理员登录pl/sql 我这里系统管理员用户名为system,密码为 ...
- 通过 SSH 隧道方式图形化连接 AIX 服务器
跳转到主要内容 登录 (或注册) 中文 [userid] IBM ID: 密码: 保持登录. 单击提交则表示您同意developerWorks 的条款和条件. 查看条款和条件. 需要一个 IBM ID ...
- 利用Xmanager Enterprise 5的passive显示远程linux主机图形化信息
问题描述: 最初的需求是,安装oracle数据(第一次安装都是图形化linxu进去一步步操作,后续发现可以命令静默安装不调用图形化,学习就是步步入深,方得始终),最初实现window弹出linux主机 ...
随机推荐
- Gym - 100187A A - Potion of Immortality —— 贪心
题目链接:http://codeforces.com/gym/100187/problem/A 题解: 光题意就想了很久:在最坏情况下的最小兔子数.其实就是至少用几只兔子就一定能找出仙药(答案存在的话 ...
- RobotFramework教程使用笔记——web自动化测试弹窗处理
在web自动化测试中会遇到各种弹出框,在selenium中有对这些弹出框的处理. 弹出框一般有这么几类: 1.普通的弹出窗口,如果是可以定位的,直接定位到窗口,然后进行相应的操作. 2.如果是浏览器系 ...
- ARCGIS 发布TIF,金字塔文件是否Server自动生成。
经过发布一个TIF带OVR的服务TIF_OVR, 和一个不带金字塔的TIF服务TIF_WITHOUT_OVR. 证实,在..\arcgisserver\directories\arcgissystem ...
- linux从用户组中删除某用户
1. 从wheel组中删除 test用户 gpasswd wheel -d test 2. 给 目录赋予 其他组上传文件的权限 chmod a+w test
- python学习笔记:第二天(运算符)
Python3 运算符 注:以下部分示例源自于http://www.runoob.com/ 1.算术运算符 假设变量a为10,变量b为20: 运算符 描述 实例 + 加 - 两个对象相加 a + b ...
- 【C/C++】malloc()
<math.h>文件中对malloc()函数原型: _CRTIMP void * __cdecl malloc(size_t); MSDN中对malloc()的解释: malloc re ...
- BZOJ2006:超级钢琴(ST表+堆求前K大区间和)
Description 小Z是一个小有名气的钢琴家,最近C博士送给了小Z一架超级钢琴,小Z希望能够用这架钢琴创作出世界上最美妙的音乐. 这架超级钢琴可以弹奏出n个音符,编号为1至n.第i个音符的美妙度 ...
- 深入理解java虚拟机---->java内存区域与内存溢出异常
2. java内存区域于内存溢出异常 2.1 概述: 对于C/C++而言,内存管理具有最高的权利,既拥有每一个对象的“所有权”,又担负着每一个对象生命开始到结束的维护责任. 对于java而言,则把内存 ...
- 是否要从单片机转为嵌入式Linux?
作者:嵌入式老鸟火哥 授权转载于公众号嵌入式老鸟的职场之道(ID: ict_embedded),有增加内容和修改. 最近很多童鞋投票并咨询如何从单片机转为嵌入式Linux开发.看来读者圈中做单片机,R ...
- npm安装cnpm淘宝镜像
npm set registry https://registry.npm.taobao.org # 注册模块镜像 npm set disturl https://npm.taobao.org/d ...