X Window system - concept


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers X Window system - concept
# 1  
Old 09-14-2011
X Window system - concept

Hi, I am lost in between of some concepts, googling too much made me like this! honestly...

please correct my statements below and if they are correct just mention "correct" or also add extra info please:

1. "X Window System" provides basic access to GUI on unix/linux systems
This GUI can be :
- Desktop (gnome, kde)
- Pure window manager
- basic desktop like CDE
2. Normally when we boot the system the X window system is read from some config file and the display is set and then the desktop shows up (either gnome or kde) -- we never realize the process because they are in background (process of X window start up and configuration)

where these config files are located? or one file only?

3. But when we do not have any desktop like gnome or kde. and we only have shell prompt after booting the system, its time to start the X window manually (Am I right?)

if we do not have the X server installed, we should install it? in each distro it has a different package naming?

after making sure the X window installed... (How to make sure we do have X window? let's say in redhat!)

4. then we should initialize it first by "xinit" ???? (Am I correct)
if we are running window manager we shoudl do this:

xinit -e <absolute path to WM>
5. after xinit we should start the server X by "startx" ????

6. setting the display? what is this display? i can not communicate with this word!!! nobody has explained me anything, and while googling I just grab ideas!!! I dont have a robust understanding from this display setting. then how to export it?

for the above 4,5,6 we can write them down into xinitrc file in home? and then we dont have to run them every time we boot the system? Right?

<< the window x system can only be access locally? right? I can not remote it via putty and try to run it? or set it? right? (again I have to apologize because not a good understanding)

How to stop the window manager? should I kill the process? and then kill the X window?
the process name is xinit?


what can I do to automate all these steps. when I press the button of power-on on my laptop, I want to get my X started and my window manager started as well. is that possible?

can somebody please put my words in a better shape and ordered steps, 1, 2, 3, ..then I promise this post will be a great tutorial!

thanks very much guys,
Messi
SmilieSmilie
Smilie
# 2  
Old 09-14-2011
There's a pretty good overview at Wikipedia.

The tl;dr version:
The X Window System can be seen as 3 components interacting.

First, there's the server component, whose job is to (basically) tell the graphics card what to draw on the monitor (screen), and reads keyboard and mouse input. Each computer can run multiple server instances, where each uses a distinctive display (defined by the server it belongs to, the size, resolution, color depth, and network port [more on that later]). The server is usually started by the xinit program, which in turn is usually started by the startx shell script, which does some preliminary setup.

The second part is the client, which is the application the user wants to interact with. It can, but doesn't have to, run on the same machine as the server. Window managers and desktops like Xfce, Gnome, KDE, or twm are all clients here, with the main job of providing easier access.

Last but not least is the network protocol, which is the way the client and server communicate with each other. Keyboard and mouse input received by the server is sent to the client, which acts on it (or not Smilie ), and as a result sends new drawing instructions back to the server, which then tells the graphics card what to draw. Rinse, repeat.

Modern Linux distributions mostly install the server and some client programs by default, and the server is automatically started at boot as a daemon, with the login manager (XDM, GDM, KDM, ...) as the first client, which then handles user logins, etc. Configuration files for this and other things reside in /etc/X11, or sometimes just in /etc, or some other subdirectories, which is distribution specific.

But in some cases there's no need to install and run a graphical user interface, for example with servers.

But some servers do have the libraries and programs installed that are required to communicate with a remote X11 server. For example, it's possible to install an X11 server on a Windows machine, connect to a remote machine using PuTTY and have a feature called "X11 forwardning" enabled. Here the network communication is tunneled through the SSH connection, and client programs like xeyes are displayed as if running on the Windows machine. With this feature the SSH daemon prepares the environment so that clients can easily connect to the server without any additional setup required by the user.
# 3  
Old 09-14-2011
Quote:
Originally Posted by messi777

1. "X Window System" provides basic access to GUI on unix/linux systems
This GUI can be :
- Desktop (gnome, kde)
- Pure window manager
- basic desktop like CDE
There are no fundamental difference between all of these. There is a window manager and optional clients.
Quote:
2. Normally when we boot the system the X window system is read from some config file and the display is set and then the desktop shows up (either gnome or kde) -- we never realize the process because they are in background (process of X window start up and configuration)

where these config files are located? or one file only?
Not a single file but dozens. Where they are located depends.
Quote:
3. But when we do not have any desktop like gnome or kde. and we only have shell prompt after booting the system, its time to start the X window manually (Am I right?)
It's up to you.
Quote:
if we do not have the X server installed, we should install it? in each distro it has a different package naming?
Yes, and you probably want more packages than the raw X server.
Quote:
after making sure the X window installed... (How to make sure we do have X window? let's say in redhat!)
Use your package manager.
Quote:
4. then we should initialize it first by "xinit" ???? (Am I correct)
if we are running window manager we shoudl do this:

xinit -e <absolute path to WM>
If xinit is installed and properly configured, it will launch the X server and at least a client. You can set it up to your needs in the ~/.xinirc file.
Quote:
5. after xinit we should start the server X by "startx" ????
No, xinit launch the X server, startx is a front end to xinit.
Quote:
6. setting the display? what is this display? i can not communicate with this word!!! nobody has explained me anything, and while googling I just grab ideas!!! I dont have a robust understanding from this display setting.
X11 is designed to support multiple X servers per machine, multiple screens per X server and clients connecting from remote machines. There must be a way to define where a client should display its windows and things. This is the DISPLAY variable which has the form machine:server.screen .
If you are connecting locally, without using the network, you can omit the left part (machine) or use localhost.
If only one server is running, likely your case, server is 0. If you have only one screen, likely your case too, screen can be omitted.
Quote:
then how to export it?
Code:
export DISPLAY=:0

Quote:
for the above 4,5,6 we can write them down into xinitrc file in home? and then we dont have to run them every time we boot the system? Right?
Having a custom xinitrc is unrelated to the automatic X11 startup.
Quote:
<< the window x system can only be access locally? right? I can not remote it via putty and try to run it? or set it? right? (again I have to apologize because not a good understanding)
You can access X11 remotely, set it up and run it through putty, although you wouldn't see anything graphic in your terminal emulator.
Quote:
How to stop the window manager?
That depends on how it was launched. In some cases, killing it will finish your X11 session as a consequence.
Quote:
should I kill the process? and then kill the X window?
the process name is xinit?
This isn't something you should routinely do.
Quote:
what can I do to automate all these steps. when I press the button of power-on on my laptop, I want to get my X started and my window manager started as well. is that possible?
Sure, that's the default behavior of most Linux and Unix systems.
# 4  
Old 09-15-2011
guys, thanks for updating my statements. i tried to boot to runlevel 3 and and then ran this:

Code:
xinit -e <path to window manager>

--> it did not workand gave me the beloe error:

-----------------
FATAL: Module fbcon not found
xinit: No such file or directory (errno 2): no program named "xterm" in PATH

specify the program on the command line orn make sure that /usr/bin is in your path

waiting for X server to shutdown
-----------------
i wrote it again without -e and it worked and launched my twm and mwm both but I can't get the xterm running. is it possible that xterm is not installed? I thought xterm should be part of the X window system installation? or am I wrong? then I will have to install xterm as well!
Code:
xinit <path to my window manager>

---------- Post updated at 03:36 AM ---------- Previous update was at 03:35 AM ----------

by the way i never have any file like .xinitrc or .xserverrc...strange!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Configure: error: X Window system libraries and header files are required

I am trying to compile thunar 1.8.4. It is giving me this error. configure: error: X Window system libraries and header files are required Ubuntu Mate 18.04 (2 Replies)
Discussion started by: drew77
2 Replies

2. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

3. UNIX for Beginners Questions & Answers

Which X Window system is installed on my server that would work with Xming?

I would like to use Xming to connect a server and managed to get it to work. I am now trying to get it to connect to a different server but i am not sure which X Window system is installed. I tried it through putty and i get the following error/warning: /usr/java/jdk1.7.0_67/bin> jvisualvm... (5 Replies)
Discussion started by: ziggy25
5 Replies

4. AIX

Is XVFB(X window system virtual frame buffer ) open source

I would like to know XVFB is open source or not. (0 Replies)
Discussion started by: prathap.g
0 Replies

5. UNIX for Dummies Questions & Answers

What would take the Place of X Window System if X was not installed?

If X was not installed, what would print data onto the display? Does it include applications form Gpl/Gnu or is it a daemon only? Thanks in advance!:wall: (2 Replies)
Discussion started by: theKbStockpiler
2 Replies

6. Red Hat

Maximizing X window without Window Switcher

Hi everyone! I have a strange situation. I'm running an NX remote Gnome desktop session. On the remote machine, there is a whole load of unsaved data in a window. A problem that I've been having with this NX session is that I can't load Gnome Applets, including the Window Switcher. So.. when I... (0 Replies)
Discussion started by: alexandicity
0 Replies

7. HP-UX

how to start the x window system

hi, am new to hp-ux, i just bought an hp-ux with the hp-ux 11.0 os, is very old, and i wnat to start the x window system but it send an error that said that couldn't open the x server, i try startx, xinit, and nothing, and also where i can find tutorials for hp-ux os for beginners (7 Replies)
Discussion started by: nobody
7 Replies

8. Windows & DOS: Issues & Discussions

window 2000 professional not pinging my window 98 system.

Hello, We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies

9. UNIX Desktop Questions & Answers

An X Window System from scratch

I'm currently using Gnome as my desktop environment (DE) but it's going kind of slow. My friend gave me the advice to skip the DE and only use a Window Manager. I took his suggestion one step further and decided to try building an X window system from scrath instead. But what are the... (3 Replies)
Discussion started by: J.P
3 Replies
Login or Register to Ask a Question