Configuring X in Slackware
Configuring X in Slackware
Configuring X in Slackware
It is an interactive question and answer routine that you launch from the command prompt. This utility should be present in any Linux distribution, as it comes with X ree!". #nce you are familiar with it, you can run through it very quickly and if the results are less than what you desire, you can simply run it again and again until you get it right. $fterwards, you will probably want to make a few minor edits to the %etc%X&&%X !"'onfig file, depending on your needs. $s root (this can even be done in a terminal with X ree!" running, as changes don)t take effect until X is restarted*, type+ xf86config
or ,lackware &- or newer, run xorgconfig which works the very same way.
.it enter to continue, and the first question you are presented with is to select your mouse protocol.
I have a Logitech ps%/ wheel mouse, so I)m going to enter 7 for the IMPS/2 protocol.
If you already let ,lackware setup create a %dev%mouse symbolic link, you can simply hit enter to accept the default choice of /dev/mouse. 1ecall that I chose I23,/ in the examples. That will simply create a link to %dev%psaux, the ps%/ mouse device. 0ow you will be prompted to select your keyboard type.
I choose option 1 for a generic &-& key 3' keyboard. 0ext you are prompted to give a name to your keyboard layout. This isn)t really useful unless you intend to have more than one keyboard layout and switch between them.
4henever you see something like this in xf!"config you can likely 5ust hit enter to accept the default name. That)s all I generally do.
0ext, we are prompted to enter some information about our monitor. This is the tricky part of this configuration, you must look at the specsheet or product manual for your monitor, and establish acceptable values, or ranges of values for the hori6ontal and vertical frequencies (refresh rate*
7ou will want to be careful here, for it)s possible to damage your monitor. 2ost modern monitors will shut right down if you try to exceed their frequency capabilities, but don)t count on that for all monitors.
If you really don)t know, and can)t find out, then try something safe, like 8&.9 : ;!.9. If you have a really fussy monitor, you can press 11 and specify your own range, or even an exact number. or example, on one box I have a really fussy 2ag X<9--T monitor, that likes exact frequencies for the resolution used. or &-/;x="!, using !9 .6 for vertical refresh rate, the magic number is "!.= k.6 for hori6ontal frequency. 0ext, we are prompted for the vertical sync (refresh rate* of the monitor. 7ou are probably more familiar with this value.
$gain, you can specify your own range, or even an exact number. 0ote, however, that if you specify exact numbers for hori6ontal and vertical frequencies, you will probably only be able to use one resolution for your monitor. 3ersonally, I never want to change from &-/;x="! anyway. 0ow, we are prompted to specify our video card.
,ay , and choose the best match from the list. It may be listed exactly, or perhaps by some generic name. or example, >mach";> for $TI 1age 3ro based cards.
I am choosing card number 6 for my 1adeon =9--. If you want to look beyond at the subsequent pages of cards supported, make sure you take note of the number that corresponds to yours when you see it, or you will have to cycle through all of them to get back to a preceeding page. 0ow it prompts you for the amount of video memory on your card.
This number may not actually be used, depending on your card. It)s determined automatically, and the value you specify is commented out in the resulting X !"'onfig file. ?o specify it though. 0ext you will be prompted to set your display resolution.
$s it says, select the resolutions you most want to use first. 3ress 1 to set the resolution for ! bit modes (/9" colour*.
I am choosing ;8/, to get &-/;x="! but still have the other two available. 4hile running X, you can cycle through them, by pressing c!rl"al! and the " or # keys on the number pad on your keyboard. 7ou will then be presented with this question+
I would say n here, it)s quite annoying, but you can try it for yourself and see.
0ow press 2 to change the modes for &" bit and go through the same steps. 3ress $ for /; bit and when finished, press % to proceed. 0ext, you will be prompted to choose the default colour depth.
I am choosing & for /; bit colour (&" million colours*. The configuration is now complete, and you are prompted to write the X !"'onfig file.
7ou want to say here, as that is indeed where your file will be located. If you say no, you will be prompted to write it to other locations. ,ome additional information+
$t this point, if you)re not already running X, you can type s!ar!x and see if your new configuration works. If you made correct choices during the configuration, you should have a usable system. If not, run through xf!"config again, or manually correct your file. If your display doesn)t look right, and you know you)ve chosen the correct driver, consider your hori6ontal and vertical frequencies. 7our default window manager is what will load, according to the xini!rc symbolic link in %etc%X&&%xinit. If you went with the default during ,lackware setup, that symbolic link will be pointing to xinitrc.kde which will start the @ ?esktop Anvironment. ,o what about these manual edits to the X !"'onfig file (or xorg.conf in ,lackware &-*B 7ou may want to enable additional modules, like ?1I (?irect 1endering Infrastructure* and CLX for #penCL support. $lso, if you want a mouse scroll wheel to work, the mouse configuration section under Input?evice will need editing.
7ou will find the main configuration file in %etc%X&& if you went with the defaults. 0ear the top of the file, you can uncomment glx and dri if your card is supported for them. If you have an 0Didia based card, and you want this kind of stuff to work then you must install their proprietary drivers, and follow their instructions for installation and configuration steps. 'ode+
# This loads the GLX module Load "glx" # This loads the DRI module Load "dri"
?own near the bottom of the file, there)s a little subsection for ?1I permissions that you can uncomment if you wish non:root users to be able to use direct rendering (of course you do... you won)t be playing games as root* 'ode+
Section "DRI" Mode 0666 EndSection
If you have a wheel mouse, scroll to about mid way through the file, and look for the following section+
I added two lines to this section, and uncommented the >1esolution> setting. The first line I add+ 'ode+
!tion ""#xisMa!!ing" "$ %"
This tells it to map buttons ; and 9 for the scroll wheel. The second line I add+ 'ode+
!tion "&uttons"
"%"
This line tells it that your mouse has 9 buttons. The scroll wheel is considered to be three buttons. Eutton 8 is the middle click, and ; and 9 are the scrolling functionality. Fncommenting the >1esolution> setting changes the pointer speed. It 5ust so happens that a setting of >9--> is about right for my Logitech 2X9-- optical wheel mouse. 7ou can experiment with that setting, but start off conservatively or your pointer may be very erratic. I had a 2icrosoft wheel mouse once, and a setting of >!--> was what I liked for it on this system. I prefer starting the X server using the s!ar!x command. I can create an 'xini!rc file (yes, a hidden file with a dot in the filename* in my home directory, by copying one of the files from %etc%X&&%xinit and editing the >exec> line at the bottom to start the desired window manager. This overrides the defaults. It)s a simple matter of changing the exec command when you want to start another. .owever, if you are familiar with other distributions, you may want to use the graphical logon screen (session manager*. The preferred one is usually the @?A session manager, ()M. $s root, you can start this by simply typing kdm and then you)ll be able to choose your session type (window manager* from a drop list. If you want that to start automatically on boot, you must change the system)s runlevel. In ,lackware, that is runlevel % to get that behaviour. To change the default runlevel, edit the /e!c/ini!!a* file (very carefully* This is the first setting in the file (following some comments* Guote+ H ?efault runlevel. (?o not set to - or "* id+8+initdefault+ 'hange the 8 to a % so it looks like+ Guote+ id+;+initdefault+ 0ow, by default, the system first tries to start gdm which is the Cnome session manager. I don)t really like it, and it has less functionality than @?2. (for example, there)s no shutdown button* 'lick to see a screenshot of C?2 (png file in new window* If you click the ,ession button, it pops up a menu where you can choose your session type. To change this default, so the system starts @?2 on entering runlevel ;, edit the /e!c/rc'd/rc'% file.
,imply comment out the Cnome C?2 section as shown, and it will not even look for it. It will then default to @?2. 'lick to see a screenshot of @?2 (png file in new window* .opefully, X ree!" is now configured to your liking. An5oyI
H2 +o!es for Slackware 1, This procedure is pretty much exactly the same for ,lackware &-, except that the distribution has switched to the X.org fork of the X 4indowing ,ystem instead of X ree!". 7ou need to run xorgconfig instead of xf!"config. ollow the same steps $lso, instead of %etc%X&&%X !"'onfig, the configuration file is %etc%X&&%xorg.conf
H$ Slackware 1,'2 0o changes to this procedure for ,lackware &-./, 5ust run xorgconfig and follow the same steps. The only difference is that Cnome is no longer included, and you won)t have C?2 installed. The %etc%rc.d%rc.; script is still similar, however you shouldn)t need to edit it. ,tarting the system in runlevel ; will start the @?2 graphical login manager.