Mandrake Linux tips for free
Because the best things in life are free

Home Switch with success Acquisition Installation Configuration Learning to use Linux Links About Contact

Google
Search: Mandrake Linux Tips for Free WWW

Configuration of Mandrake Linux 9.1

Update! The configuration page of Mandrake 9.2 is now online.

First of all, I have to admit that this page is maybe more for me than anyone else; plenty of things I will put here are focused on how I set up my box/hardware; so that next time (if any), I will not have to figure out what I did to get things going the last time. And if you wonder why I'm thinking of installing again: simple, if Mandrake/linux is to get better, what else to do then to test the betas and release candidates and report bugs?
By the way, some of these instructions are very much related to the hardware that I´m installing this on, so I have added the spec of my system (both hardware configuration and software config files).

Recently I found out that someone else had the same idea, you may find some more info here.

Note:
commands to type have this colour and font
keystrokes/presses have this colour and font
cli = command line interface
lmb = left mouse button, mmb = middle mouse button, rmb = right mouse button


Hardware configuration steps

Note: most of the commands in this and subsequent sections are executed as root, use the command su and give your root-password when prompted to become 'root' and then execute those commands.

Update! You can follow the instructions here; NVIDIA has changed their driver management for linux, including a nice installer.

First of all, the nvidia drivers. Why have a GF4TI4200-64 if you´re not going to have any accelleration? So I went to the nvidia site www.nvidia.com, sifted throught the menus to get to the linux driver page for x86, downloaded the src.rpm for the kernel and glx, and issued the following commands (as root; most configuration stuff here is done as root):
rpmbuild --rebuild NVIDIA*
rpm -Uvh /usr/src/RPM/RPMS/i586/NVIDIA*

the first command builds the drivers, the second one installs them. If you have problems with the first, chances are you didn´t install the kernel-source package; a simple urpmi kernel-source should do in that case.
Then of course I edited the /etc/X11/XF86Config-4 file, and changed the driver "nv" into "nvidia". A restart of the X-server by logging off and ctrl-alt-backspace at the login screen did the trick to have accellerated 3D graphics. Log back on, and continu the ride! (Hey, no reboot! ;-)


To be able to have VGA resolution on my webcam, which needs a proprietary driver (see here: http://www.smcc.demon.nl/webcam/ for more info). To load the extra driver each time the webcam driver gets loaded, I did:
cat >> /etc/modules.conf
post-install pwc /sbin/insmod --force /lib/modules/2.4.21-0.13mdk/kernel/drivers/usb/pwcx-gcc32.o >/dev/null 2>&1 || :

ctrl-c

Be very careful with that first ´cat´ line, if you put only one ´>´ you will have a mostly empty file with only the lines you just put after the command... Also note that there are only two lines, the line starting with 'cat' and the line starting with 'post-install...'.


Then I added the athlon/duron patch for the KT333 chipset (see here, also for other chipsets) to reduce the temperature (this is motherboard/chipset dependent, and possibly not always stable, hence not included by default):
cat >> /etc/rc.local
# added aRTee
setpci -v -H1 -s 0:0.0 70=86
setpci -v -H1 -s 0:0.0 95=1e
ctrl-c

Again, make sure you put both of the >> and not just one. Anyway, if you just issue those setpci commands from the cli you don´t notice much other than that the system acknowledges it, but they reduce the temperature of the system under low load by 10°C in my system. BTW anything in /etc/rc.local gets executed at boot, so you can put anything there that you want your system to do when you boot it.


Since I was at it, I did: cat >> /etc/rc.local

rmmod bttv
rmmod pwcx-gcc32
rmmod pwc
modprobe pwc
modprobe bttv
ctrl-c

Maybe a bit strange, but I know from experience that sometimes, my tv-card and webcam tend to swap device number; so sometimes the webcam will be /dev/v4l/video0 and the tv-card /dev/v4l/video1 at vice versa at other times. Unfortunately the program SDLcam won´t work if the webcam isn´t /dev/v4l/video0. Fortunatly this is easily fixed, by unloading the kernel modules for the tvcard and the webcam, and subsequently loading them, but then in the right order.


Next to setup the sensor system, so I can see the temperature of the cpu and the motherboard:
sensors-detect
and just followed instructions; there are quite a few commands (modprobe ...) to do, and some stuff to add to /etc/rc.local and /etc/modules.conf just as shown above. sensors gives the output from the sensors on the motherboard if the necessary modules are loaded. Of course the program gkrellm is much nicer for continuous display of your system stats (note that on the mobo and cpu temp in gkrellm I have to use a factor of 2 to get the right value; this apparently happens with certain sensors/chipsets/mobos). BTW if you have the same motherboard and you managed to get the fanspeed readout going, please drop me a line and tell me how..


To be able to use K3B to burn copy cd's directly (actually, it is the command line program cdrecord if I am not mistaken, so this has to be done for any direct cd-to-cd copy with cdrecord as a backend), I had to setup lilo to pass the kernel option to use ide-scsi emulation also for the dvd-rom drive I have. For my cd-burner this option was used automatically by Mandrake, all I had to do is add the option for my second drive.
(Note that you can find out where your cdrw and dvd/cdrom are by checking for /var/log/dmesg for the definition of ide0 and ide1; in my case my burner is the /dev/hdc and the dvd-rom /dev/hdd, respectively master and slave of the second ide channel, the way it should be..:-)
In /etc/lilo.conf the line:
append="quiet devfs=mount hdc=ide-scsi acpi=off"
shows up in the section starting with the part: label="linux"
This I changed into:
append="quiet devfs=mount hdc=ide-scsi hdd=ide-scsi acpi=off"
and I ran the command
lilo
to make the changes get adapted into the bootloader. After rebooting (yes, this is one of the few times you have to reboot, the append line gets passed as a kernel option at boot) I could make direct cd-to-cd copies with k3b; the other thing I had to change is that in /etc/fstab I modified the line:
none /mnt/cdrom2 supermount dev=/dev/hdd,fs=auto,ro,--,iocharset=utf8,umask=0 0 0
into:
none /mnt/cdrom2 supermount dev=/dev/scd1,fs=auto,ro,--,iocharset=utf8,umask=0 0 0
(Actually I cheated, I just added that second line, since I didn't change the append line for linux-failsafe or other entries in /etc/lilo.conf..)
Also, I had to do
ln -s /dev/scd1 /dev/dvd
so my dvd-players (xine and mplayer) could find the dvd-rom. Note that I since then still prefer to copy discs by first moving the data to the harddrive... the load during a direct copy is really high, I have no clue why...


Software configuration steps

Then I added the PLF, contrib and Texstar repositories. Just hop over to http://plf.zarb.org/~nanardon/ and follow the instructions. Be careful when you copy the commands over to your console, since they are very long, and most webbrowsers move the info onto a second line, when you copy them you might have an extra space where there shouldn´t be one; you can reduce the size of the webbrowser text (in Opera, just hit the ¨-¨key to make the text size shrink) so that all commands fit onto one single line (each), and then copy them over. BTW I also got an error each first time I issued one of the commands; just entering them a second time got things to function.
Warning: depending on the repositories you decided to add, the system may have to download several megabytes of data.

To avoid warnings about missing signatures, follow these instructions for Texstar's repository, and for the PLF repository, do this (as root):
links -source http://plf.zarb.org/plf.asc | gpg --import
This way, you will not have to accept unsigned programs/binaries (which could theoretically contain trojans etc). In general, if you install just anything from just anyware on your machine, you're asking for trouble, because installing is done as root. As said, linux has no virus, backdoor, trojan etc problems today, but if people are not educated about this, that could happen sooner than some think.

So now that our repositories are known, we can get on with the installation of some nice extra software; first the stuff that is necessary to watch dvds (that Mandrake, or any other linux vendor for that matter, is not able to include, since it would violate some stupid US law):
urpmi libdvdcss2
will get the necessary decryption to have xine (you need to have installed xine-dvdnav) or mplayer playback dvds without any problems.

urpmi --noclean [packagename(s)]
is actually what I use most of the time, since then the downloaded files are in /var/cache/urpmi/rpms/
where I can easily retrieve them to use again on another computer for instance.

Some more interesting (well, to me anyway) packages/programs; if you want some of these, just issue the same command: urpmi [packagename] and please remember you can put more than 1 packagename!
urpmi --noclean mplayer-ui lm_sensors gkrellm xmms-cdread xine-ui gnomemeeting SDLcam octave X11R6-contrib imwheel kdeartwork mozilla-java2 mozilla-realplayer mozilla-flash
(Btw, if you start mplayer from the cli but you want the gui version, contrary to older versions where you would start it with mplayer -g just type gmplayer; another remark: kdeartwork which contains screensavers and the like; that one and all after that are Texstar rpms, so make sure you have added that repository to your urpmi database.)
Note to analog modem users: those files above are all together less than 100MB (don't know exactly, didn't really keep track), which at 56Kb/s will still take up to 4 hours...


I did the following to set the hostnames so that with CUPS I could print over the network (if not set, there will be a problem between the ethernet address and the name that is given during installation; other hosts will not know the host with the printer by name, just address, but the name plus printer will show up in the cups www control panel), modify /etc/hosts to include the ethernet address and the name by which the host is known to itself.
cat >> /etc/hosts
192.168.0.1 delft
192.168.0.2 neuchatel
ctrl-c

This way, the client can find the host that has the printer connected to it since it can do address translation from the host name to the right ethernet address.


To get the remote control that came with my tv-card working, I needed LIRC, so I issued the following commands, as root:
urpmi lirc lirc-remotes
cp /usr/share/lirc-remotes/hauppauge/lircd.conf.hauppauge /etc/lircd.conf
cp /usr/share/lirc-remotes/hauppauge/lircmd.conf.hauppauge /etc/lircmd.conf
vi /etc/sysconfig/lircd
(changed the following line: DRIVER=default into: DEVICE=/dev/lirc/0 )
/etc/rc.d/init.d/lircd start
chkconfig --level 35 lircd on
depmod -a
modprobe lirc_i2c lirc_dev
mkdir /dev/lirc
mknod /dev/lirc/0 c 61 0
cat >> /etc/rc.local
modprobe lirc_i2c
modprobe lirc_dev
lircd --driver=default --device=/dev/lirc/0
lircmd

ctrl-c (to get out of the input mode into that file)
Some small explanation: yes I am not a guru, I know this isn't pretty but at least it makes it work. It should normally not be necessary to add the extra stuff to the /etc/rc.local file. But anyway. Then I created (with quite a lot of trial and error) the file in my homedir ~/.lircrc that makes lirc and mplayer work together. Make sure you do switch on lirc support of mplayer. And voila. So now I can move the mouse with the remote, fully control mplayer from the sofa.


Mandrake Control Center configuration things

Once all cli items were worked through, I started the Mandrake Control Center (mcc or via the startmenu) to import the windows fonts, via System => Drakfont. BTW in the same menu you can find among other things, the DrakXServices, where you can turn off services that you don't need. This can really improve startup times, espcially if you didn't disable superfluous services during installation. Make sure you are disabling services that you really don't need.
Also, you can find and adjust many things of your Mandrake linux machine in the MCC.


KDE / graphical user interface configuration steps

Most of the following things are done by the user, in the users home directory (/home/[user]) or with gui tools.

First things first, which for me means to get usable (windows) behaviour. Meaning: not the standard behaviour that the most used OSes have, but something that you (I really) can actually work with. I want/need/require (hey it´s my machine, I can require things of it, right?) the following:

  1. window focus follows mouse (meaning, the window that the mouse pointer is on/in is the one that is active, so when I type it will go into that window)
  2. clicking in any window with the lmb, mmb or rmb does not bring the window to front (meaning, I can actually select something in a window with the lmb without the window popping to the front)
  3. move a window without having it on top
  4. move a window without having to go to the window frame with the mouse pointer
  5. resize a window without having it on top
  6. resize a window without having to go to the window frame with the mouse pointer
  7. bring a window to the front without having to go to the window frame with the mouse pointer
  8. send a window to the back without having to go to the window frame with the mouse pointer
  9. single click on icons to launch applications or descend into folders

It must be my lucky day, because all this can easily be done with KDE. Actually, points 3 to 8 are readily available already, without having to change anything in the settings. Note that point 7 is necessary since I wanted that clicking in a window does not bring it to front (which is the case in the standard less usable behaviour). 3 and 4 is done with alt+lmb, 5 and 6 with alt+rmb, 7 and 8 with alt+mmb. To get 1 and 2, start KDE control center: Menu => what to do => administer your system => configure KDE. (Alternatively there are entries for all subsections of the KDE control centre in Menu => Configuration => KDE, but we'll be doing more than just this.)
Now expand the LookNFeel section by clicking on the plus sign in front of it. Go to Window Behavior, and choose the Policy: Focus Follows Mouse; then unselect ´auto raise´ and ´click raise´. At the top, go to the second tab ´Actions´ and in the ´Inactive Inner Window´ make sure all three entries say: ¨Activate & Pass Click¨.
The lower part should have alt as the modifier key, and lmb+mod key=move, mmb+mod key= toggle raise & lower, rmb+mod key = resize. Don't forget to click apply at the bottom.
Now that we´re here, we may as well set the single click part, so that a single click on a desktop icon will do to launch whatever is being clicked. Expand (on the left side) the Peripherals section, select the ´mouse´ entry, and select ´Single-click to open files and folders´ in the Icons-section. BTW in the ´Advanced´-tab you can adjust the speed of the mouse (among other things) if it´s not to your liking.

Now that the KDE CC is open anyway, let´s expand the ´LookNFeel´ section again, and select ¨Behaviour¨. If you don´t want to have icons on your desk with /mnt/cdrom2 /mnt/cdrom /mnt/floppy written to them, you can deselect the ´Display devices on desktop´ checkbox. Hint: if you then right click on your desktop and select Create New => Link to Location (URL) you can just add a name, like: my dvdrom and a location: /mnt/cdrom2 (which is where my dvdrom gets mounted; check that in /etc/fstab).


To be able to use the extra mouse buttons that I have on my MX700 wireless optical USB mouse I did the following:
cat >> ~/.kde/Autostart/mousexmodmap
#!/bin/sh
killall /usr/bin/imwheel
xmodmap -e "pointer = 1 2 3 7 6 4 5"
imwheel -k -b "67"
ctrl-c

plus, of course the following (also as normal user, in the home-dir) to make the right .imwheelrc: cat >> ~/.imwheelrc
".*"
None, Down, Alt_L|Left
None, Up, Alt_L|Right
ctrl-c

With these settings/files the thumb buttons on the mouse are ¨back¨ and ¨forth¨ in browsers/konqueror, and the wheelbuttons function as if the wheel is continuously being scrolled resp. up or down.


To get audio out of the rear speakers with my SBLive5.1 and ALSA
Until now I had mostly been using OSS, but the general direction for linux audio seems to be ALSA. I found this tip through google, here´s the cache page

here goes what i did to get sound from all the 4 speakers on my sblive5.1 ... ( i used 4 speakers ( 2 connected to the front jack, and 2 to the rear jack ))...
alsamixergui:
mute the last culumn: sb-live analog output jack

Actually, in kmix that control actually says Sblive Analog/Digital Output Jack, but that´s not really a much better indication.
Oh and by the way, after install, the main volume control is muted. Great. How are new users supposed to find the way to switch it on?... Anyway, just do Kicker => multimedia => sound => aumix and crank up the volume.


Total configuration time

Estimated total configuration time: less than one hour. Total downloads: ~100MB give or take a few. With the installation time of about an hour (including thinking about what packages to install etc), two hours plus 100MB downloads to get a completely functional and usable system sounds pretty good to me.


Valid HTML 4.0!
Page first created: March 2003. Page last updated: Dec 1 2003

Pages tested with but not specifically made for: lynx, konqueror, galeon, Opera, Mozilla, Firefox using OpenOffice.org, Bluefish and the Gimp on Mandrakelinux by aRTee
All contents © copyright 2003 and 2004, unless mentioned otherwise, published under the GNU Free Documentation License (FDL) by aRTee. Artwork and CSS don't fall under the FDL, standard copyright applies. Tux image from Larry Ewing. You may use anything published under the FDL on this site freely, as long as you include a reference to the main address of this site: www.mandrake.tips.4.free.fr.

Site-counter Mandrake Linux Get counted! Get native linux games here! Get Firefox!