Results 1 to 5 of 5

Thread: Configuring X in Slackware3407 days old

  1. #1
    Hell's Very Own Grogan's Avatar
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    23,099
    Threads
    2409

    Awards Showcase

    Real Name
    Hugh Jorgen
    Local Date
    05-22-2013
    Local Time
    02:14 PM

    Configuring X in Slackware

    The configuration utility that I like best, is xf86config. 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 XFree86. Once 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. Afterwards, you will probably want to make a few minor edits to the /etc/X11/XF86Config file, depending on your needs.

    As root (this can even be done in a terminal with XFree86 running, as changes don't take effect until X is restarted), type:

    xf86config

    For Slackware 10 or newer, run xorgconfig which works the very same way.



    Hit enter to continue, and the first question you are presented with is to select your mouse protocol.



    I have a Logitech ps/2 wheel mouse, so I'm going to enter 7 for the IMPS/2 protocol.

    Next, we are prompted to specify a mouse device.



    If you already let Slackware setup create a /dev/mouse symbolic link, you can simply hit enter to accept the default choice of /dev/mouse. Recall that I chose IMPS2 in the examples. That will simply create a link to /dev/psaux, the ps/2 mouse device.

    Now you will be prompted to select your keyboard type.



    I choose option 1 for a generic 101 key PC keyboard.

    Next 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.



    Whenever you see something like this in xf86config you can likely just hit enter to accept the default name. That's all I generally do.

    Next, 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 horizontal and vertical frequencies (refresh rate)



    You will want to be careful here, for it's possible to damage your monitor. Most 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 31.5 - 48.5.

    If you have a really fussy monitor, you can press 11 and specify your own range, or even an exact number. For example, on one box I have a really fussy Mag XJ500T monitor, that likes exact frequencies for the resolution used. For 1024x768, using 85 Hz for vertical refresh rate, the magic number is 68.7 kHz for horizontal frequency.

    Next, we are prompted for the vertical sync (refresh rate) of the monitor. You are probably more familiar with this value.



    Again, you can specify your own range, or even an exact number.

    Note, however, that if you specify exact numbers for horizontal and vertical frequencies, you will probably only be able to use one resolution for your monitor. Personally, I never want to change from 1024x768 anyway.

    Now, we are prompted to specify our video card.



    Say y, and choose the best match from the list. It may be listed exactly, or perhaps by some generic name. For example, "mach64" for ATI Rage Pro based cards.



    I am choosing card number 6 for my Radeon 7500. 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.

    Now 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 XF86Config file. Do specify it though.

    Next you will be prompted to set your display resolution.



    As it says, select the resolutions you most want to use first. Press 1 to set the resolution for 8 bit modes (256 colour).



    I am choosing 432, to get 1024x768 but still have the other two available. While running X, you can cycle through them, by pressing ctrl+alt and the + or - keys on the number pad on your keyboard.

    You 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.

    Now press 2 to change the modes for 16 bit and go through the same steps. Press 3 for 24 bit and when finished, press 4 to proceed.

    Next, you will be prompted to choose the default colour depth.



    I am choosing 5 for 24 bit colour (16 million colours).

    The configuration is now complete, and you are prompted to write the XF86Config file.



    You want to say y 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.

    Some additional information:



    At this point, if you're not already running X, you can type startx 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 xf86config again, or manually correct your file. If your display doesn't look right, and you know you've chosen the correct driver, consider your horizontal and vertical frequencies.

    Your default window manager is what will load, according to the xinitrc symbolic link in /etc/X11/xinit. If you went with the default during Slackware setup, that symbolic link will be pointing to xinitrc.kde which will start the K Desktop Environment.

    So what about these manual edits to the XF86Config file (or xorg.conf in Slackware 10)? You may want to enable additional modules, like DRI (Direct Rendering Infrastructure) and GLX for OpenGL support. Also, if you want a mouse scroll wheel to work, the mouse configuration section under InputDevice will need editing.

    You will find the main configuration file in /etc/X11 if you went with the defaults.

    Near the top of the file, you can uncomment glx and dri if your card is supported for them. If you have an NVidia 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.

    Code:
    # This loads the GLX module
        Load       "glx"
    # This loads the DRI module
        Load       "dri"
    Down near the bottom of the file, there's a little subsection for DRI 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)

    Code:
    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 "Resolution" setting.

    The first line I add:

    Code:
    Option "ZAxisMapping"  "4 5"
    This tells it to map buttons 4 and 5 for the scroll wheel.

    The second line I add:

    Code:
    Option "Buttons"              "5"
    This line tells it that your mouse has 5 buttons. The scroll wheel is considered to be three buttons. Button 3 is the middle click, and 4 and 5 are the scrolling functionality.

    Uncommenting the "Resolution" setting changes the pointer speed. It just so happens that a setting of "500" is about right for my Logitech MX500 optical wheel mouse. You can experiment with that setting, but start off conservatively or your pointer may be very erratic. I had a Microsoft wheel mouse once, and a setting of "800" was what I liked for it on this system.

    I prefer starting the X server using the startx command. I can create an .xinitrc file (yes, a hidden file with a dot in the filename) in my home directory, by copying one of the files from /etc/X11/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.

    However, if you are familiar with other distributions, you may want to use the graphical logon screen (session manager). The preferred one is usually the KDE session manager, KDM.

    As 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 Slackware, that is runlevel 4 to get that behaviour.

    To change the default runlevel, edit the /etc/inittab file (very carefully)

    This is the first setting in the file (following some comments)

    # Default runlevel. (Do not set to 0 or 6)
    id:3:initdefault:
    Change the 3 to a 4 so it looks like:

    id:4:initdefault:
    Now, by default, the system first tries to start gdm which is the Gnome session manager. I don't really like it, and it has less functionality than KDM. (for example, there's no shutdown button)

    Click to see a screenshot of GDM (png file in new window)

    If you click the Session button, it pops up a menu where you can choose your session type.

    To change this default, so the system starts KDM on entering runlevel 4, edit the /etc/rc.d/rc.4 file.



    Simply comment out the Gnome GDM section as shown, and it will not even look for it. It will then default to KDM.

    Click to see a screenshot of KDM (png file in new window)

    Hopefully, XFree86 is now configured to your liking. Enjoy!

  2. #2
    Hell's Very Own Grogan's Avatar
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    23,099
    Threads
    2409

    Awards Showcase

    Real Name
    Hugh Jorgen
    Local Date
    05-22-2013
    Local Time
    02:14 PM

    Notes for Slackware 10

    This procedure is pretty much exactly the same for Slackware 10, except that the distribution has switched to the X.org fork of the X Windowing System instead of XFree86.

    You need to run xorgconfig instead of xf86config. Follow the same steps

    Also, instead of /etc/X11/XF86Config, the configuration file is /etc/X11/xorg.conf

  3. #3
    Hell's Very Own Grogan's Avatar
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    23,099
    Threads
    2409

    Awards Showcase

    Real Name
    Hugh Jorgen
    Local Date
    05-22-2013
    Local Time
    02:14 PM

    Slackware 10.2

    No changes to this procedure for Slackware 10.2, just run xorgconfig and follow the same steps.

    The only difference is that Gnome is no longer included, and you won't have GDM installed. The /etc/rc.d/rc.4 script is still similar, however you shouldn't need to edit it. Starting the system in runlevel 4 will start the KDM graphical login manager.

  4. #4
    In The "Man" Cave... BitBender's Avatar
    Join Date
    Aug 2001
    Location
    Dallas, Texas, United States
    Posts
    19,099
    Threads
    1404

    Awards Showcase

    Real Name
    Philip
    Local Date
    05-22-2013
    Local Time
    01:14 PM
    Fo Slackware 13, I could not find the xorgconfig command.

  5. #5
    Hell's Very Own Grogan's Avatar
    Join Date
    Sep 2002
    Location
    Ontario, Canada
    Posts
    23,099
    Threads
    2409

    Awards Showcase

    Real Name
    Hugh Jorgen
    Local Date
    05-22-2013
    Local Time
    02:14 PM

    There is no more xorgconfig. Xorg just autoconfigures now using HAL and dbus. You'll have a skeleton /etc/X11/xorg.conf

    Make sure there is one, then just install the Nvidia drivers. (make sure kernel source is installed)

    Code:
    sh NVIDIA-Linux-x86_64-190.53-pkg2.run
    You can try startx in the mean time, it'll probably just work with the shitty xorg nv driver. (It will have very poor acceleration)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •