More Linux Hints

by John W Clark
Last updated 9 Sep 2001

Quick links:
My home page
Setting up Mandrake 8.0 on a Dell Inspiron 8000 (w/GeForce2Go video)
LPG Measurement Technology Home Page - My families' business, and my employer









These handy hints are provided on an as-is basis. Use entirely at own risk.

These hints were developed as a result of my climbing the linux learning curve. Most importantly, I have done basically all of my linux-learning on Linux-Mandrake systems. This hints may not be totally applicable on other distributions (or even much older Mandrake distributions).

At last writing I was using Linux-Mandrake 8.0

Acrobat Reader

Download Acrobat reader for linux from Adobe's website (www.adobe.com)
Installation of the .tar.gz file should be straightforward. Just follow instructions contained in the archive.

Making associations in Netscape 4.7x:

Edit | Preferences | Navigator | Applications
Choose "Portable Document Format" if it already exists, otherwise create a new association, according to:
Description: Portable Document Format
MIME Type: application/pdf
Suffixes: pdf
CHECK Use this MIME as the outgoing default
Application: /usr/local/Acrobat4/bin/acroread %s

AudioGalaxy AGSatellite

Download the non-static version of the .tar.gz file
The stuff you unpack, move to the desired folder underneath your home directory.
You'll need to create shares.txt file in the same directory, containing the paths of directories to share with other users (one per line)
You'll need to create account.txt file. First line contains the email address you registered with. Second line contains the password for your account.
Then just run AGSatellite. Don't expect to see any feedback about whether or not you were logged-on. The only way to test this will
be to download an MP3 from Audiogalaxy.

To run AGSatellie from a GNOME panel, like the Favourites menu, you'll need to create a script to ensure that AGSatellite is invoked from the AGSatellite directory. Here is a sample:

#!/bin/bash
cd ~/data/app/AGSatellite
./AGSatellite
 

CUPS printing to Windows shared printers suddenly stops working...

Sometimes, after the CUPS package is upgraded, printing to SMB printers no longer works.
Solution: After upgrading the CUPS package, the SMB printers settings seems to get changed, so that the login/password to the Windows machine hosting the printer is changed to "root". Use kupsdconf to change the user name back to the Windows system username and password that has access to the printer.

Another reason might be that the DNS on your LAN cannot find the Windows machine (that is sharing the printer) by it's host.domain style name. Linux uses RARP (I think) to make sure that the IP address you specify for the Windows machine matches it's host.domain style name. On my LAN I was using Winproxy to connect machines on the LAN to the internet and also as a DNS server, and I needed to add the name and IP address of the machine to the Winproxy clients list file (in the DNS settings area of Winproxy).

Downloader for X 1.26

Just download the RedHat RPM and install it. Should install fine. run command is /usr/bin/nt

Downloader for X website:  http://www.krasu.ru/soft/chuchelo

Email: Quick-and-dirty setup to allow email to be sent between linux hosts on a LAN

This is pretty easy to setup. I've had more success when I setup email clients to send mail via the SMTP service on each machine (rather than sendmail - probably because I haven't setup postfix properly yet). I've also had more luck checking my local mail using POP3 on each local machine. Once these are done and working (test by sending an email to yourself), simply add the machine names and IP mappings into the 'hosts' (or equivalent) file of your DNS server for your LAN. Then you should be able to send emails to different linux machines on the network. Obviously, each linux machine will need to be setup to be part of the same domain name (e.g. mylocalmachine.localdomainname.com)

Fetchmail - gathering mail from multiple servers to the local mailspool

Install the fetchmail and fetchmailconf packages. Fetchmailconf is a really handy way to configure fetchmail and the servers you want to retrieve from. Run fetchmailconf and specify all the settings you want.

Important settings to remember:

Below is an example of the resulting ~/.fetchmailrc file that is generated (passwords removed)
# Configuration created Tue Aug 14 21:05:53 2001 by fetchmailconf
set postmaster "usera"
set bouncemail
set no spambounce
set properties ""
set daemon 10
poll blah.com with proto POP3
       user 'blah1' there with password 'xxxxx' is 'user1' here options fetchall

poll pop.ihug.com.au with proto POP3
       user 'blah2' there with password 'xxxxx' is 'user2' here

Make sure you test this system to make sure it works, using the Test option in fetchmailconf

To setup your mail reader to read from the local mailspool: The simplest way is to just probe the local POP server at localhost. Use your linux user name and password.

Finally, you'll need to make sure fetchmail is automatically started in daemon mode when you login. For the moment I've just put it in my GNOME Startup programs list in the GNOME Control Panel. The command to call is

fetchmail -d 300
This example will cause fetchmail to check all remote servers every 300 seconds (5 mins). The "set daemon" item in ~/fetchmailrc may override this.
 

Files - locating

slocate (also mapped to locate) is an awesome search tool.  Remember that it searches for the FULL path and file name. You can use as many wildcards as you like....
    e.g. locate *doc*gimp*
Sometimes the search database needs to be updated by running updatedb.
 

KDE Tweaking

Automatically starting applications when KDE starts

Use the file manager to create links to applications in the ~/.kde/Autostart directory

Mounting shared folders located on Windows systems (SMB shares)

See smbmount and smbumount in the manual pages.
To allow normal users to mount and unmount smb shares, give SUID root privileges to smbmnt and smbumount (e.g. 'chmod u+s /usr/bin/smbmnt' and 'chmod u+s /usr/bin/smbumount')

POP3 Mail Server Troubleshooting - "Stuck" message on your POP3 server account

On the odd occasion I've found that my POP3 mail server chokes on a message. To delete the offending message, the following example shows how you can telnet to Port 110 of your mail server and do the job manually.
  1. telnet to the server, port 110
  2. type USER {username}
  3. type PASS {password}
  4. type TOP 1 0     (to check the top most item in the mail queue). The server will report the header so you can check it is the correct message)
  5. type NOOP
  6. type DELE 1 (to delete the mail item)
  7. QUIT

Prozilla

Cool multithreaded downloader for linux. Console based. Run command is /usr/bin/proz

Website:   http://prozilla.delrom.ro/

 

StarOffice  5.2

Just execute the huge StarOffice binary (it's shipped as a binary). It is installed into the user's home directory, so don't do it as root.

The installed astaroffice binary is located at ~/office52/soffice
 

Tar - Unix Tape Archiver

Common tar commands: Add -W to add post-create verification
Add -p when extracting to preserve permissions

xinetd - Internet Services Daemon

Sometimes upgrading xinetd to the latest version may override the security openings that are necessary in the xinetd.conf file. The key thing that I found was missing once was the only_allow option.

xinetd.conf contains only the default settings (global defaults). The settings for each service are in separate files under /etc/xinetd.d/

An example xinetd.conf file to allow service access to all computers on the local network are as follows:
 

#
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
        instances               = 60
        log_type                = SYSLOG authpriv
        log_on_success          = HOST PID
        log_on_failure          = HOST RECORD
}
 
 

Also, to access mail through POP3 protocol on the local host, make sure the file /etc/xinetd.d/ipop3 file contains the following
 
# default: on
# description: The POP3 service allows remote users to access their mail \
#              using an POP3 client such as Netscape Communicator, mutt, \
#        or fetchmail.
service pop3
{
 socket_type  = stream
 wait   = no
 user   = root
 server   = /usr/sbin/ipop3d
 log_on_success  += USERID
 log_on_failure  += USERID
}
 

Multiple internet connections

Install linux while connected to the local intranet and the ethernet-based networking will be set up automatically.

Setting up dial-in access through an ISP is a little more involved. But you should be able to get somewhere by:

  1. First use draknet to add a new network profile
  2. Use kppp to access the net through this new profile. Note: if the logon to the ISP is not scripted, it is usually a PAP type connection.
Still more work to do in this area
 

Reinstalling linux mandrake over the top of an existing installation

One problem I encountered when I was reinstalling LM8.0 over an existing LM8.0 installation (the root filesystem was formatted before reinstalling) is that when I was recreating the user accounts, the files in the users accounts were not owned by those users. To fix this, run UserConf (part of LinuxConf) and change the UID of the desired user to the UID assigned to the files in that users home directory. It will ask you if you want to update the owner details for each file in the users directory - choose recursively change. Everything should be OK.

Setting up Wine

No time to fill this in yet.
 

GPG Keys support and tools

Download and install gnupg and GPA (the graphical front end)
A good starting place is www.gnupg.org, but it might also be on rpmfind
 

Castlewood ORB drive

There seems to be some problem with the Castlewood ORB drive (IDE version) under linux on my desktop PC (Mandrake 7.1). I've found that using hdparm to turn off dma and LBA mode improves the problem, but doesn't create a very good transfer rate (1.5M/sec - ugh). The problem that can occur is that the system freezes every few seconds, then comes back to life continually during a data transfer. These settings seems to stop this occuring, for the most part anyway.
    hdparm -c1 -A1 -d0 -m0 /dev/hdb

I'm suspicious that newer versions of kernel IDE drivers has fixed this problem, but I haven't confirmed that yet.

Setting up sound

Sometimes all-of-a-sudden, sound won't work for a user, but works for root. This occurs usually after installing some X or sound RPM's. The problem is that the permissions of /dev/dsp and /dev/mixer (and possibly /dev/mixer1) have been changed to only allow access to root. Add permissions as follows:
chmod g+w /dev/dsp
chmod g+rw /dev/mixer
(may need to do this /dev/mixer1 as well

Configuring GNOME

Configuring hot-keys: GNOME Configuration Tool | Sawfish Window Manager | Shortcutsfs
 

XFree86 - switching from 3.3.6 to 4.1.0 and vice-versa

Go to Mandrake Control Centre | Hardware | Display
Click on Expert Mode
It will ask you which server you would like to use. Choose your desired server and proceed from there.f

XFree86 - Updating to 4.1.0

There are many advantages to upgrading LM8.0 XFree86 from 4.0.3 to 4.1.0, including major bug fixes and many usability enhancements.

Steps

XFree86 - Fixing mouse problems

Sometimes I have had problems with the mouse being incorrectly configured. Some useful tips to find the fault are below:

Other useful tools

Less commonly needed, but still useful Programming tools Games
 

Linux Mandrake 8.1 Help

I've added this section here until it gets big enough to warrant it's own page.

Setting up RGB Antialiasing for LCD screens

LCD AA looks even better than standard AA. It only looks good on most LCD screens, mind you. Don't bother trying it on normal CRT monitors 'cos it's UGLY. To set it up, add the following line to /etc/X11/XftConfig
match edit rgba=rgb
Other options in place of 'bgr' may produce better results on your LCD. Other options you can try are rgb, vbgr and vrgb. The options starting with 'v' signify vertical antialiasing. On my LCD screen (on my Dell Inspiron i8000) I observed the pixels with a magnifying glass, and found that each pixel was made up of red, green and blue sub-pixels arranged horizontally with red on the left, green in the middle and blue on the right. So I used the match edit rgba=rgb option and it gave me the best results.
 

Making applications start faster under KDE

Having too many fonts installed under xft in KDE causes program start delays. The current version of xft re-scans every font directory listed in /etc/X11/XftConfig before each application is started. To reduce program start time you can just disable Anti-Aliasing. But if you love those smooth fonts, then the first thing to do is to edit XftConfig and comment-out the lines that point to nonexistent font directories. To speed things up even more, consider removing fonts that you don't need or want to use in KDE. As for me, I use StarOffice/OpenOffice for document generation, so I have very few fonts installed in KDE - all my fonts are installed in StarOffice instead.
 

Getting the floppy drive to work

Mandrake 8.1 has a problem on some systems relating to detection and registration of the floppy drive. Mandrake produced an errata bulletin relating to this (and other) problems (find it here). In summary, the problem can be fixed by adding the "nobiospnp" kernel option at boot. Here's a brief overview of what to do if you're using the LILO bootloader:
1. As root, open up /etc/lilo.conf in your favourite text editor.
2. Find the entries in lilo.conf relating to your standard linux boot option. Mine is the standard, simply called linux. On my machine the relevant section looks like this:
image=/boot/vmlinuz
        label=linux
        root=/dev/hda5
        initrd=/boot/initrd.img
        append=" hdb=ide-scsi devfs=mount nobiospnp quiet"
        vga=788
        read-only
3. Notice where I've inserted "nobiospnp"  That's the addition that needs to be made to your lilo.conf
4. Close lilo.conf, saving the change.
5. Update the bootloader to reflect the changes made by executing the following command as root:  lilo -C /etc/lilo.conf
6. Reboot your machine and you should now be able to mount your floppy drive.
 
(end of document)