LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2016, 05:56 AM   #1
Nitup
LQ Newbie
 
Registered: Dec 2014
Posts: 13

Rep: Reputation: Disabled
X Window System architecture and Windows Manager


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.

2. As I found X Server listens for events from mouse and keyboard only on that machine where it is installed. Is it right ? How does it reacts on event of remote client ? Or this is just handled by the client itself and send in a form of command via X Server tcp/ip protocol ?

3. What is bare minimum of software required for client machine in order to communicate to the X Server machine over the net ?

I would be grateful for any help,any good article reference would be highly appreciated.
 
Old 06-11-2016, 03:42 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 34
Posts: 3,693

Rep: Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075
I run an X server on my PC (Cygwin X). I connect to a Linux machine with SSH with X forwarding turned on. I run an X client (xterm) on the Linux machine which does not have a keyboard, mouse, or display. The xterm talks X protocol to my server to display on my PC and receive input from my keyboard and mouse. I can have more than one keyboard, mouse or display but they are all local to the X server.
 
Old 06-13-2016, 03:10 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by Nitup View Post
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.
 
Old 06-13-2016, 09:44 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 17,819
Blog Entries: 28

Rep: Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543Reputation: 5543
Code:
~$ man X
is also a good place to start.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best X-Window System window manager in your opinion? t3gah Linux - Software 9 12-16-2006 11:10 PM
No window manager in Gnome after system update tron_thomas Linux - Software 2 07-02-2006 05:26 PM
X and window manager for minimal system danimalz Debian 5 07-29-2005 02:46 AM
How Can I Find My System Architecture Information On Windows And Also On Linux pak_abdul Linux - Hardware 2 05-21-2005 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration