Quote:
Originally Posted by Nitup
I have questions about X-Windows system architecture.
1. On which layer does Window Manager live. Is is above XLib and all client application communicate with X Server through Window Manager and cannot talk to the server directly or it is located aside ? And how does it really work.
|
The very basic operation is shown in
https://en.wikibooks.org/wiki/File:X...er_example.svg
All X clients use the xlib to provide the network layer access to the X server. On most systems, the X server is configured to only use a domain socket (local system only) for security (and that is a long story too).
The window manager ALSO uses Xlib for communication with the server.
Quote:
2. As I found X Server listens for events from mouse and keyboard only on that machine where it is installed. Is it right ?
|
Yes. This is because that is where the keyboard/moust (and display) hardware are connected. The X server uses the local devices for input/put.
Quote:
How does it reacts on event of remote client ?
|
Each client (remote or not), creates a connection to the X server through the domain socket or the TCP socket. Once the X server gets an event from the mouse/keyboard it looks up the current coordinate of the window with the "focus". Focus is defined to be the window that events are associated with - and that window is also associated with the socket connection from the client that opened the window. Thus events that occur get routed by the X server to the client that opened the window.
Quote:
Or this is just handled by the client itself and send in a form of command via X Server tcp/ip protocol ?
|
The client always receives the event through a message using the network protocol (and that is not always a tcp/ip connection).
Quote:
3. What is bare minimum of software required for client machine in order to communicate to the X Server machine over the net ?
|
Most client machines create their connections via ssh from the users workstation. This is because the X protocol is not secure (due to US government restrictions on the use of encryption at the time the software was developed). Ssh creates a secure TCP/IP connection to a remote system runnin sshd. Usually sshd is configured to permit sshd to forward the X protocol from a local tcp socket created by sshd. This allows any data passed over the net to be shielded.
The remote system must have the X libraries, and the X applications you want to use installed. At a MINIMUM the application xauth MUST be provided because sshd uses it to provide local authorization for any connection to the socket provided by sshd for X forwarding. Any additional utilities are optional, but usually includes a terminal emulator as well as most of the basic X tools. Additional tools (image viewers, GUI editors, ...) are extra and up to the administrator of the remote system.
Quote:
I would be grateful for any help,any good article reference would be highly appreciated.
|
You can start with
https://en.wikibooks.org/wiki/Guide_to_X11
Note: this is only a start. There are many many references for X11, specially when/if you start programming X applications.