-   Linux - Newbie (
-   -   That 'X' thing! It's "too short to be included in an LQ Search"! (

widda 01-13-2010 06:53 AM

That 'X' thing! It's "too short to be included in an LQ Search"!
Damned elusive that's what it is.
I keep coming across "When you're working in an X environment..." etc etc.
But Wiki just drops a tautology like 'when you start x you're in x session' or something.
Does it matter, does it have a meaning? Or is it just a couple of diagonal lines that people like to throw in here and there?
I wonder if I'm having a good old X time right now by typing into linuxquestions, but I JUST DON'T KNOW. its driving me crazy I tell you.

thorkelljarl 01-13-2010 07:03 AM

It means something...

Without X you have a console.

widda 01-13-2010 10:16 AM

Console meaning 1. computer without operating system, or 2. Terminal window, like Xterm.

I read your link, but I must go back. I tried startx from the terminal and it said fatal server error, already running - I was just trying to get out of total black to dare-I-say X environment.

Also, When I read sometimes "You must restart your X-environment for these changes to take effect", does it mean restart computer?

I'll go read your link again.

widda 01-13-2010 10:27 AM

Ah, so Console is the text-mode, and THAT is CLI, which is what happens with CtrlAltF1, but the terminal emulators are little GUIs within X (which is "whole-system" GUI for Console layer beneath.
And MS Windows is almost totally X-environment.

mostlyharmless 01-13-2010 12:36 PM


And MS Windows is almost totally X-environment
Well, not really X. Windows uses a GUI (graphical user interface), but it's not X. Console means the command line where you see something like :





$myname or #root

Usually on a black screen and white letters, though green or amber letters used to be around on old cathode ray tube terminals. Xterms are emulations of old terminals that used to be command line only, though nobody seems to make amber or green xterms unless they're a total geek.

GUI generally means you're looking at icons and using a mouse and clicking, not typing your commands to run things, just typing in a word processor...

jmite 01-13-2010 08:08 PM

X, or X11, or xorg are all part of the software that allows linux to have a gui. X kind of acts as a server between the console, the window manager (which manages windows, draws them, moves them, etc.) the decorator (which makes buttons, icons, etc.) and other gui goodness.

X is to GUI as Linux is to OS. X is not ANY gui, it's the particular graphical interface used my most open source systems.

If you were to just search X, you'd get TONS!!!!! of results, most of them peopel wondring why their monitors won't work.

widda 01-14-2010 03:45 AM

wow! I do thank you for your attempted contributions to my clarification.
But it is so weird to not have a handle on apparently very basic concepts still.
What does 'restart your x environment' mean? (in terms of my actual required keyboard actions?
This is a lot like my asking a musician to define 'bar' as in '3 beats to the bar' What is bar?
Am I autistic?
I keep thinking: there is some thing I haven't grasped that will make everything clear, but I don't know the question.
O dear.
But thanks, really, for your responses. My brain may just be entirely the wrong shape to comprehend this.
But the question above about proper response to 'restart your X environment' may be important.

widda 01-14-2010 03:51 AM

Alao, second pragmatic question:
How,(by what command) after CtrlAltF1 entry to black screen, do I revert to "ordinary" windows? And which one of the 2 styles is X?

widda 01-14-2010 03:52 AM

typo: for alao read also

MTK358 01-14-2010 07:30 AM

You can correct typos by using the edit button on your post.

The Command Line Mode is just a place to enter commands (not a terminal in a GUI window, but a black screen with a command prompt on it).

Some distros boot right onto command line mode (and you have to type "startx" to enter the GUI), but most go straight to the GUI.

I actually modified my Fedora installation to boot to command line.

X is a program that runs on top of this command line. It uses "windows", which are like handles that GUI programs use and create to draw in rectangular portions of the screen. These "windows" can be nested into each other many levels deep (they have a concept of "parent windows").

X creates the root window, which is a window spanning the entire screen and is always below others. This is the window that the wallpaper is drawn on.

Windows that are children of the root window are called top-level windows. These are decorated with a frame by a program called the window manager. The window manager lets you manipulate the window with the frame. Note that the program itself is not even aware of the frame.

Pop-up menus are also top-level windows (this is the only way they can stick outside the boundaries of the program's main window), but they tell the window manager not to decorate them with a frame.

Then windows that are children of these and so on are just plain windows. Usually every single button, menu item, and other widget actually has its own window. X reports mouse events to every window, and every widget listens for events from that window to know what to do.

A Desktop Environment is an all-in-one package of a window manager, lots of programs, and libraries and resources shared among these programs.

A Widget Toolkit is a programming library that creates widget like buttons, menus, etc. using X.

Agrouf 01-14-2010 08:30 AM

What is happening on your screen is not all what is happening in the computer. Some computers have no screen. When you communicate with a web server, your computer is sending a request to another computer that has no screen. That computer is just there to respond to page request with web pages sent over the internet.
The screen is one way to communicate with the user. The OS is not aware of the screen existence. The OS is running programs that do whatever they are supposed to do. Some programs communicate with other computers, like web servers and some other programs display things on the screen. That is what the X server does. X is a rather complex program that display things on the screen. X is there taking over the screen and waiting for other programs to ask it to display things. Other programs communicate with X. This is what firefox does for instance. Firefox asks X "display a title bar, put some tabs there, and that text at that place" and X displays it on the screen. If X does not run and you launch Firefox, it will tell you "I can't talk to X".
startx launches the X server for other applications to display things. When you hit ctrl+alt+f1, you tell X to get away from the screen. ctrl+alt+f7 tells X to get back again.

X is a separate program on linux, that does not always run (it does not run on web servers for instance). On Windows, it's different. The GUI is a part of the OS. Windows can't run without a GUI.

chrism01 01-14-2010 06:23 PM

1. Console mode is when there is no X-server running: usually runlevel 3 on Linux. See /etc/inittab

2. On Linux you can access multiple 'consoles' using Ctl-Alt-F1, ... F2 etc.
You can have X running on one and all the rest will be console mode (at the same time)

3. CLI is any time you are typing to the cmd line instead of using the GUI / click-n-point

4. Technically, Linux is just the kernel; the 'proper' name for the kernel + userland tools is GNU/Linux, as most of the user tools are from the GNU project.

5. X is actually the X-server, which provides the basic facilities to create a GUI looking env eg wallpaper, windows, menus etc. Note that this means the server is always 'local' and you can have (multiple) local or remote clients eg you can display the output on another system.

6. As can be seen from the above, you can have X-Windows running regardless of whether a webserver or anything else is running....
Some old school Admins prefer to not run X-Win on prod servers.
It reduces the potential attack surface area.
It used to have a performance impact way back when, but these days systems are much more powerful, and, unless you are actually actively using the GUI, 99% of it gets dumped and only a small stub remains in memory so the kernel can respond to GUI actions next time you want to use it.

orangesky 01-14-2010 11:04 PM


Originally Posted by widda (Post 3826035)
Alao, second pragmatic question:
How,(by what command) after CtrlAltF1 entry to black screen, do I revert to "ordinary" windows? And which one of the 2 styles is X?

I only know the GNOME command.


/etc/init.d/gdm stop
Kills X and dumps you to a terminal.


/etc/init.d/gdm start
Starts X if it wasn't already.

MrCode 01-14-2010 11:17 PM


Alao, second pragmatic question:
How,(by what command) after CtrlAltF1 entry to black screen, do I revert to "ordinary" windows? And which one of the 2 styles is X?
Alt-F7 should put you back in X. When you hit Ctrl-Alt-F1, you're actually switching to the first of 7 text-mode "virtual consoles". X is simply running "on top of" the 7th console.

geek745 01-15-2010 11:03 AM

Ok, so simply, here are the layers, the most visible of which is on top:

- Window Manager (KDE/Gnome/Fluxbox/Blackbox/WindowMaker/etc)
- X Windows (this layer can be replaced by other products but X is so popular it suffices to leave it at this)
- Console
- Kernel
- Hardware

Your computer's hardware is accessed by software (including X) through the kernel (which is essentially all you need for an operating system to be linux). That software naturally includes a command line interface (CLI), which is provided by the startup processes and from which other more familiar programs are started. From the console, you can launch X Windows, which provides basic graphical capability and coordinates keyboard and mouse input with video output so you can do everything that you do. On top of X Windows, we launch a window manager, like the ones mentioned above, and within that environment (that usually contains some sort of "system toolbar") we can launch every other graphical application, including an application that provides a virtual terminal window (virtual because the kernel does not necessarily see it directly).

I hope my overview helps in your understanding - X is a (fairly) universally-used software package to enable the graphical interface on Linux/BSD/UNIX (comprehensively "*nix") systems, including providing compatibility for familiar *nix software applications on Mac OS X (their X means 10).

All times are GMT -5. The time now is 05:41 AM.