| news - about me - my system - columns - blackbox styles - projects - licenses - the curse - contact | |||
|
Installing X Windows |
|
||
|
path xlife columns 20011217 |
|||
Installing X WindowsXlife column for December 17, 2001:Summary:
1 IntroductionHere, I'm gonna describe how you can install X Windows (short "X"). X is quite important for a home computer, because if provides all kinds of cool and useful applications for both entertainment and work. There's one major difference between Microsoft Windows and X Windows. Microsoft Windows is the operating system, in other words the graphical interface is a solid part of the OS. Earlier versions of MS Windows (3.x, 9x) inherited some level of cooperation with MS-DOS, thus allowing you to switch to it as a "lesser" operating system. All later versions are fully graphical as their native state and they only emulate a DOS prompt for those who can't live without it; but in fact, MS-DOS is gone for good from these versions. X-Windows, on the other hand, is not part of the operating system. It's just an application like any other, a complex application, granted, but just that. You start it up from the command prompt when you need it, or you make it start upon Linux startup, whatever suits you. Being a free, open-source application, X-Windows benefits from quite a large variety of options. The main part, the "core" of the application, is the thing that makes it possible for Linux to go graphical. The most succesful core at present time is XFree86. Besides the core, you need something that knows how to use it; something that organizes your screen into windows, manages them, gives them a certain look, and finally, makes up the interface (keys combinations and mouse behaviour). This thing is called a window manager. 2 Which window manager?Hold on to your trousers, 'cause there's no way near a shortage of these. People choose a window manager based on tradition, level of complexity, ease of handling, what applications run on it, looks, and so on. I could give you a list of the most popular such interfaces, but it's no use. You'll need to find the one you like yourself. However, here's a starting point. Do watch it, however. Some interfaces, such as Gnome and KDE, are very good looking and extremely feature-rich, but they take their toll on computer performance. Other interfaces, such as WindowMaker, are simplistic while being faster. For my own, I've long settled on BlackBox. I've decided I don't want fancy icons, cool graphics, a big taskbar with lots of gizmos and buttons and menus and generally any such screen cluttering stuff. Actually, what I want is exactly what BlackBox gives me:
Now don't get me wrong. BlackBox can and does look pretty, just take a look here. While it doesn't allow use of actual graphics and icons, it has builtin decorations you can customize, and you can also set a desktop background image. Also, most applications from other windows managers, such as Gnome or KDE, will also work under BlackBox if installed properly. 3 Installing XI'm gonna start by first installing the core, the XFree86. For this I go to their website and find a FTP site close to me, which mirrors the full distribution. Once you find the actual distribution you'll realize there are actually several pre-compiled ones. Which one to choose? It depends on what compiler (glibc) libraries you have installed (on Red Hat 7.1 I have glibc22). You can find out by downloading just the Xinstall.sh file from any distribution and running it like this: #> sh Xinstall.sh -check It will tell you which distribution to download. Once you have it (it's a directory with files in it), copy it into /usr/src. Inside it's an installer script (Xinstall.sh) and the archives (.tgz). Run it like before, but this time without the "-check" option. It will ask you some stuff now and then, answer like this:
You've just installed X 4.1.0. In order to make sure it's all OK, do this at the command line: #> /etc/rc.d/init.d/xfs stop #> /etc/rc.d/init.d/xfs start #> tail /var/log/messages This restarts the xfs daemon (X Font Server) and then displays the last few lines from the system log. You should see something like "xfs startup succeeded". It's a way of discovering if everything went OK. 3.1 The default font 'fixed' problemThis is a problem that can arise from time to time. You get an "unreadable" error in /var/log/messages and X won't start, complaining about being unable to find the default font 'fixed'. This happened to me because (I think) I used to set a 077 mask in /etc/profile, 'causing some directories containing fonts to get too restrictive modes. It's a common problem. Check the configuration file for X (see below), find out which are the font directories and set 755 mode for dirs and 644 for files. 3.2 Installing NVidia driversI have a Geforce2 MX video card, so I need to install specific drivers for it to work best. It's good to install specific drivers if the chipset manufacturer provides them, because they will make your hardware work best. NVidia does offer Linux drivers in the form of two archives, NVIDIA_GLX-x.0-xxxx.tar.gz and NVIDIA_kernel-x.0-xxxx.tar.gz. Once you've got them, unpack them in /usr/src like this (note that the xxxx's should be replaced with actual version numbers). Please also note that NVidia at some moment began to offer self-installing drivers which you can run directly to install. #> cd /usr/src #> tar -xvzf NVIDIA_GLX-xxxx.tar.gz #> tar -xvzf NVIDIA_kernel-xxxx.tar.gz Don't think it's just a pointless showoff. NVidia's drivers provide much better performance for NVidia video cards. However, before you install the drivers you'll need to make sure you have the kernel sources installed, since the NVidia-kernel package needs them for the installation. You can check by running this: #> rpm -qa|grep kernel-source If you don't get any output, you don't have it. Put the second Red Hat 7.1 CD in the CD-ROM drive then do this: #> mount /mnt/cdrom #> rpm -ivh /mnt/cdrom/RedHat/RPMS/kernel-source-2.4.2-2.i386.rpm (It will take a bit.) After you're done you're ready to install the NVidia drivers: #> cd /usr/src/nvidia/NVIDIA_kernel-xxxx #> make install #> cd ../NVIDIA_GLX-xxxx/ #> make install You should see "NVdriver installed successfully" after the first "make install", the second will just copy some stuff into certain places. Finally, you will have to tell X to take the changes into account (the drivers are installed, they need to be used too). You do this by editing /etc/X11/XF86Config-4, which holds the X configuration. Make these changes:
OK, the NVidia drivers are now in. 3.3 The computer freeze problemCurrently, there's a problem with all available NVidia drivers. It is somehow related to AGP and Linux systems use and will cause X to run into 99% CPU use shortly after startup, effectively locking up your computer. You'll have to perform a cold reboot (i.e. push the button). The problem only appears on certain systems, and so far it's not clear which are the exact circumstances which make this happen, since it's been reported on various hardware configurations as well as several Linux distros and kernel versions. Until NVidia finally figures this out, if you are one of the few unlucky people who have this problem, here are some workarounds:
Check out the Linux NVidia users forum over at nvnews.net. People occasionaly (re)discuss this issue there. 4 Installing BlackBoxI'll need to get BlackBox as well as BBKeys (a part of BB that handles all keyboard input) and BBPager (BB specific desktop pager). (There are a few more specific BB apps, find them out for yourself.) Assuming you've got the three archives and put them in /usr/src, do this: #> cd /usr/src #> tar -xvzf *.tar.gz #> cd blackbox-0.61.1/ #> ./configure; make; make install #> cd ../bbkeys-0.8.3/ #> ./configure; make; make install #> cd ../bbpager-0.3.0/ #> ./configure; make; make install BlackBox is now installed. Now I need to tell X to use it instead of its regular window manager, and load bbkeys and bbpager as well. To do this create a file called .xinitrc in your home directory (/root), and write this in it: bbpager -w & bbkeys -i & exec blackbox 5 Start XYou start X Windows by typing "startx[ENTER]" at the command prompt. The screen will flicker, show the NVidia logo (how Microsoft-ish) then show the BlackBox desktop. 6 Some pointers about using BlackBox
< Back to the top | Read other columns | Choose what column I should write next! > |
|||
|
Xlife ©2001-2009 Zuavra. All rights reserved. You are welcome to link to this site's text pages, but you must get explicit permission before you may reproduce or quote their contents. You may not link directly to binary files, such as images or tarballs. I do keep logs, you know, and offending sites will get their links redirected to shameful error messages. |
|||