Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2004 22:06:00 -0700
From:      Danny MacMillan <flowers@users.sourceforge.net>
To:        Mark Jayson Alvarez <jay2xra@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Question regarding X windows client-server implementation
Message-ID:  <20041111050600.GA616@procyon.nekulturny.org>
In-Reply-To: <20041111041057.74056.qmail@web51609.mail.yahoo.com>
References:  <20041111041057.74056.qmail@web51609.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 10, 2004 at 09:10:57PM -0700, Mark Jayson Alvarez wrote:

[...]

>   But then I'm confused by the fact that I can let my
> x clients connect to a remote x server,(eg, on a LAN).
> 
> How can that be?
>  For example, I'm looking at my monitor right now..
> And then there is this xorg installed on another pc
> beside me. Now what I'm thinking is that the xorg
> installed on another pc, knows the specs of my monitor
> and graphics card and then I will authenticate my self
> to it remotely.. then what? the x server will manage
> my monitor and keyboard inputs remotely??? 

I'm no X expert, but this is how it seems to me:

A server is just a piece of code that does something when
another piece of code (a client) asks it to.  So your X
server, which knows all about your hardware, sits there
waiting for the X client to ask it to do something.  Like
"draw a square" or "print the letter 'X'" or "tell me
what key was just pressed".  In the case of X the client
and server can be separated by a network, in which case
these requests and corresponding response data have to
travel down the wire.  The nomenclature is a bit
confusing at first because we're used to thinking of the
client code being closest to the human and server code
as being farthest away (at least I am).

The keyboard, mouse, and video are not remote from the
X server; they're local to the X server.  The X clients
execute on the remote box, but have their I/O sent
through a network connection to the X server.  It's not
very different conceptually from connecting to a Unix
box using an SSH client from another machine.  If I SSH
in to my home machine from work and run vi, vi is running
on my home box, but the output is displayed on my work
box and the input is collected from my work box.  The
only difference is the shift in perspective needed to
mentally reverse the 'client' and 'server' roles.

-- 
Danny



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041111050600.GA616>