CN101582890B - Method and system for realizing connection between X11 client and X11 server - Google Patents

Method and system for realizing connection between X11 client and X11 server Download PDF

Info

Publication number
CN101582890B
CN101582890B CN2009100865547A CN200910086554A CN101582890B CN 101582890 B CN101582890 B CN 101582890B CN 2009100865547 A CN2009100865547 A CN 2009100865547A CN 200910086554 A CN200910086554 A CN 200910086554A CN 101582890 B CN101582890 B CN 101582890B
Authority
CN
China
Prior art keywords
server
client
pseudo
instruction
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2009100865547A
Other languages
Chinese (zh)
Other versions
CN101582890A (en
Inventor
高进军
韩冀中
王楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN2009100865547A priority Critical patent/CN101582890B/en
Publication of CN101582890A publication Critical patent/CN101582890A/en
Application granted granted Critical
Publication of CN101582890B publication Critical patent/CN101582890B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a method and a system for realizing connection between X11 client and X11 server. The method comprises the following steps: step 1, a pseudo server is started and used for intercepting the connection request sent by the X11 client and the claim for connection request sent by the X11 server; step 2, when the pseudo server intercepts the connection request sent by the X11 client, the pseudo server establishes connection with the X11 client as the X11 server; step 3, when the pseudo server intercepts the claim for connection request sent by the X11 server, the pseudo server establishes connection with the X11 server as the X11 client; step 4, the pseudo server transmits data package between connected X11 client and X11 server. The invention can realize loosely coupledconnection between the X11 client and the X11 server to facilitate the X11 client not to be influenced by the running state of the X11 server.

Description

Realize the method and system that the X11 client is connected with the X11 server
Technical field
The present invention relates to X11 (X Window System Protocol Version 11, X windows system version 11) agreement, relate in particular to the method and system that realize that the X11 client is connected with the X11 server.
Background technology
X Window System (X windows system) is a cover windows system; Be the exploitation of Unix type operating system by MIT (Massachusetts Institute of Technology) at first; Be widely used in the operating systems such as Linux, Unix, BSD now, the Windows of X windows system and Microsoft has very big difference, and the windows system of Microsoft is by building in the operating system; And the X windows system can't help to build in the operating system; It is common software systems, and various types of Unix operating system can utilize it to realize the operation of graphical interfaces, such as mouse action; Linux or Unix do not have it can move yet, and just can't support the program of graphical interfaces output.The X windows system has obtained very big development since issue, outside the core protocol of X11, increased a lot of Extended Protocols again, and these Extended Protocols and core protocol have made things convenient for the Application and Development of people to X11 together.
The X windows system is based on C/S (Client/Server; Client/server) pattern; Various X11 application programs all are the X clients, the server that has X.org and XFree86 to issue that the X server is now general, about the content of X windows system like " The X Window System "; Software:Practiceand Experience is described in 1990.
Window between the X11 server is shared an application that is based on X windows system C/S model, and this application realizes that to the effect that same window is shared between different X11 servers; Share here and refer to that certain window is shown by a plurality of X11 servers.The sharing mode of current proposition has a variety of, but from essence, has two kinds, and a kind of is through the method that window duplicates the window on the X11 server to be copied on another X11 server; Another kind is through the method for window migration the window on the X11 server to be moved on another X11 server; About the content of window sharing mode like " Collaborative sharing of windows between Mac OS X, the X WindowSystem and Windows ", In Proceedings of Norsk Informatikkonferanse; NIK 2004.Stavanger; Norway, November 2004, described in.
Some agreements and software have been arranged now through realizing between the different X11 servers that window or desktop share inserting a server between X11 server and the X11 client, like VNC and XMove, about VNC and XMove like " Virtual Network Computing "; IEEE INTERNETCOMPUTING; 1998 with " XMOVE:A PSEUDOSERVER FOR X WINDOW MOVEMENT ", TheX Resource, Issue 11; Pp.143-170, July 1994 is said.VNC is an application shared agreement of desktop more widely, and XMove software can be realized the window migration between the X11 server, and what the VNC agreement realized is sharing of whole desktop, and the XMove realization is the migration of single window between the X11 server.Though the function that VNC and XMove realize is different, the method that their are realized is identical in itself, all is to be sent to other X11 servers with the form of compressed picture and to realize sharing through the frame on the local X11 server being cushioned (framebuffer).With frame buffer compression picture is the defective that the realization of technical foundation can exist this technology self can't overcome, and at first is the pressure to the network bandwidth, if application window changes than very fast, will cause program feature to descend rapidly, responds slack-off; Next is that the X11 number of servers of sharing window is had restriction, and a plurality of X11 servers just need send a plurality of frame buffering pictures simultaneously, and this moment, the network bandwidth will become bottleneck.
In the prior art, be connected in case the X11 server breaks off with the X11 client, the X11 client will be out of service.This will be unfavorable to the long playing X11 application program of needs; Because the window that these X11 application programs generate can not be closed, must one heading straight for, in case close; Be equivalent to break off being connected of X11 server and X11 client, will cause application program out of service.VNC does not break off being connected of X11 application program and X11 server with Xmove; Just the framebuffer of X11 server end is sent on another X11 server with the form of picture and show, and actual X11 client still is connected with the X11 server that connects at first.
Summary of the invention
For addressing the above problem, the invention provides the method and system that a kind of X11 of realization client is connected with the X11 server, can realize that between X11 client and X11 server loose coupling is connected, make the X11 client not receive the influence of X11 operation condition of server.
The invention discloses the method that realizes that the X11 client is connected with the X11 server, said method comprises:
Step 1 starts pseudo server, and said pseudo server is intercepted the connection request that the X11 client sends and the connection request that requires of X11 server end transmission;
Step 2, when said pseudo server listened to the connection request of X11 client, said pseudo server connected with said X11 client as an X11 server;
Step 3, when said pseudo server listen to the X11 server require connection request the time, said pseudo server connects with said X11 server as an X11 client;
Step 4, said pseudo server is transmitted packet between X11 client that connects and X11 server.
Said step 2 also comprises,
Step 21, said pseudo server receive the resource that said X11 client sends and generate instruction, generate the attribute that is used to write down resource is set up in instruction at said pseudo server the Resources list according to said resource; And in the X11 server that said pseudo server connects, require to send resource generation instruction with the X11 server of said X11 client connection, make said X11 server generate the copy of said the Resources list;
Said step 3 also comprises,
Step 22; The X11 client that connects at said X11 server requirement has started and when having connected with said pseudo server; Said pseudo server sends resource to said X11 server and generates instruction, makes said X11 server generate the copy of said X11 client the Resources list in said pseudo server.
Said step 4 further does,
The Resource Properties that step 31, said pseudo server receive the X11 client transmission that connects is provided with instruction, resolves said Resource Properties instruction is set;
Step 32; Extract the required Resource Properties of maintenance resources tabulation instruction is set; According to said Resource Properties the said X11 client of instruction modification the Resources list in said pseudo server is set; Said Resource Properties is provided with instruction sends to requirement, the Resource Properties of pseudo server end and the Resource Properties of X11 server end are consistent with the X11 server that said X11 client connects.
Said step 21 also comprises:
Step 41, said pseudo server are the resource allocation ID in said the Resources list when setting up said the Resources list, and the ID that distributes is returned to said X11 client;
After said pseudo server has sent said resource generation instruction, also comprise in said step 21 and the step 22:
Step 42, said X11 server is resource allocation ID in the said copy, and said ID is returned to said pseudo server when generating the copy of said the Resources list;
Step 43, said pseudo server receive the said ID that said X11 server returns.
Said step 4 further does,
Step 51, said pseudo server receive the drawing for order of the X11 client transmission that connects, if said pseudo server connects with the X11 server that requires to connect said X11 client, then execution in step 52, otherwise, abandon said drawing for order;
Step 52; Resolve said drawing for order; Revise that address information is said X11 server corresponding address in the said drawing for order, the ID that revises resource in the said drawing for order is the ID that said X11 server is said resource allocation, and said drawing for order is sent to said X11 server.
Said step 4 further does,
Step 61; Said pseudo server receives the instruction of replying that the X11 server that connects sends; Resolve the said instruction of replying; Revise that said to reply address information in the instruction be the X11 client corresponding address that said X11 server requirement connects, revising the said ID that replys resource in the instruction is that said pseudo server is the ID of the resource allocation of said X11 client, with said reply to instruct send to said X11 client.
Said step 3 also comprises,
Step 71, when the X11 client of said X11 server requirement connection had connected with said pseudo server, said pseudo server sent the expose incident to said X11 client, so that said X11 client is sent drawing for order;
Step 72, said pseudo server are transmitted to said X11 server with said drawing for order after receiving the drawing for order of said X11 client transmission.
Said step 2 also comprises,
After step 81, said pseudo server have been set up connection with said X11 client, be that said client is distributed client identification;
Said step 3 also comprises,
Step 82; After said pseudo server has been set up connection with said X11 server; The client identification of the X11 client that will connect with said pseudo server sends to said X11 server, so that said X11 server selects to require the X11 client that connects from the X11 client that connects with said pseudo server.
The invention also discloses the system that realizes that the X11 client is connected with the X11 server, said system is a pseudo server, and said pseudo server comprises:
Intercept module, be used to intercept the connection request that the X11 client sends and the connection request that requires of X11 server end transmission;
Set up the client link block, be used for when intercepting module and listening to the connection request of X11 client, said pseudo server being connected with said X11 client as an X11 server when said;
Set up the server link block, be used for when said intercept module listen to the X11 server require connection request the time, said pseudo server is connected with said X11 server as an X11 client;
Forwarding module is used between X11 client that connects and X11 server, transmitting packet.
The said client link block of setting up also is used to receive the resource that said X11 client sends and generates instruction, generates the attribute that is used to write down resource is set up in instruction at said pseudo server the Resources list according to said resource; And in the X11 server that said pseudo server connects, require to send resource generation instruction with the X11 server of said X11 client connection, make said X11 server generate the copy of said the Resources list;
The said server link block of setting up also is used for when the X11 client that the said X11 server requirement that connects connects has started and connected with said pseudo server; Send resource to said X11 server and generate instruction, make said X11 server generate the copy of said X11 client the Resources list in said pseudo server.
Said forwarding module is further used for receiving the Resource Properties that the X11 client of connection sends instruction is set, and resolves said Resource Properties instruction is set; Extract the required Resource Properties of maintenance resources tabulation instruction is set; According to said Resource Properties the said X11 client of instruction modification the Resources list in said pseudo server is set; Said Resource Properties is provided with instruction sends to requirement, the Resource Properties of pseudo server end and the Resource Properties of X11 server end are consistent with the X11 server that said X11 client connects.
Said X11 server is resource allocation ID in the said copy, and said ID is returned to said pseudo server when generating the copy of said the Resources list;
The said server link block of setting up also is used to receive the said ID that said X11 server returns;
The said client link block of setting up also is used for when setting up said the Resources list, is the resource allocation ID in said the Resources list, and the ID that distributes is returned to said X11 client.
Said forwarding module is further used for receiving the drawing for order that the X11 client of connection is sent; If said pseudo server connects with the X11 server that require to connect said X11 client, then resolve said drawing for order, revise that address information is said X11 server corresponding address in the said drawing for order; The ID that revises resource in the said drawing for order is the ID that said X11 server is said resource allocation; Said drawing for order is sent to said X11 server, otherwise, said drawing for order abandoned.
Said forwarding module is further used for receiving the instruction of replying that the X11 server of connection sends; Resolve the said instruction of replying; Revise that said to reply address information in the instruction be the X11 client corresponding address that said X11 server requirement connects; Revising the said ID that replys resource in the instruction is that said pseudo server is the ID of the resource allocation of said X11 client, replys instruction and sends to said X11 client said.
The said server link block of setting up also is used for when the X11 client of said X11 server requirement connection has connected with said pseudo server, sending the expose incident to said X11 client, so that said X11 client is sent drawing for order; After receiving the drawing for order of said X11 client transmission, said drawing for order is transmitted to said X11 server.
Said set up the client link block also be used for said X11 client set up connect after, be that said client is distributed client identification;
Said set up the server link block also be used for said X11 server set up connect after; The client identification of the X11 client that will connect with said pseudo server sends to said X11 server, so that said X11 server selects to require the X11 client that connects from the X11 client that connects with said pseudo server.
Beneficial effect of the present invention is; X11 client and X11 server connect with pseudo server; And by asking between pseudo server forwarding X11 client and X11 server and replying; Make and realize between X11 client and X11 server that loose coupling is connected, the X11 client does not receive the influence of X11 operation condition of server; Pseudo server is realized X11 server and X11 client functionality, makes that need not change existing X11 server just can realize the present invention with the X11 client, and realization conveniently; Through substituting transmission frame buffer compression picture with transmitting drawing for order, reduce network bandwidth requirement, reduce Network Transmission pressure.
Description of drawings
Fig. 1 is the structure chart of X11 server of the present invention and X11 client place system;
Fig. 2 is the method flow diagram that realization X11 server of the present invention is connected with the X11 client;
The embodiment flow chart that pseudo server connects in the method that Fig. 3 is a realization of the present invention X11 server with the X11 client is connected;
Pseudo server forwarding embodiment flow chart in the method that Fig. 4 is a realization of the present invention X11 server with the X11 client is connected;
Fig. 5 is the structure chart of pseudo server of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is done further detailed description.
Structure such as Fig. 1 of X11 server of the present invention and X11 client place system are said, and this system comprises a plurality of X11 servers and a plurality of X11 client, and this X11 server is connected with pseudo server through network with this X11 client.
Method of the present invention is as shown in Figure 2.
Step S201 starts pseudo server, this pseudo server intercept the X11 client connection request and X11 server end require connection request.
Step S202, when this pseudo server listened to the connection request of X11 client, this pseudo server connected with the X11 client of sending this connection request as an X11 server.
Step S203, when this pseudo server listen to the X11 server require connection request the time, this pseudo server requires the X11 server of connection request to connect as an X11 client with sending this.
Step S204, this pseudo server is transmitted packet between X11 client that connects and X11 server.
Concrete application scenario is described below in this system:
Step 201 starts pseudo server.
Step 202, operation X11 client, pseudo server connects with the X11 client.
Step 203 connects the X11 server of pseudo server with appointment output window on this X11 server as requested.
Step 204 when having checked intermediate object program or do not need always output window, is broken off being connected of X11 server and pseudo server.
Step 205 connects X11 server and pseudo server after breaking off again.
Step 206, a plurality of X11 servers are connected with pseudo server simultaneously, and the window of exporting same X11 client is to these a plurality of X11 servers.
Because pseudo server is realized the function of X11 server and X11 client respectively in connection,, be convenient to realize so the present invention need not X11 server and X11 client in the change system.
Concrete another sight of using does in this system, when starting pseudo server, this pseudo server is connected on the X11 server of a concrete appointment, moves the X11 client then and it is connected with pseudo server; After X11 client and X11 server connect through pseudo server, can whenever breaking off being connected of pseudo server and X11 server in the operation of X11 client.
The present invention realizes that loose coupling degree that the X11 server is connected with the X11 client is that the running status of X11 server has no direct influence to the current X11 client of moving; Thereby close the window or the X11 server self of X11 server end; Concerning pseudo server, be equivalent to break off and being connected of X11 server, can not influence the operation of X11 client; Have only when the X11 server clearly when pseudo server sends the order of closing the X11 client, the X11 client just can be out of service.
The method embodiment flow process that realization X11 server of the present invention is connected with the X11 client is as shown in Figure 3.
Step S301 starts pseudo server, opens two socket (listen socket), intercept respectively the X11 client connection request and X11 server end require connection request; When listening to the connection request of X11 client, execution in step S302, when listen to the X11 server require connection request the time, execution in step S303.
Step S302, this pseudo server connects with this X11 client as an X11 server; For this X11 client is distributed client id, execution in step S304.
Step S303; This pseudo server connects with said X11 server as an X11 client; The client id of the X11 client that will connect with this pseudo server sends to this X11 server; So that this X11 server selects to require the X11 client of connection, execution in step S306 from the X11 client that this pseudo server connects.
Step S304 receives the resource generation instruction that this X11 client is sent, and generates instruction according to this resource and sets up the Resources list in this locality, the attribute of record resource; This pseudo server is the resource allocation ID of this X11 client when setting up the Resources list, and the ID that distributes is returned to this X11 client.
The resource that writes down in the Resources list comprises: GC (drawing context), Font (font), WindowAttributes (window attribute), Bitmap (bit diagram), Pixmap (pixel map), Tile (tile figure) and Stipple (point is drawn).
Whether step S305 has requirement to connect the X11 server of this X11 client, if having in the X11 server that this pseudo server connects; Execution in step S306; Otherwise, when receiving the drawing for order of this X11 client transmission, execution in step S309; When the Resource Properties that receives this X11 client transmission is provided with instruction, execution in step S310.
Step S306, this pseudo server generates instruction to X11 server transmission resource, makes this X11 server generate the copy that it requires X11 client the Resources list in this pseudo server of connection.
This X11 server is resource allocation ID in this copy, and this ID is returned to this pseudo server when generating the copy of the Resources list; This pseudo server receives this ID.
Step S307, this pseudo server sends the Expose incident to the X11 client, the X11 client is produced and send to repaint all window instructions.
Step S308, this pseudo server is transmitted to this X11 server with this drawing for order.
Step S309, this pseudo server abandons the drawing for order that receives.
Step S310, this pseudo server resolving resource attribute is provided with instruction, and according to the resolving resource attribute the Resources list and the attribute of this X11 client of instruction modification in this locality is set.
Among the present invention, pseudo server is an X11 client for the X11 server, is an X11 server for the X11 client.
When pseudo server was connected with the X11 client, pseudo server was as an X11 server, realize request data package that operation comprises that Analysis of X 11 clients are sent and send to the X11 client reply, incident, misdata bag.
When pseudo server was connected with the X11 server, pseudo server was as a client, realized that operation comprises: send request data package and receive the replying of X11 server, incident, misdata bag to the X11 server.
In addition; Owing to stipulate Colormap (color table), Graphical Context (drawing context), Font (font) among the X11; Window Attributes (window attribute) is retained in the X11 server end with the relevant resource of drawing; Therefore, after breaking off being connected of pseudo server and X11 server, those resources that are kept at the X11 server end will be by this X11 server recovery; If when pseudo server is connected with this X11 server once more, utilize them, need regenerate those resources at this X11 server end.
Therefore; Pseudo server is set up the corresponding the Resources list of X11 client among the present invention; Resource is preserved, and when pseudo server was connected with the X11 server, pseudo server was through sending the instruction that generates resource to this X11 server; Make the X11 server generate the copy of a the Resources list, thus guarantee the X11 client to the attribute of resource set will with the X11 server in consistent.
X11 client and X11 server all are the various systems that existed in said method; Realize that the inventive method does not need existing various X11 application programs and existing X11 server are done any change, thereby much more as far as possible the system of the method realization that proposes based on the present invention is used.The method that the present invention proposes only need realize the pseudo server system among Fig. 1; In system, be respectively X11 client and X11 server the interface of X11 standard code is provided, so that the function that any application program that realizes according to the X11 standard and X11 server can utilize this pseudo server to provide.
Pseudo server forwarding embodiment flow process is as shown in Figure 4 in realization of the present invention X11 server and the method that the X11 client is connected.
Step S411, pseudo server receives the instruction that the X11 client is sent, and resolving should instruction.
If for Resource Properties is provided with instruction, the resolving resource attribute is provided with instruction.
If be drawing for order, if pseudo server connects with the X11 server of the client that requires the said X11 of connection, then resolve this drawing for order, otherwise, abandon this drawing for order.
Step S412, pseudo server is handled the instruction that receives.
If instruction is provided with instruction for Resource Properties, extract the required Resource Properties of maintenance resources tabulation instruction is set, according to this Resource Properties this X11 client of instruction modification the Resources list in this pseudo server is set.
If instruction is for drawing for order, the address information (DISPLAY) that then changes in the instruction be the corresponding address of X11 server, and the ID of the ID of change window, the ID of GC, various bitmaps is the ID of the resource allocation of this X11 client for the X11 server.
Step S413 repacks instruction, sends to the X11 server that requires to connect this X11 client.
Step S421, pseudo server receive the instruction of replying of X11 server transmission, and resolving should instruction.
Resolve the variety of event that the X11 server sends, such as window maximized.
Step S422, pseudo server is revised the parameter of replying recognition purpose X11 client in the instruction.
According to analysis result, be X11 client corresponding address to the address information (DISPLAY) of replying in the instruction change instruction; The ID that changes the ID of window, the ID of GC, various bitmaps is the ID of the resource allocation of this X11 client for this pseudo server.
Step S423 will reply instruction and repack, and send to the X11 client that this X11 server requirement connects.
A specific embodiment of the inventive method is described below.
Pseudo server is opened two socket, intercepts the connection request that the X11 client sends and the connection requests that requires of X11 server transmission respectively.
For the connection request that requires of X11 server, pseudo server sends connection request to connect to this X11 server; After connecting with this X11 server, pseudo server sends to the X11 server to the client id that is connected all the X11 clients on the pseudo server, makes the X11 server therefrom select to require the X11 client that connects; If the X11 client that this moment, this X11 server requirement connected also is not activated, then this X11 server can not drawn, till the X11 of appointment client terminal start-up; If the X11 client that this X11 server requirement connects starts, then the resource of the pseudo server correspondence of in pseudo server, preserving selecteed X11 client generates a copy through sending request mode requirement X11 server; Pseudo server sends an Expose incident to the X11 client, makes the X11 client resend drawing for order; Pseudo server is transmitted to this X11 server with those drawing for orders after revising, thus the drawing for order graphing that the X11 server is sent according to pseudo server.
For the connection request of X11 client, after pseudo server is accepted to connect, for this X11 client is distributed a local ident; According to this X11 client the requirement that is provided with of resource is generated a the Resources list in this locality; The X11 server that this X11 client connects if sue for peace has been set up with pseudo server and has been connected, and then on the X11 server, also generates the resource in this Resources list a; Pseudo server is transmitted to the X11 server with the drawing for order of X11 client; If there is not the X11 server requirement to be connected with this X11 client, then pseudo server drawing for order that this X11 client is sent abandons.
Pseudo server with X11 client and X11 server set up be connected after, X11 server translation data bag between the X11 client.
Realization X11 client of the present invention is as shown in Figure 5 with the system configuration that the X11 server is connected.Said system is a pseudo server, and said pseudo server comprises: intercept module 501, set up client link block 502, set up server link block 503, forwarding module 504.
Intercept module 501, be used to intercept the connection request that the X11 client sends and the connection request that requires of X11 server end transmission.
Set up client link block 502, be used for when intercepting module 501 and listen to the connection request of X11 client, said pseudo server being connected with said X11 client as an X11 server.
Set up client link block 502 and also be used to receive the resource that said X11 client sends and generate instruction, generate the attribute that is used to write down resource is set up in instruction at said pseudo server the Resources list according to said resource; And in the X11 server that said pseudo server connects, require to send resource generation instruction with the X11 server of said X11 client connection, make said X11 server generate the copy of said the Resources list.
Set up client link block 502 and also be used for when setting up said the Resources list, be the resource allocation ID in said the Resources list, and the ID that distributes is returned to said X11 client.
Set up client link block 502 also be used for said X11 client set up connect after, be that said client is distributed client identification.
Set up server link block 503, be used for when said intercept module 501 listen to the X11 server require connection request the time, said pseudo server is connected with said X11 server as an X11 client.
Setting up server link block 503 also is used for when the X11 client that the said X11 server requirement that connects connects has started and connected with said pseudo server; Send resource to said X11 server and generate instruction, make said X11 server generate the copy of said X11 client the Resources list in said pseudo server.
Said X11 server is resource allocation ID in the said copy, and said ID is returned to said pseudo server when generating the copy of said the Resources list.
Set up server link block 503 and also be used to receive the said ID that said X11 server returns.
Setting up server link block 503 also is used for when the X11 client of said X11 server requirement connection has connected with said pseudo server, sending the expose incident to said X11 client, so that said X11 client is sent drawing for order; After receiving the drawing for order of said X11 client transmission, said drawing for order is transmitted to said X11 server.
Set up server link block 503 also be used for said X11 server set up connect after; The client identification of the X11 client that will connect with said pseudo server sends to said X11 server, so that said X11 server selects to require the X11 client that connects from the X11 client that connects with said pseudo server.
Forwarding module 504 is used between X11 client that connects and X11 server, transmitting packet.
Forwarding module 504 is further used for receiving the Resource Properties that the X11 client of connection sends instruction is set, and resolves said Resource Properties instruction is set; Extract the required Resource Properties of maintenance resources tabulation instruction is set; According to said Resource Properties the said X11 client of instruction modification the Resources list in said pseudo server is set; Said Resource Properties is provided with instruction sends to requirement, the Resource Properties of pseudo server end and the Resource Properties of X11 server end are consistent with the X11 server that said X11 client connects.
Forwarding module 504 is further used for receiving the drawing for order that the X11 client of connection is sent; If said pseudo server connects with the X11 server that require to connect said X11 client, then resolve said drawing for order, revise that address information is said X11 server corresponding address in the said drawing for order; The ID that revises resource in the said drawing for order is the ID that said X11 server is said resource allocation; Said drawing for order is sent to said X11 server, otherwise, said drawing for order abandoned.
Forwarding module 504 is further used for receiving the instruction of replying that the X11 server of connection sends; Resolve the said instruction of replying; Revise that said to reply address information in the instruction be the X11 client corresponding address that said X11 server requirement connects; Revising the said ID that replys resource in the instruction is that said pseudo server is the ID of the resource allocation of said X11 client, replys instruction and sends to said X11 client said.
Those skilled in the art can also carry out various modifications to above content under the condition that does not break away from the definite the spirit and scope of the present invention of claims.Therefore scope of the present invention is not limited in above explanation, but confirm by the scope of claims.

Claims (14)

1. realize X11 client and the method that the X11 server is connected for one kind, it is characterized in that said method comprises:
Step 1 starts pseudo server, and said pseudo server is intercepted the connection request that the X11 client sends and the connection request that requires of X11 server end transmission;
Step 2, when said pseudo server listened to the connection request of X11 client, said pseudo server connected with said X11 client as an X11 server;
Step 3, when said pseudo server listen to the X11 server require connection request the time, said pseudo server connects with said X11 server as an X11 client;
Step 4, said pseudo server is transmitted packet between X11 client that connects and X11 server;
Said step 2 also comprises,
Step 21; Said pseudo server receives the resource generation instruction that said X11 client is sent; Generate the attribute that is used to write down resource is set up in instruction at said pseudo server the Resources list according to said resource; And in the X11 server that said pseudo server connects, require to send resource generation instruction with the X11 server of said X11 client connection, make said X11 server generate the copy of said the Resources list;
Said step 3 also comprises,
Step 22; The X11 client that connects at said X11 server requirement has started and when having connected with said pseudo server; Said pseudo server sends resource to said X11 server and generates instruction, makes said X11 server generate the copy of said X11 client the Resources list in said pseudo server.
2. realization X11 client as claimed in claim 1 and the method that the X11 server is connected is characterized in that, said step 4 further does,
The Resource Properties that step 31, said pseudo server receive the X11 client transmission that connects is provided with instruction, resolves said Resource Properties instruction is set;
Step 32; Extract the required Resource Properties of maintenance resources tabulation instruction is set; According to said Resource Properties the said X11 client of instruction modification the Resources list in said pseudo server is set; Said Resource Properties is provided with instruction sends to requirement, the Resource Properties of pseudo server end and the Resource Properties of X11 server end are consistent with the X11 server that said X11 client connects.
3. realization X11 client as claimed in claim 1 and the method that the X11 server is connected is characterized in that,
Said step 21 also comprises:
Step 41, said pseudo server are the resource allocation ID in said the Resources list when setting up said the Resources list, and the ID that distributes is returned to said X11 client;
After said pseudo server has sent said resource generation instruction, also comprise in said step 21 and the step 22:
Step 42, said X11 server is resource allocation ID in the said copy, and said ID is returned to said pseudo server when generating the copy of said the Resources list;
Step 43, said pseudo server receive the said ID that said X11 server returns.
4. realization X11 client as claimed in claim 3 and the method that the X11 server is connected is characterized in that, said step 4 further does,
Step 51, said pseudo server receive the drawing for order of the X11 client transmission that connects, if said pseudo server connects with the X11 server that requires to connect said X11 client, then execution in step 52, otherwise, abandon said drawing for order;
Step 52; Resolve said drawing for order; Revise that address information is said X11 server corresponding address in the said drawing for order, the ID that revises resource in the said drawing for order is the ID that said X11 server is said resource allocation, and said drawing for order is sent to said X11 server.
5. realization X11 client as claimed in claim 3 and the method that the X11 server is connected is characterized in that, said step 4 further does,
Step 61; Said pseudo server receives the instruction of replying that the X11 server that connects sends; Resolve the said instruction of replying; Revise that said to reply address information in the instruction be the X11 client corresponding address that said X11 server requirement connects, revising the said ID that replys resource in the instruction is that said pseudo server is the ID of the resource allocation of said X11 client, with said reply to instruct send to said X11 client.
6. realization X11 client as claimed in claim 1 and the method that the X11 server is connected is characterized in that, said step 3 also comprises,
Step 71, when the X11 client of said X11 server requirement connection had connected with said pseudo server, said pseudo server sent the expose incident to said X11 client, so that said X11 client is sent drawing for order;
Step 72, said pseudo server are transmitted to said X11 server with said drawing for order after receiving the drawing for order of said X11 client transmission.
7. realization X11 client as claimed in claim 1 and the method that the X11 server is connected is characterized in that,
Said step 2 also comprises,
After step 81, said pseudo server have been set up connection with said X11 client, be that said client is distributed client identification;
Said step 3 also comprises,
Step 82; After said pseudo server has been set up connection with said X11 server; The client identification of the X11 client that will connect with said pseudo server sends to said X11 server, so that said X11 server selects to require the X11 client that connects from the X11 client that connects with said pseudo server.
8. realize X11 client and the system that the X11 server is connected for one kind, it is characterized in that said system is a pseudo server, said pseudo server comprises:
Intercept module, be used to intercept the connection request that the X11 client sends and the connection request that requires of X11 server end transmission;
Set up the client link block, be used for when intercepting module and listening to the connection request of X11 client, said pseudo server being connected with said X11 client as an X11 server when said;
Set up the server link block, be used for when said intercept module listen to the X11 server require connection request the time, said pseudo server is connected with said X11 server as an X11 client;
Forwarding module is used between X11 client that connects and X11 server, transmitting packet;
The said client link block of setting up also is used to receive the resource that said X11 client sends and generates instruction, generates the attribute that is used to write down resource is set up in instruction at said pseudo server the Resources list according to said resource; And in the X11 server that said pseudo server connects, require to send resource generation instruction with the X11 server of said X11 client connection, make said X11 server generate the copy of said the Resources list;
The said server link block of setting up also is used for when the X11 client that the said X11 server requirement that connects connects has started and connected with said pseudo server; Send resource to said X11 server and generate instruction, make said X11 server generate the copy of said X11 client the Resources list in said pseudo server.
9. realization X11 client as claimed in claim 8 and the system that the X11 server is connected is characterized in that, said forwarding module is further used for receiving the Resource Properties that the X11 client of connection sends instruction is set, and resolves said Resource Properties instruction is set; Extract the required Resource Properties of maintenance resources tabulation instruction is set; According to said Resource Properties the said X11 client of instruction modification the Resources list in said pseudo server is set; Said Resource Properties is provided with instruction sends to requirement, the Resource Properties of pseudo server end and the Resource Properties of X11 server end are consistent with the X11 server that said X11 client connects.
10. realization X11 client as claimed in claim 8 and the system that the X11 server is connected is characterized in that,
Said X11 server is resource allocation ID in the said copy, and said ID is returned to said pseudo server when generating the copy of said the Resources list;
The said server link block of setting up also is used to receive the said ID that said X11 server returns;
The said client link block of setting up also is used for when setting up said the Resources list, is the resource allocation ID in said the Resources list, and the ID that distributes is returned to said X11 client.
11. the system that realization X11 client as claimed in claim 10 is connected with the X11 server; It is characterized in that said forwarding module is further used for receiving the drawing for order that the X11 client of connection is sent, if said pseudo server connects with the X11 server that requires to connect said X11 client; Then resolve said drawing for order; Revise that address information is said X11 server corresponding address in the said drawing for order, the ID that revises resource in the said drawing for order is the ID that said X11 server is said resource allocation, and said drawing for order is sent to said X11 server; Otherwise, abandon said drawing for order.
12. the system that realization X11 client as claimed in claim 10 is connected with the X11 server; It is characterized in that; Said forwarding module is further used for receiving the instruction of replying that the X11 server of connection sends; Resolve the said instruction of replying; Revise that said to reply address information in the instruction be the X11 client corresponding address that said X11 server requirement connects, revising the said ID that replys resource in the instruction is that said pseudo server is the ID of the resource allocation of said X11 client, with said reply to instruct send to said X11 client.
13. the system that realization X11 client as claimed in claim 8 is connected with the X11 server; It is characterized in that; The said server link block of setting up also is used for when the X11 client of said X11 server requirement connection has connected with said pseudo server; Send the expose incident to said X11 client, so that said X11 client is sent drawing for order; After receiving the drawing for order of said X11 client transmission, said drawing for order is transmitted to said X11 server.
14. realization X11 client as claimed in claim 8 and the system that the X11 server is connected is characterized in that,
Said set up the client link block also be used for said X11 client set up connect after, be that said client is distributed client identification;
Said set up the server link block also be used for said X11 server set up connect after; The client identification of the X11 client that will connect with said pseudo server sends to said X11 server, so that said X11 server selects to require the X11 client that connects from the X11 client that connects with said pseudo server.
CN2009100865547A 2009-06-09 2009-06-09 Method and system for realizing connection between X11 client and X11 server Expired - Fee Related CN101582890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100865547A CN101582890B (en) 2009-06-09 2009-06-09 Method and system for realizing connection between X11 client and X11 server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100865547A CN101582890B (en) 2009-06-09 2009-06-09 Method and system for realizing connection between X11 client and X11 server

Publications (2)

Publication Number Publication Date
CN101582890A CN101582890A (en) 2009-11-18
CN101582890B true CN101582890B (en) 2012-04-18

Family

ID=41364853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100865547A Expired - Fee Related CN101582890B (en) 2009-06-09 2009-06-09 Method and system for realizing connection between X11 client and X11 server

Country Status (1)

Country Link
CN (1) CN101582890B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103138961B (en) * 2011-11-25 2015-11-25 阿里巴巴集团控股有限公司 server control method, controlled server and central control server
CN105227622B (en) * 2015-08-24 2019-01-25 北京维久云科技有限公司 Virtual machine VNC protocol accessing method and system in HyperV platform
CN107197005B (en) * 2017-05-12 2020-12-29 广州视源电子科技股份有限公司 Data transmission method and device, client, server and data transmission system
CN109426529B (en) * 2017-08-16 2023-03-21 龙芯中科技术股份有限公司 Method, device and terminal for drawing graphics based on X window system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020052126A (en) * 2000-12-23 2002-07-02 김동훈 order formula with xterminal and windows terminal server
CN1781087A (en) * 2003-04-08 2006-05-31 丛林网络公司 Method and system for providing secure access to private networks with client redirection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020052126A (en) * 2000-12-23 2002-07-02 김동훈 order formula with xterminal and windows terminal server
CN1781087A (en) * 2003-04-08 2006-05-31 丛林网络公司 Method and system for providing secure access to private networks with client redirection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘霞林,李毅.X环境下连接一致性的研究.《计算机工程与设计》.2006,第27卷(第10期),第1741-1742页. *

Also Published As

Publication number Publication date
CN101582890A (en) 2009-11-18

Similar Documents

Publication Publication Date Title
EP0628230B1 (en) System and method for multiplexing data transmissions
US7937452B2 (en) Framework for rendering plug-ins in remote access services
US11908040B2 (en) Image processing method and computer system
WO2021042840A1 (en) Data processing method and apparatus, server, and computer-readable storage medium
US11258631B2 (en) Streaming on diverse transports
US8681811B2 (en) System and method for obtaining cross compatibility with a plurality of thin-client platforms
CN101582890B (en) Method and system for realizing connection between X11 client and X11 server
US10609125B2 (en) Method and system for transmitting communication data
CN101909061A (en) Creation and application method of dynamic virtual channel based on remote display protocol
CN115292020B (en) Data processing method, device, equipment and medium
US8860740B2 (en) Method and apparatus for processing a display driver in virture desktop infrastructure
CN112905304A (en) Communication method and device between virtual machines, physical host and medium
CN113778593B (en) Cloud desktop control method and device, electronic equipment, storage medium and program product
CN110728598A (en) Computer network principle teaching system based on libpcap
CN112073488A (en) Method and device for processing request
US20190324817A1 (en) Method, apparatus, and computer program product for optimization in distributed system
US20190068478A1 (en) System and method for collecting performance and usage data from computing devices
CN114840159A (en) Rendering and screen-loading method, device, equipment and medium
CN113835816A (en) Virtual machine desktop display method, device, equipment and readable storage medium
CN108235822B (en) Virtual SIM card implementation method and device, storage medium and electronic equipment
CN106210594B (en) Synchronous display method and system
CN115190124B (en) Message transmission method and device based on distributed industrial control system, storage medium and scheduling server
CN104462220A (en) Method and device for web page screen shot and code transmission
CN113176957B (en) Remote application automation system based on RPC
CN114051047B (en) Session message backup method and device, network equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120418

Termination date: 20200609

CF01 Termination of patent right due to non-payment of annual fee