LPI 101-500 – 106.1: Install and configure X11
July 17, 2023

1. Debian installation without X window

In this video I want to show you how to install a debian system without a graphical user interface. You don’t have to do this on your own because it is only for one example for the display variable in the next lesson. But if you want to do it in practice then please feel free to do the same. So please go to Debian. org. And then here on the right click the download button. And then you can see here at the bottom left the download already started. So I cancel this because my download is already done here. And then switch to virtualbox. And here you already know it. Click to new. A new name. For example debian no graph. Next. I think 1GB is enough. Next. Create next. Next. I think eight gigabyte might be a little bit too large, but I’m not sure.

So I will leave it to 8gb. Create and then start. And here choose your downloaded debian file. If this file is not here in this list, please click here at Add and then you can choose it from your downloads directory. Start. And now we have possibility to do a graphical install. Or just install. Then we have advanced options with an expert install. I would recommend to use Install. And then we have such old school graphic. Choose language to be used for the installation process. It’s English. Enter location united States. Enter. Configure the keyboard key map to use. I would choose German because it is easier for me. You can choose whatever you want. Here we can choose our host name. Debian is okay.

Continue. By the way, with the key tab you can switch to Continue or to go back or to the field. Here with tap Continue. Enter. Now I have to set a root password. I will choose one and again for confirmation. Full name for the new user. I just type in manual. Create a password for this user. Select your time zone. Not important for me. I just click enter. As I said, it is just for one simple one small example. So we don’t have to do anything special here. Guided use the entire disk. Select the disk petition. Enter all files in one petition. Yes. Enter finish petitioning and write changes to disk. Yes. Enter. And now the program wants a confirmation. Write the changes to disk.

Yes. Now the base system is installing. Now the program asks if we want to scan another DVD or CD. No. Dvn archive mirror country it’s for the software mirrors. It’s not important, so I leave it to USA. Deport. I have no Http proxy, so I leave it blank. Continue. I don’t want to use it service or no. And here that is very important. Here we can choose which software we want to install. You can see here debian desktop environment is preselected with the space bar. You can unselect this. Please unselect this. There should be no installation of any desktop environment. And you can unselect the print server too. The only one that should be selected is standard system utilities.

Continue. Insert the grub loader to the master boot record. Yes. And then we should choose this device Devsta and the installation is complete. Continue. Now we can log in as root. It’s important to log in as root because in a Dabian system you cannot use pseudo with a normal user per default, you have to first install pseudo. But in this case we don’t know sudo. So just log in as root with the password and then we have to install one package. The package name should be install x eleven apps, I think yes, x Eleven apps install and the package is installed and the installation is done and I’ll see you in the next video.

2. X-Window System

The original Linux system had no graphical user interface. Even today, the Linux systems installed on company service usually do not have graphical interfaces. Graphical interfaces or desktops are now the absolute standard on normal desktop systems and of course they contribute a major part to the fact that Linux has become more and more popular for private use. However, the bare Linux system and the corresponding desktop are not one, but the graphic elements are all just placed on the Linux system. The basic program that is responsible for creating something like graphics at all is the so called x window system.

Another usage would be x or x Eleven since the current version is version eleven. The x window system is both network protocol and software that as I said, makes it possible to create and use graphical interfaces. The x window system is so called a client server model and is divided into an x server and an x client. The name x server is a bit misleading because it sounds like the x server is only for servers and the x client is only for clients. But this is not the case. The x server runs in the background on the normal desktop computer and makes its graphics available to the X clients.

The x server contains drivers for graphic cards, for keyboard or mouse, but also for other devices, for example graphics, tablets or similar. The x client is usually also located on the desktop PC but can also be installed on remote computers. It is just the program that uses the graphics on the x server for example a browser, a May program or something similar. However, the x Windows system is not responsible for the appearance of the individual Windows. Actually, this would be obvious because of the name x window system, but this was deliberately separated because one wanted to give the user the freedom to choose between various so called window managers.

But more on that later. So let’s stay with the x window system for now. For the test, it is important to know where the main configuration file is located and it was originally here at the x Eleven with capital x and xorg conf. As I said, this is the main configuration file of x or better it was the file no longer exists since Ubuntu 1110 other debian derivates no longer use this file because it is out of date. Redhead based derivatives also seem no longer seem to no longer use this file. At least I couldn’t find this file on my sentos. But the file can still be found in the API list, which is why I have addressed it here at least once. We should have looked at them once too.

There are various examples on the internet of what such a file looked like. I will show them briefly. Yeah, I found this file here. I just entered xorg conf example on Google and landed on this page here MGP lt xorg. com so here is an example file. And of course you don’t have to understand this file completely, but you should know that it exists or has existed and you should know what it contains. It is particularly important to know how the individual sections are introduced and ended. Here for example, we see here section with the name files behind it. Then we see a few options or a few passes and we also see that the section files ends with and section.

We can do this or we can see this more often in this file here section module. Then we have some options. And here again end section, here section and section and so on and yeah, I can imagine that such a question should be asked in the exam. Okay, I’ll switch back to my Linux. The biggest disadvantage of this file was that the x window configuration was completely controlled by this file. And if there was an error here, there was no longer a graphical user interface on the system. For normal desktop users without in depth Linux knowledge, the problem could hardly be solved by themselves. This is why the xorg confirectory is used today.

On debian derivates we can find this directory in user share and then x eleven x eleven and then xorg conf d for red hat derivates the directory is at c x eleven and then again Xorc conf d. Okay, let’s have a look at the content. All files in this directory are all files in this directory are read in and used. When the x server is started, we can look at a file as an example, so maybe cat ten radian conf and obviously these are just references to a specific driver. Here too, as always, we don’t have to know which files are in here because that should also differ from system to system. We also don’t need to know what exactly they are doing.

But here too we have the instruction with section and then the name section output class. We have some options here and again we have end section. A nice gimmick for the x window program is the x Win info program. This can be used to display various details about a selected window. So I just put it in with x Win info and now I’m asked to select a window.  I just click into the terminal and here we see some information. We have the x axis, the y axis, the width of the window, the height of the window, the color depths and so on. So nice gimmick that you may never need. But you should have heard it.

If the x window system produces any other errors, then these are locked in the ex session errors file. So in my case this file does not exist, which is simply due to the fact that my computer has not yet had any problems with x and accordingly no errors have been locked. This means that the file xsession errors is created and written to only if occurs or only if an error occurs. It is usually located in the home directory of the relevant user. But as I said, I don’t currently have this file. That’s why I can’t show you any content. But the content is not important for the exam either. Ultimately, it’s just a log file that records errors. But you should know what the file is called and where it is located.

3. DISPLAY, xhost, xauth

This lesson is about the Socalled display variable. We talk about what exactly the variable does. We will best discuss this with an example. We start the program x clock on our Debian system without graphical user interface. X clock is nothing more than a small graphic clock. So I enter and we see it doesn’t work. This is of course due to the fact that we did not install a graphical user interface because we installed Debian without the x Windows system. What do we do now if we want to start a program on Debian that uses a graphical user interface? Or what do we do if we want to install a program that comes with a graphical installation routine? In this case we use the Display variable.

We can tell the Display variable within Debian like don’t use our display on our host, just use a different one. In professional practice it is usually the case that Linux is installed on a server without a graphical user interface. And we mostly use Windows computers ourselves to then access the server via Puti for example. By the way, Putty is a small tool with which we can then log into the server and then use the shell of this server. So our Windows system must have a small program installed so that it can display the graphic elements of the corresponding Linux application. For example xceed or mobile xterm or X Ming or similar. In my case I would install x Ming.

So I just opened my Google here google browser or my browser with Google and then I’m searching for X Ming download and here the first site from sourceforge net x Ming x server for Windows download and here you can download this tool. I don’t click on Download because my download is already done. So I would click here on downloads and here is my X Ming setup. Just double click Next. Yes, everything is okay here. Next. And then create a desktop IRA code for x Ming and create a desktop icon for x Launch. Yes, next install. And here deactivate Launch x Ming because we have to do a little change before starting x min and then finish.

And now just double click x Launch. And this is a small configuration tool for X Ming. Here. Just select multiple windows. Next start. No client. Next. And here very important no excess control. When you forget to set this, then the next example will not work. So no access control. Next and ready. Okay, now our X Ming is started. You can see it here on the X min icon in the taskbar and then we can talk about our example here. So we want to start the x clock program in Devian and tell Dabian that our Windows system should be used as a display. So our x Ming program so we give the Display variable a corresponding value.

We do that as usual with export. So export display equals and then this is followed by the computer name of the Windows system or the IP address of the Windows system. So let’s check for the IP address with IPConfig. And here this is my IP address. Sorry. So export display and then 192-16-8178 and 27 colon zero. Why? The colon zero is always the first display of several and is almost always correct. If we now had a second display, then I could use the zero for the first display or the one for the second display. If we would have a third display, then we could use the two instead of the zero. But in my case I only have one display, so I use the zero.

You can also see it here when you just go on the X ming icon. You see here x ming server colon zero. I could write down zero, but zero is enough. Okay, and now we try to start X clock again. And we see here that the clock is now opened and it is not opened within our Linux system. You can see I can place it in my Linux system, but I can fade it out, so no problem. So in this way we can also perform graphical installations on Linux systems without a graphical user interface. So in working environments it is normal that when you have such big and expensive software software I don’t want to name special software now, but they are the most of them come in with a graphical installation routine.

And that’s the way you can start this. Okay, I would now go out of the Deviant system and switch to my Ubuntu system again. Suppose my notebook, which I am currently working on is a server with an ex server installed and different people want to use my X server. This can be prevented computer based. We use the xhost tool for this with the xhost command. Without an option we can determine what the current configuration of xhost looks like. So just xhost and we see that the access control is activated and only authorized clients can connect. I am now authorized here. So if someone from the outside wanted to use my X window system, it would not work.

With xhost, we can now also allow computers to use the server. We use the xhost command with a plus sign and the corresponding IP address. At this point I have to say that I unfortunately have no other notebooks in my network. Accordingly, I now simply use a fictitious IP address to demonstrate this. For example xhost plus 192. See here the confirmation. This IP address was added to the access control list of the external. We could remove this computer again, or this IP address again. Then we have to use the minus sign. And here also the confirmation is being removed from access control list.

We can check this again with xhost access control enabled, only authorized clients can connect. And here is only my local user. Maybe I repeat that to show you how it looks when there is an IP address. And you can see here access control is enabled. Only authorized clients can connect. And here are the authorized clients from the internet, this one and the local user. If we only use xhost with a plus, then access would be granted to every computer. So simply xhost Plus and here you can see access control. Disabled clients can connect from any host. To turn access protection back on, just use X host with a minus.

So X host minus access control enabled. Only authorized clients can connect. And you see there are still our authorized clients which we authorized, or this one, which we authorized before, and this one which is authorized per default. The last command in this lesson is the X oust command. With xhost we have controlled the access protection to the X server on the computer level and with X out, we control the access protection on the user level. For the exam we don’t need to know how the whole thing is configured and how it works exactly, because the whole thing is a construct that is not that easy to understand.

Keys have to be extracted, extracted, merged with files and so on. The only important thing for the exam is what X office all actually is, namely an X access protection at user level, which is so called magic cookie is generated and that this is saved in an authority file which is located in the home directory of the corresponding user. So the name of the file is X Authority. X Authority is the name of the file in which this magic cookie is stored, which ensures that the corresponding user may or may not use the ex server.

4. Display and window manager

We have already talked about Xclients again. To repeat, an Xclide is actually just an application program that communicates with the ex server. The X server receives data from the program, so from an ex client and then shows the output graphically on the screen. A Socalled window manager is actually nothing more than an X client. The window manager is another extra interface between a program and the X server. The window manager determines how windows and buttons look. Depending on the window manager we have a modern window design or a more classic one. Here is a small list of popular window managers. We have here. Compass, enlightenment, fluxbox, GNU, window maker, iwm kwyn, marco metacity, muffin Mutter open box xfwm and more.There are dozens more however.

And if you want to know what the windows or buttons look like with the corresponding window managers, then simply use the Google Image search. You will find various examples here. The next topic is Display Manager. What is a display manager? A display manager is actually just the login screen with which you log into your Linux system. If you have installed a graphical user interface, of course, that is why it is often called the login manager. We have here. Gnome Display Manager gdm x Display Manager XDm kde Display Manager kdm wings Display Manager wdm Light Display Manager LDM or Alexde Display Manager alex DM There are all also other display managers here, but I think that these are the most important and best known and you should know them for the exam.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!