LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Is there a program called X or X11 or X Window System in my computer? (https://www.linuxquestions.org/questions/slackware-14/is-there-a-program-called-x-or-x11-or-x-window-system-in-my-computer-4175464395/)

stf92 06-01-2013 05:34 PM

Is there a program called X or X11 or X Window System in my computer?
 
Hi: I run a linux OS, slackware 14.0 to be specific, and when I run the startx command (which actually is a shell script), some piece of software must be in charge of, for example, telling the video card which resolution to use. Does it make sense to say that a certain program sets the video resolution? I assume that the video card does not remember or store the resolution. In any case, if I have just modified the video resolotion in /etc/X11/xorg.conf.d/, someone has to tell the video controller.

Timothy Miller 06-01-2013 05:56 PM

If you modify the config files, next time you restart X it will take effect. So you can either drop to a terminal and stop/start X, or if you're really lazy, just reboot.

stf92 06-01-2013 06:11 PM

Aha. But I mean: There must be a moment (I'll assume the window manager starts before the desktop environment, don't know if it's true) when the window manager (WM) starts. By this time, has the video chip been informed about things like the desired resolution? Or does this happen after the WM is launched?

Timothy Miller 06-01-2013 06:59 PM

Before WM/DE starts. Also, modern implementations of xorg can usually determine resolution supported without needing the config files, and so don't always NEED a config file to work (most of my laptops don't have config files anymore).

Horribly worded english, hopefully you understand what I was saying.

273 06-01-2013 07:16 PM

<cough> http://www.x.org/archive/X11R6.8.0/doc/Xorg.1.html

stf92 06-01-2013 07:34 PM

Quote:

Originally Posted by Timothy Miller (Post 4963735)
Before WM/DE starts. Also, modern implementations of xorg can usually determine resolution supported without needing the config files, and so don't always NEED a config file to work (most of my laptops don't have config files anymore).

Horribly worded english, hopefully you understand what I was saying.

Perfectly understandable. Yes, for example my /etc/X11/xorg.conf.d/ directory was empty after the OS installation. I put some files there to override the default behavior. For example, the Screen section mainly consisting of the resolutions. Consider there may be, and in my machine there are, several supported resolutions.

OK. If the video chip must know of any changes, then these changes are made before WM/DE starts. By the way, if I do 'ps -C X' while X is running, I do see a process by that name. ps will show it. So perhaps there is even a binary file named X.

But you have given me enough information. for now I can say that, no matter if I run KDE of Xfce4, both WM/DEs, the communication with the video controller has been done BEFORE they were launched. But then why do I observe the following difference between Xfce4 and KDE?: when hitting Ctrl-Alt-+, KDE cycles through three different screen resolutions. Instead, Xfce does so only through two resolutions. This I cannot understand. Any possible explanation?

One explanation could be that KDE changes the resolution settings in spite of the config files, or that it determines the supported resolutions indenpendently of the config files. However, we just said that the WM or DE begins running once these settings have been done. It's a pity because I would like to use Xfce instead of KDE, though one of the reasons I gave it a try was that KDE perhaps could tell me what the current resolution is, because it is more powerful. Well, thank you very much for your posts, Timothy.

ttk 06-01-2013 07:34 PM

Quote:

Originally Posted by 273 (Post 4963743)

Yes, this.

To put it in context:

/usr/bin/startx runs /usr/bin/xinit.

/usr/bin/xinit runs /usr/bin/X (unless your .xinitrc says otherwise).

On modern Slackware, /usr/bin/X is a symlink to /usr/bin/Xorg, the documentation for which 273 has linked.

Xorg invokes the video device driver which initializes and manipulates your video display hardware. You can read its log here: /var/log/Xorg.0.log

Something (usually startx) also starts your WM or DE, after Xorg has started.

The WM/DE is just another X application. It uses the same API as every other X application, telling Xorg what it needs, and Xorg manipulates your display via the display device driver.

I'm sure others will tell me what I've gotten wrong, here :-)

stf92 06-01-2013 07:44 PM

Quote:

Originally Posted by 273 (Post 4963743)

Thank you 273. BTW, my system has X11R7. Any clue as to that document date?

273 06-01-2013 07:50 PM

Quote:

Originally Posted by stf92 (Post 4963754)
Thank you 273. BTW, my system has X11R7. Any clue as to that document date?

I'll leave it as an exercise for the reader to find something more up to date. My post was more to alert you to the presence of something called X which you have been using for a while.
http://en.wikipedia.org/wiki/X_window_system

stf92 06-01-2013 07:53 PM

From what I read in ttk's post, then the WM/DE negotiates with Xorg and doesn't care a bit about what I wrote in the Xorg config files. However, it can be no other than Xorg that reads the config files, I dare say. I only see that KDE gives me three screen resolutions and Xfce only two, which does not seem logical.

Richard Cranium 06-01-2013 08:49 PM

Quote:

Originally Posted by stf92 (Post 4963750)
But then why do I observe the following difference between Xfce4 and KDE?: when hitting Ctrl-Alt-+, KDE cycles through three different screen resolutions. Instead, Xfce does so only through two resolutions. This I cannot understand. Any possible explanation?

Explanation: Your mental model of how things actually work is faulty.

Two different programs written by two different sets of people. You should be astonished that anything is similar between the two.

stf92 06-01-2013 09:06 PM

It's my mental model of how things actually should work. /usr/bin/Xorg reads the X config file and does not pay attention to my settings when Xfce is (or will be) running but it does when KDE is running? Hard to believe for then, what is the purpose of the xorg.conf man page, which says how things happen? Any way, we can make abstraction of KDE because it is Xfce that I will be running in the future. There _must_ be an explanation, mental models set aside.

rkelsen 06-02-2013 09:32 PM

Different UIs do things differently. There is no magic to it.

I think it would be fair to say that KDE is generally more "feature complete" than XFCE.

That's not meant to disparage XFCE. It is a great DE and a lot less bloated than KDE... but the problem with going for a DE with less bloat is that you get less features. ;)


All times are GMT -5. The time now is 03:29 AM.