Xwindows和一些编码

kain posted @ 2013年2月14日 10:56 in c&c++ with tags linux , 2766 阅读

 

Xwindows--X server:
一个程序,它在某台机器上运行,接受远方clinet的请求,画出请求的图形。并把得到的响应发送给client,以便使得client知道下一步的动作,并把相应信息返还给server,以便更新图形。
 
本机telnet 启动服务器sun服务器,sun服务器的监听进程fork出telnet进程服务请求的机子.telnet进程fork出来两个,父进程负责与远方的机子通信,子进程exec成shell进程,解释执行父进程得到的命令,再将结果返回给远方的机子。
 
根据Xwindows原理,远方的机子应该是server,将收到的服务器的结果显示给用户看,Xwindows 的网络透明,本机telnet到多个远发的服务器,他们之间可以相互拷贝,使用鼠标选中一段字符,然后就可以在另外的程序里把该段字符粘贴过去,不论程序运行在什么地方。
 
窗口管理器:
窗口管理器是Gnome和KDE的一部分,主要功能:改变窗口大小,移动窗口,改变窗口的层叠顺序。
通常的x客户程序不需要知道有人想移动它,它只听窗口管理器的。你的窗口上的标题,按钮,全部都是窗口管理器提供的。关闭一个程序的窗口,是窗口管理器通知那个程序“有人要关掉你,你自己准备后事,然后退出吧”
 
系统的编码的问题在linux下经常遇到,例如windows下面的文件有时候名字和内容在linux下面是乱码,这主要是和linux的utf8编码与windows的gbk不同所导致的。在linux下面创建的文件默认是utf8,所以当用u盘拷贝到别人的windows机器时就变成了乱码。同理windows下面的问题拷贝到linux下面的问题,这可以通过mount 的时候增加转码的参数解决-o iocharset=utf8就ok了,这里的utf8是本地编码,可以通过locale命令实现
Avatar_small
boardmodelpaper.com 说:
2023年4月16日 14:58

we are providing the pdf based on internet search according to past years old examination test and those question bank or study material download and shared based on the internet only.All the Users of the BoardModelPapers can use those boardmodelpaper.com sample papers or Previous Paper Pdf of class-wise study material and blueprint and any for reference purpose only and we are providing the pdf based on internet search according to past years old examination test and those question bank.

Avatar_small
seo service london 说:
2024年2月22日 20:02

I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter