LINUX Mandriva 2008.0

=== Archived Version. I no longer use 2008.0 ===


Compiled by: Waldis Jirgens. Latest update: 19th August, 2010.

Do you think you need Gigabytes of RAM, a 3 GHz (or higher speed) CPU, Terrabytes of HDD and have to pay big money for an Operating System to get decent performance? If so, try LINUX. My system has 256 MB of RAM, a 1.1 GHz CPU and 80 GB of HDD. You will get roughly the same performance and the OS is free.

Since I started using Linux at the turn of the millennium constant progress has been made regarding installation and configuration. This page describes the "newer" way of doing things and also some useful applications. It serves mainly as documentation for me and my friends. At the moment I am trialling 2010.1 on a separate PC. Information pertaining to this is in purple.
Note: 2010.1 cannot be installed on this PC using the Live 2010 CD, since the 2010 driver for the s3 video card does not work properly and locks up the PC after a short time. So I will either have to upgrade the video card or find a sneaky way around the s3 driver problem to install 2010.1.
Note that the usual disclaimer applies:
If you use this information here, don't blame me, should you, your data, or your PC get hurt!

Here is the link to the Amateur Radio Digital Modes under Mandriva handbook. I use Mandriva 2009-0 for Amateur Radio on my second PC.
I have a slower PC with  OpenSuse 10.3  as back-up in case this PC should fail.


Contents:
Installation
Software
Rescue System
Root Password
Hardware
Re-Formatting
Hints Some Control Tables
Partitions
Some File Locations
Upgrading via RPMS
Kernel Rebuild
Changing System Settings
Configuring Printers
Boot Parameters
Startup Processing
Window Managers
Starting Window Managers
Idesktop
Application Menu Configuration


Basic Tasks
  1. Geometry And Other Properties (=Resources) of X-Applications
  2. File Managers
  3. Editors
  4. Some Commands
  5. Compressed Stuff Uncompressing
  6. Creating Archives
  7. Deleting print jobs
  8. Basic Networking
  9. Wireless Networking
  10. LILO
  11. Boot-Messages
Applications
  1. Word Processing
  2. Encyclopedia
  3. Spreadsheets
  4. PDF Viewers
  5. PDF Writers
  6. Screen Capture
  7. TV Reception
  8. Video Capture
  9. Video Still Capture
  10. Video Players
  11. Digital Camera Pictures
  12. Image Scanning
  13. Graphics Viewers
  14. Graphics Editors
  15. Optical Character Recognition (OCR)
  16. CD and DVD Burners
  17. Sound
  18. Browsers
  19. HTML Editors
  20. Mail Clients
  21. Instant Messengers
  22. Video Conferencing
  23. Echolink
  24. Amateur Radio Digital Modes
  25. Plug-Ins
  26. FTP Programs
  27. BASIC Programming Language
  28. DOS Programs

Using Latvian Language Characters (in Latvian)
Using Latvian Language Characters (in English)
Using German Language Characters (in English)
Scripting with TCL/TK with Examples
Bugs and idiosyncrasies I came across
Useful Links
If you are looking for LINUX starter documentation, try this link (which will work if you are using konqueror or lynx; you may have trouble when using Firefox or Seamonkey):
file://localhost/usr/share/doc/mandriva/en/Drakxtools-Guide/index.html
A wealth of other documentation in various formats is in /usr/share/doc and the various subdirectories thereof.

I have installed Mandriva 2008.0 on my Athlon 1.14 GHz PC with 256 MB RAM using a triple-boot configuration and LILO as boot manager.
Installation

Software

Mandriva 2008-One
I decided to download the Mandriva 2008-ONE CD and install the live version on May 11 2008 on a newly formatted disk using ext3 file systems.

2008.0 /etc/fstab:

/dev/hda1 / ext3 relatime 1 1
/dev/hda8 /home ext3 relatime 1 2
none /proc proc defaults 0 0
/dev/hda6 /usr ext3 relatime 1 2
/dev/hda7 /var ext3 relatime 1 2
/dev/hda5 swap swap defaults 0 0
/dev/hdb8 swap swap defaults 0 0
/dev/hdb1 /media/hd vfat umask=0022,users,sync,noauto,exec 0 0
/dev/hdb5 /media/hd2 vfat umask=0022,users,sync,noauto,exec 0 0
/dev/hdb6 /media/hd3 ext2 sync,relatime 0 0
/dev/hdb7 /media/hd4 ext2 sync,relatime 0 0
/dev/hdb9 /media/hd5 ext2 sync,relatime 0 0
/dev/sda1 /media/hd6 ext3 sync,relatime 0 0

Of course the "Live CD" gives one a "bare bones" system, that needs to be fleshed out. This is done by running

mcc - The "Mandriva Linux Control Center".
There you specify the Internet sources from which you will get the rpms for an upgrade, then look what you want and install it via the net.

After some online upgrades (124 in total) with an incomplete source list I had to install manually (meaning downloading the rpms from different sources and installing them with the rpm command):
luit-1.0.3-1mdv2008.1.i586.rpm
xterm-232-1mdv2008.1.i586.rpm
libimlib2_1-filters-1.2.2-3.2mdv2007.0.i586.rpm --nodeps
libimlib2_1-loaders-1.2.2-3mdv2007.0.i586.rpm --nodeps
libimlib2_1-1.2.2-3mdv2007.0.i586.rpm --nodeps
idesk-0.7.5-1mdv2008.1.i586.rpm
libtk8.5-8.5a6-8.2mdv2008.0.i586.rpm
tcl-8.5a6-4.1mdv2008.0.i586.rpm
tk-8.5a6-8.2mdv2008.0.i586.rpm
openmotif-2.3.0-1.fc5.i386.rpm

I then re-defined the online sources and installed without hiccups:
xpdf, cups, xawtv, xsane, timidity, audacity, fr, mozplugger. However mozplugger is the old version.
Downloaded the new one mozplugger-1.10.2-1mdv2008.1.i586.rpm from the general rpm-repository and updated it.
Downloaded pmidi-1.6.0-1.i386.rpm and installed it.
Created the Alsa SB Live! environment as described later.
Downloaded Java runtime environment files and Flashplayer and installed them.
Set correct TV card environment in /etc/modprobe.conf.
Installed rxvt, aumix, C and C++ compilers, X11 development environment, cmake, make, and compiled jwm.
Installed xv-3.10a-1091.i586.rpm (Suse).
Installed RealPlayer: Got RealPlayer11GOLD.bin and executed it, putting the resulting directory to /usr/local and put the
"mozilla plugins" in the plug-in directories of seamonkey and opera.
Compiled rawrec and rawplay from source. Installed (online) ffmpeg.
Installed from the rpm repository:
cdrtools-2.01a38-77500cl.i386.rpm
cdrecord-2.01a38-77500cl.i386.rpm
cdrecord-cdda2wav-2.01.01-0.a11.2.2mdv2007.0.i586.rpm
xcdroast-0.98-37.alpha15mdk.i586.rpm
Backed up the whole system from the Mandrake 10.1 system to the big external HDD with a shell script.
Backed up the Mandrake 10.1 system in a similar way.
Changed some settings in the hardware set-up to more conservative values.
Installed from the rpm repository: lame-3.97-2.2.fc4.i386.rpm and set a symlink in /usr/lib as follows:
ln -s libmp3lame.so.0.0.0 libmp3lame.so (to give mp3 support for audacity)
Installed dpkg-1.13.11-2mdv2008.1.i586.rpm and alien-8.64-1mdv2008.0.noarch.rpm to be able to use .deb packages.
Set up vsftpd as described in the Amateur Radio Digital Modes under Mandriva handbook. and created file /etc/networks (which had inexplicably gone missing).
replaced audacity-1.3.3-1.1mdv2008.0 which often malfunctioned with the older audacity-1.3.0-14mdv2007.0.i586.rpm. This required the symlinks in /usr/lib:
ln -s libFLAC.so.8.1.0 libFLAC.so.7 and:
ln -s libFLAC++.so.6.1.0 libFLAC++.so.5 followed by:
rpm -e audacity
rpm -i audacity-1.3.0-14mdv2007.0.i586.rpm --nodeps
Installed Openoffice 3.1 by downloading the zipped RPM archive from the OpenOffice site.
/opt/openoffice.org3/program had to be added to the PATH variable in $HOME/.bash_profile.
Installed mtpaint-3.21-1.fc10 with --nodeps option, since it claimed a missing libgif.so.4, which however IS installed.
Rescue System
A stand-alone LINUX system on a CD or DVD comes in very handy! If the PC has no CD or DVD drive one can put the iso image of any live CD on a small (1 GB) USB stick:
by following the instructions here.
Once I installed a Mandrake 9.1 system on an additional PC, it locked up during detection of the network cards, and failed to create an /etc/inittab file - normally a deadly omission. To fix that:

Boot Linux from CD/DVD or USB.
Right click the wallpaper, select "Run command" and enter: xterm
In the terminal session enter: su
Then: mount /dev/hda1 /mnt/hda1
cd /mnt/hda1/etc
kwrite inittab
... and put it in manually.
After that logout from stand-alone Linux and boot the rescued system.

The first stand alone CD Linux system was Knoppix, but now Mandriva and many others can be booted direcly from a "Live CD" or a DVD. Probably the fastest and quickest to boot up is Damn Small Linux being only 50 MB on CD.
To have an "easy standby" system I installed it on hard disk partition /dev/hdb6 with the /home directory being /dev/hdb9. This was more difficult than I thought. Problems:
  1. File linux24 and a few others are NOT installed when doing a hard disk install. Remedy: Create a boot floppy and copy the files from there to the hard disk partition.
  2. /etc/fstab had to be altered, a mountpoint /home had to be specified for /dev/hdb9 and an empty directory /home created. Still DSL refused to mount /dev/hda9 when issuing the command "mount". Remedy: Disable the allocation of /home/dsl as value for the variable $HOME in /etc/init.d/dsl-config and add the command: "mount -a" in /opt/bootlocal.sh
  3. Re-create users waldis and dsl with appropriate groups.
  4. Disable the "back-up to and re-load from harddrive" routine /etc/init.d/dsl-restore.sh by inserting as first command an "exit 0"
  5. Set the run-level in /etc/inittab to 3.
  6. Change on the Mandriva system the file /etc/lilo.conf and run lilo. The DSL entry looks like this:
    image=/media/hd3/linux24
      root=/dev/hdb6
      label="DSL"
      initrd=/media/hd3/syslinux.cfg
Root Password
If you forget the root-password:
  1. At the LILO login prompt hit escape
  2. At the boot: prompt enter linux single
  3. When the system comes up enter: passwd
  4. Assign a new root-password
  5. Enter: init 3
  6. That's it!
Hardware
When I put an Ethernet card in a slot next to a high performance SVGA card, it turned out that the heat sink on this card short circuited the ethernet card! Putting it in a different slot worked wonders.
The Ethernet card is a Connectland 0702401 CR-CNL-FAST-R and the correct kernel module for it is 8139too.

Re-Formatting
When once a partition gets lots of unrecoverable I/O errors and an e2fsck can't fix the problem, reformat it as follows:
Log in as root. Then issue the command:
init 1 Then: diskdrake
This allows you to unmount a partition and re-format it. Of course the contents has to be restored afterwards.
Hints

Runlevels
Use defaultrunlevel of 3!
See line: "id:3:initdefault" in /etc/inittab. Mandriva has set the default runlevel to 5. This is unnecessarily rigid and has a few vexing and unpleasant side-effects, like slowing the system down and causing some programs to abort with "Segmentation Fault" when run by a non-privileged user. There are others too:
Rightclick on xfm application-manager icons does not work.
Nedit loops when editing /etc/X11/app-defaults/Xfm (in comparison xedit handles it without problems).

File System Check
False positives with "file system corruption"
Do not e2fsck a mounted partition, not even with e2fsck -fn ... that does not change anything there.
I once did that with /dev/hda1, the system telling me about corruption. When I subsequently checked the partition (unmounted) from my Mandrake 10.1 system on a different HDD, all was well!

USB Disks
I have a 200 GB external hard drive (which I re-formatted to utilise the ext3 file-system) and some MP3 players with USB interface.
The external drives must be mounted manually. Do this with the command: mount /dev/sda1 /mnt/removable1
Since I have installed a cheap 4 port USB hub the system sometimes does not want to know /dev/sda1. In this case have a look in /dev/sd* what it DOES know about (could be /dev/sda or /dev/sdb1 or whatever) and use that one for the mount command.

Other Disks
Note that I have 2 disks, one for LINUX with 40 GB and one for Windows XP and a small LINUX system with 41 GB. Windows has two partitions, The LINUX systems (one Mandriva, the other DSL 4.4.10) 4 each. The /dev/... addresses are NOT ascending by 1! Reason: See man fstab. If in doubt, try mounting the partitions manually, until you get the correct figure!
The command to mount a CD is: mount /dev/hdc /mnt/cdrom (no more scsi emulation for CD writer).
The command to mount a DVD or CD on the DVD drive is: mount /dev/hdd /mnt/dvd
To mount windows disk c: mount /media/hd
To mount windows disk d: mount /media/hd2

Network Stuff-ups
If the PC hangs at boot-time in the network-start section, boot it with failsafe, select "Maintenance Mode" and enter the command "init 2". This brings up the system without the network, but with the possibility to use the GUI. Find the offending script (mostly in /etc and its subdirectories) and fix it.
Configure /etc/hosts.allow and deny manually, if you want to use these lists.

If the ftp server refuses to work, configure vsftpd as follows:
/etc/vsftpd/vsftpd.conf (comments removed):
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
syslog_enable=YES
ftpd_banner="Welcome to VK1WJ FTP service."
chroot_list_file=/etc/vsftpd/chroot_list
pam_service_name=vsftpd
listen=YES

/etc/vsftpd/chroot_list contains login-ids of allowed users.
/etc/vsftpd/user_list contains login-ids of disallowed users.
/etc/vsftpd/ftpusers contains login-ids of disallowed users.
/etc/hosts.allow contains local network IP addresses.
/etc/hosts.deny is empty.
/etc/networks:
default 0.0.0.0
loopback 127.0.0.0
link-local ...local IP addr

Mouse
If you ever have the misfortune that your mouse dies and your only backup is an old serial mouse, change the relevant section of xorg.conf as follows:
Section "InputDevice"
 Identifier "Mouse1"
 Driver "mouse"
 Option "Protocol" "Microsoft"
 Option "Device" "/dev/ttyS0"
 Option "Emulate3Buttons"
 Option "Emulate3Timeout" "50"
EndSection

Backing Up Hidden Files And Directories
I have a large external HDD. Backing up a whole directory tree seemed easy using the command:
cp -Padfru /home/waldis/* /media/hd6/home/waldis
However the result was disappointing. Beyond the first level directory hidden files and directories were NOT backed up. The correct command format (which I haven't seen documented anywhere) to do this is:

cp -Padfru /home/waldis/.   /media/hd6/home/waldis

This "." wildcard character refers to the content of the currect directory as a whole without expanding subdirectories.
Partitions:
hda1: 3.8 GB - Mount Point /
hda5: 1 GB   - Swap
hda6: 4.1 GB - Mount Point /usr
hda7: 4.1 GB - Mount Point /var
hda8: 24 GB  - Mount Point /home
hdb1: 4 GB   - Windows XP 
hdb5: 15 GB  - Windows XP
hdb6: 3.8 GB   - DSL /
hdb7: 3.8 GB   - Orphaned /usr
hdb9: 3.6 GB - DSL /home

This is far from optimal, as a df shows, have to change that when next upgrading the system:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             3.9G  613M  3.1G  17% /
/dev/hda8              24G   18G  6.2G  74% /home
/dev/hdb6             3.8G  156M  3.5G   5% /media/hd3
/dev/hdb7             3.8G  1.6G  2.1G  43% /media/hd4
/dev/hdb9             3.7G  174M  3.5G   5% /media/hd5
none                  126M  940K  125M   1% /tmp
/dev/hda6             4.1G  3.0G  879M  78% /usr
/dev/hda7             4.1G  298M  3.6G   8% /var


Some File Locations: Upgrading via RPMS:
From Konqueror go to any directory containing the package you want to install and click on the desired package. It will start the software installer, ask for the root password and do it. The new application or driver is available immediately. You can of course use rpm -i rpmname, but then you have to handle dependencies manually.

Kernel 2.6 Rebuild
This seems no longer a worth-while exercise, since the new all modular kernel boots up very fast, so I didn't bother.

Changing System Setting:
You can use mcc to do this, if you don't want to do it manually.

Configuring Printers:
Done by running "printerdrake". Recently I replaced a /dev/lp0 attached old Canon BJC-255 with a USB attached Canon PIXMA iP1300. The driver for the latter can be found on the Canon website. Note that colour AND B/W cartridges must be installed, otherwise the printer does not work.

The file: /etc/printcap is no longer used.
Directory /var/spool contains configuration subdirectories /cups and /lpd. The latter is not used (all files length 0). The former contains 2 binary files.

Boot Parameters
These can be specified at the LILO boot prompt  (to which you get from the nice menu by hitting "Esc") as follows (example):
boot: linux ide0=ali14xx vga=ask
Note that parameters must be separated by spaces NOT commas!

Startup Processing
After the kernel has been loaded, the first process executed is /sbin/init. It is controlled by /ect/inittab - here a tailored and commented excerpt:
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org="">
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by Mandrakelinux are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
# 
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly. 
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6


# Single user mode
~~:S:wait:/bin/sh
This shows that the first script run is /etc/rc.d/rc.sysinit
The next script to be run depends on the default runlevel, in the above case 3.
Following the above rules /etc/rc.d/rc 3 will be executed.
This will execute the scripts in /etc/rc.d/rc3.d
As a general rule /etc/rc.d/rc N will execute /etc/rc.d/rcN.d
At the end /etc/rc.d/rc.local is executed

Window Managers:
I have installed: KDE, Openbox, Mwm, IceWm and Jwm. KDE has its own desktop. In IceWm, Jwm, Openbox and Mwm the trick is to start idesk. With idesk in place one can start applications from icons on the desktop with any of the lightweight windowmanagers thereby avoiding the overheads of KDE. It is no longer necessary to start konqueror with the command line parameter "Desktop" or to start xfm, which has its own application desktop(s).
My personal favourite is IceWm, which I use most of the time.

Starting Window Managers:
With the graphical log-in you can select whatever window manager you want from the beginning. However the graphical log-in causes all kinds of unpleasant side-effects as outlined earlier. Therefore it is better to stay with a default run-level of 3 (see /etc/inittab) and select a window-manager manually.

IceWm
Fast and simple. It is started with exec icewm
Control files in: $Home/.icewm - particularly the menu file is designed very poorly - change it asap!

Jwm
Very fast and simple. It is started with exec jwm
Control file: $Home/.jwmrc containing XML statements - a very intuitive way of doing it!
It has basically the look and feel of IceWm.

Openbox
I use the rpm: openbox-3.3.1-2mdv2008.0.
To configure Openbox first create a directory $home/.config/openbox, then copy /etc/xdg/openbox/* to that directory giving you files rc.xml and menu.xml. Then install: libopenbox16-3.4.6.1-1mdv2008.1.i586.rpm and obconf-2.0.3-1.fc7.i386.rpm. File rc.xml contains configuration statements and file menu.xml the menu items. The format is obvious. To have a taskbar you can also install tint2-0.6.0-svn69.1mdv2009.1.i586.rpm.
Openbox is started indirectly with exec openbox

Mwm
I use the rpm: openmotif-2.3.0-1.fc5.i386.rpm.
mwm is simple and very fast to start up, but needs some work before it can be used.
First copy the file: /usr/X11R6/lib/X11/system.mwmrc to $HOME/.mwmrc
There you can configure applications, menues, key-bindings etc. The format is patently obvious! It is handy to have the ability to start applications from the DefaultWindowMenu.
Mwm is started indirectly with exec mwm
When comparing mwm and openbox the latter is much more usful: It has the facility of multiple desktops, it can display a faultless task-list and has also a "show desktop" funktion to be activated by keystroke or mouse.

KDE
Is also started indirectly with the command:
exec startkde

To start IceWm, Jwm, Openbox, mwm or KDE put in $HOME an .xintrc file. Set up files.Xi, .Xj (Jwm), .Xo (Openbox), .Xm (mwm) .Xk (KDE), plus any others you might wish to try, and create scripts si, ... in /usr/X11R6/bin to overwrite .xinitrc in the user's home directory and then execute xinit. Make sure /usr/X11R6/bin is in your path - set it in $HOME/.bash_profile if necessary!

Example:
sm:
cd
cp -f .Xm .xinitrc
xinit
si etc. differ only in 1 letter from sm. Make all of the above executable, and Bob's your uncle!

The .X? files start first the desired X-applications before firing up idesk. See here for details.
You can add other commands in the .X? scripts to start up whatever you like, for instance to have a wallpaper of your choice use the wmsetbg command (belongs to theWindowMaker package). This is not necessary with idesk, which has its own Wallpaper facility.

I use most of the time IceWm or Openbox. KDE I use only to check some things out; it introduces overheads for no apparent benefit to the user.

Idesktop
The current version is fairly spartan but usable. I found the following bugs and idiosyncrasies:
Background-colour is ignored at start-up. Remedy: Use the xsetroot command.
Contrary to the documentation .xpm files can be used as icons. They are however not always displayed correctly and in the correct aspect ratio.

Application Menu Configuration
IceWm
Edit file $HOME/.icewm/menues and add or delete applications or whole menues.

Jwm
Edit file $HOME/.jwmrc and add or delete applications or whole menues.
After editing restart Jwm.

Openbox
Edit file $HOME/.config/openbox/menu.xml and add or delete applications or whole menues.
After editing "reconfigure" (built-in function) Openbox.

Mwm
Edit file $HOME/.mwmrc and add or delete applications or whole menues.
You can also define which menues are displayed at which event.
Current mwmrc file
After editing restart Mwm.

KDE
From the start button there is under the topic "Configure Panel" an item called "Menu Editor". You can use this to configure the applications.
For desktop items: Rightclick on the desktop and create a new "Link To Application".

Basic Tasks

Geometry And Other Properties (=Resources) of X-Applications
Most applications take a commandline-parameter as follows:
-geometry xwidthxywidth+xoffset+yoffset
Where the widths and offsets are measured in pixels.
Some applications use "-geometry" others "--geometry" - look at the man files!
There are many other such parameters, like background and foregroundcolours etc.
Example to use them:
xfm -bg green -fg black -appmgr -geometry 790x550+0+0 &
Geometry and other X-related application parameters can be specified in file $HOME/.Xdefaults.

Note that GTK applications have their own configuration file in $HOME/.gtkrc-2.0 which can be changed by editing it. The original one is not very appealing.
Here is a more reasonable one

File Managers:
konqueror from the KDE suite allows you lots of things to do with reasonable overhead. Configuration under the GUI is less than transparent, sometimes even confusing.

FileRunner is very fast and slick. Started with the command: fr

xfm is a very fast but "lightweight" file manager. Its configuration files are $HOME/.xfm/magic, and $HOME/.xfm/xfmrc. The former tries to identify the type of unknown files, as you can see this can be only a "best guess". The association between a file type and the application you want to handle this particular type of file with is done by the latter, which you should tailor to your own wishes.
When you have a KDE application specified in xfmrc and are not running under KDE, you will always experience a certain delay, with the Xfm output log telling you:
kbuildsycoca running...
Non-KDE applications are much faster (just check out start times of kedit and nedit)!

With this trick to simulate "Open with" xfm can be made into a quite useful program:
Create the following TCL script, call it xfapsel, and put it in one of your bin directories. An additional advantage is the possibility to execute scripts from the xfm file-window by selecting x as program-name:
#!/usr/bin/tclsh
puts "Enter program name to open file with:"
gets stdin proname
set pwd [ exec pwd ]
append pwd "/" $argv
if { $proname == "x" } {
 exec xterm -e $pwd
 exit
} 
exec $proname $pwd 
exit 
Then add the following line to $HOME/.Xdefaults:
xfm*defaultEditor: rxvt -e xfapsel
Now whenever you rightclick a file and select "Edit", you will be asked for the program to open the file with!

In .Xdefaults I also have set nedit as viewer for xfm with the line:
xfm*defaultViewer: nedit

Here is my xfmrc file - alter the entries as you see fit. Note however that xfm will always try to execute a double-clicked file, if the execute permission is set! If your file is not executable, don't set this permission!

Xfe is faster than xfm and has "open with" enabled natively, also has a much more modern "look and feel".

Pcmanfm is not stable enough; it also tries too hard with graphics files!

Editors:
Good and intuitive full screen editors:
For native (non X-Windows) LINUX: joe - this is very similar to Wordstar under DOS.
For X-Windows: xedit (the tk-based version), nedit, gedit, gxedit, cooledit, kedit.
For regular word processing: AbiWord.
There are also old line-editors: "vi" or "ed" (remember old DOS edlin? That's nearly it!) or emacs (the ultimate in cryptic and un-intuitive text-handling).
The latter editors however outperform the full-screen ones, if you want to crop large portions of a file (like one of the log-files in /var/log for instance).
For lovers of nostalgia: An SPF-PC like editor gxe is available from http://hp.vector.co.jp/authors/VA010562/

Some Commands:
General:
Help on command: .......................... man commandname
Help on all commands: ..................... xman ...only under X!

Hardware:
List PCI Cards:............................ lspci
List Devices - DMA, IRQ, I/O Ports:........ lsdev
List USB Devices:.......................... lsusb

Screen Resolution:
View available resolutions:................ xrandr -q
Set to one of these resolutions:........... xrandr -s number_from_one_of_the_above

Set Date And Time to Full Minute:
In UTC..................................... date -u MMDDhhmmYY ... Example: 2nd of March 2008 07:17....... date -u 0302071708 ... Note: You must be root to do that!

Processes:
Display Processes:......................... ps x Display ALL Processes:..................... ps ax Kill Processes:............................ kill process-id Kill Processes for sure:................... kill -9 process-id Kill Processes by name:.................... killall process-name Kill Processes by name interactive:........ killall -i process-name Files: Create Alias (symbolic link):.............. ln -s existing_directory_or_file new_name (often required to make old software, that requires old version libraries, work on newer systems). Find:...................................... find top-level-directory-to-look-in -name filename_you_are_looking_for ... Example:............................... find /home/fred -name info.db Check used and free space on file systems:. df Check used space in a directory:........... du directory-name Re-mount a filesystem read-write:.......... mount -o remount,rw /dev/... (only if you're desperate). Compare files: ............................ cmp file1 file2 Backup files: ............................. cp -uvr source_files target_files Shows what happens! Move subdirectories: ...................... mv subdirectory-name/ new_location Note the slash! Expunge all non-hidden files and subdirectries from where you are: rm -fr * Expunge a subdirectry from where you are: rm -fr directory-name Gets rid of all hidden content too. Software Environment:
Display kernel-version:.................... uname -a Display all files belonging to an rpm:..... rpm -q name_of_the_rpm --filesbypkg Display all installed rpms:................ rpm -qa Display all installed rpms containing xy:.. rpm -qa|grep xy Modules: Insert a kernel module:.................... insmod module-name [parameters] Remove a kernel module:.................... rmmod module-name List inserted kernel modules:.............. lsmod

Users and Groups:
Change attributes of a user:............... usermod [parameters] Change attributes of a group:.............. groupmod [parameters]
Compressed Stuff Uncompressing:
Don't be tempted to uncompress with the GUI and konqueror, if your archives are of a non-trivial size! The shell-commands may take only a small fraction (less than 1% sometimes) of the GUI-time! This is particularly staggering with bz2 archives! Using the suggested .xfmrc commands under xfm is OK - nearly just as fast as the line commands.
Uncompress filea.tar.z:.................... uncompress filea.tar.z...gives you filea.tar
Unzip fileb.tar.gz:........................ gzip -d fileb.tar........gives you fileb.tar
Unzip filec.bz2:........................... bzip2 -dfk filec.bz2.....gives you whatever is in the archive
Unpack filed.tar:.......................... tar -x < filed.tar
Most often used:
Unzip + uncompress filed.tgz:.............. tar -xvzf filed.tgz.....gives you whatever is in the archive
Or if you insist on a GUI: Go to konqueror and click on the archive, which presents you with "virtual" folders and files, that you can copy like the real ones.

Creating Archives:
Create archive from directories:........... tar -c directoryname_1 [dirn_2 ...] > file.tar
Create archive from files:................. tar -c dfilename_1 [filen_2 ...] > file.tar
Zip a tar file:............................ gzip -c9 file.tar > file.tar.gz
Note: The latter doesn't work on DOS file systems - gz is truncated! Use suffix .tgz instead!
Deleting print jobs:
Use the commands:
lpq -l followed by:
lprm [-Pprinter] [-] [job # ...] [user ...]
to remove a job from the print queue.
"kups" does no longer work.
To stop a job on the printer, switch off the printer and issue as root the command:
cancel -a
Then switch the printer on again, and all is well provided you haven't set "retry indefinitely" for a communications error in the printer set-up (printerdrake). Set the retry value to 1!

Basic Networking:
For simple telnet and ftp connections across a home network:
ADSL Broadband Internet:
I use a router to share an ADSL connection. Interface eth0 has to be configured in the Mandriva Linux Control Center section "Network & Internet" as follows:
  1. In Tab TCP/IP: Protocol DHCP
  2. In Tab DHCP: DHCP-client: dhclient, tick "Get DNS Servers from DHCP".
  3. In Tab Options: Tick "Network Hotplugging" and "Start at Boot".
  4. Assign a host-name yourself, otherwise you get your ISP's name.

Network troubleshooting commands:
netstat -i
shows all interfaces and what they have done

route
Shows where network traffic should be sent to.

ifconfig
Shows the configuration of all active interfaces.

Wireless Networking:
Note: I did this under 2009-One on my second PC, but it should be the same under 2008-0.
I have the D-link DWA-510 wireless network card (Linux says it's a RaLink RT2561/RT61 rev B 802.11g), which comes with a Windows installation CD. To install it go to mcc - the Mandriva Control Centre and go to "Network & Internet" then "Set up a new network interface". As driver use the Windows ndis driver in Driver/Drivers/WinXP_2K_9X/NetRt61G.INF on the installation CD. Nothing else worked!
In "Network Center" of mcc select the following:
Operating Mode: Managed
Set your ESSID (from the router)
Encryption mode: Open WEP
Encryption key: Whatever you specified at the router
Set on: Automatic IP (BOOT/DHCP)
Tick: Get DNS servers from DHCP
At the router do not specify any RTS/CTS handshaking (very slow) but list the allowed mac-addresses that you have (security).
The "route" command should give you a display like this:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
XXX.YYY.1.0     *               255.255.255.0   U     35     0        0 wlan0
link-local      *               255.255.0.0     U     35     0        0 wlan0
default         XXX-YYY-1-2.zzz 0.0.0.0         UG    35     0        0 wlan0

LILO:
If the boot record has been corrupted (may be by a Windows installation), simply do (as root of course) a "lilo" - this will rewrite the boot-record! Of course you must have a boot CD, otherwise you're in trouble!
Note that /etc/lilo.conf can be edited. Entries for LINUX start with image= whilst entries for other systems begin with other=
I have an additional Linux system on the second disk. To boot that one from the LILO menu one must specify it as follows:
image=/media/hd3/boot/vmlinuz-2.6.8.1-12mdk
	root=/dev/hdb6
	label="mdrk10"
	initrd=/media/hd3/boot/initrd.img
When issuing the lilo command to re-write the boot-record the image and the initrdr file must be available to the system!
There is an additional LILO boot sector on the second disk - just in case the first one crashes.
Here is my /etc/lilo.conf file

Boot-Messages:
They often scroll much too fast. If you are quick enough, you can try XOFF and XON to stop and restart the process.
To view the messages later, do a simple dmesg | more. More messages can be viewed by editing /var/log/messages.
View current messages

Applications
Besides official Mandriva-suitable applications I have also sourced them from some other places, like the net (some SuSe, Fedora Core, Red Hat rpms), Magazine CDs, as well as old Mandrake, SuSe and Red Hat installation CDs. Of course not every application gotten this way works - test it! Sometimes one is not aware what applications come with the distro. Check them out by going through the various menu entries!

Word Processing:
  1. OpenOffice 3.1 A bit slow but very good.
  2. AbiWord 2.5 is lightning fast and very good.
AbiWord cannot read .docx files. To read them use either OpenOffice 3.1 (Versions below 3 cannot read these files either) or download docx2txt-0.3.tgz and use the containing scripts docx2txt.pl and docx2txt.sh.

Encyclopedia:
Try gnome-dictionary if you don't want to use the online Wikipedia!

Spreadsheets
  1. OpenOffice  has a similar interface as the old Staroffice 5.2 (which does no longer work under Mandriva).
  2. Gnumeric loads .xls files correctly. It can read .csv files, and also can do a "paste values" in paste-special. All other important functions are available too, even a charting capability,
PDF Vievers
xpdf, kghostview, gv and xv are all usable.

PDF Writers
Abiword can create output in PDF format.
OpenOffice can create a more compact PDF file than Abiword.

Screen Capture
xwd is very fast and easy to use. It has an associated viewer xwud. The picture format is proprietary and can be converted with xv or gimp.
Example:
xwd -out sshot1
...then either left-click on any part of the screen or alt-tab to the window you are interested in and left-click there.
xwud -in sshot1
and:
xv sshot1
Ksnapshot is very nice, and easy to use.

TV Reception
Run the audio output of the TV card to the microfone-in plug of the soundcard! I have the PixelView TV Tuner card. The correct settings in /etc/modprobe.conf are:
options bttv tuner=2 card=37 gbuffers=4
I installed Xawtv-common-3.95-7mdv2008.0.i586.rpm and xawtv-3.95-7mdv2008.0.i586.rpm. These proved superior to the older versions 3.94, also the "missing SBS" bug and the channel numbers in the frequency table for Australia have been fixed.
Here is my new $HOME/.xawtv

Video Capture
Warning: Using the nvidia video driver in /etc/xorg.conf does NOT allow video capture (neither avi format nor stills). At the moment I use an s3 video card, which works only with the "vesa" driver, so I have no problems, except that "capture = overlay" in $HOME/.xawtv had to be replaced with "capture = grabdisplay".

General: This set-up works for my Soundblaster Live! sound card and my PixelView TV Tuner card. The aim was to get a reasonable recording that uses little disk space!
Run xawtv with parameter -noxv, watch TV or connect the video output of your camcorder, VCR, TV, or DVD player to the video card camera input socket and select "camera" as the input source. Do not change picture size after starting xawtv! Make sure you have the "record LED" next to "microfone" unmuted (Red) in "aumix". Mic level: 8, IGain level: 23, (Vol: 81). Particularly IGain is very critical for the sound quality. "Vol" is irrelevant for the recording. As the video picture is played, use hotkey "r" and select the following: Start and later stop the recording with the button: Start/Stop recording. This gives you an .avi file, which takes up around 10 MB/minute on disk (at screen resolution 384x288). You can play it back using "mplayer" (best colour) or "kaffeine". Beware - with an audio sampling rate < 48,000 mplayer does not synchronise sound and video properly. Setting switches -fpx and -srate does not help! I tried "Apple QuickTime" as movie driver without success - crashing xawtv in the process.

Video Still Capture
Run xawtv with parameter -noxv, then watch TV or connect the video output of your camcorder, VCR, TV, or DVD player to the video card camera input socket and select "camera" as the input source. As the video picture is played, use hotkey "j" or "p" to capture the xawtv window when you want a still picture.The snapshot file will be saved as snap-xxx. Edit it with gimp. Save as a jpg file with quality 0.40 for reasonable still shots from your videos.
Of course you can also take the input from a digital camera, that allows display on a TV, for instance my old Mustek VDC-100. For this one you have to set the input standard to NTSC, then you can use the camera in either video camera mode or in still picture display mode. Again use "j" or "p" to capture and save the images. Still images must be captured starting at the last picture taken, then deleting it after the capture to display the second last and so on. To eliminate the graininess due to poor resolution use gimp and "Filters", "Blur" "Gaussian Blur (RLE)" and select 1 to 5 pixels.

Video Players
I have installed: mplayer 1.01-1.rc1.20mdv2008.0 and kaffeine-0.8.5-5mdv2008.0. Both of them work fine. However since I had to replace my nvidia video card with an old S3 Trio, kaffeine is very much preferrable - it keeps video and audio in sync, whilst mplayer finishes the audio way before the video!

Digital Camera Pictures
Digikam is a nice KDE application, that allows you to download and organise pictures from a more modern digital camera, like the Kodak Easyshare CX7220. Connect the camera via USB, switch it on and allow digikam to auto-detect it.
Exception: My Samsung S630 is not autodetected and it's not on the list of supported cameras. To download pictures from the camera do the following:
  1. Connect the camera via USB cable to the USB hub.
  2. Switch the camera on and select "Computer" to connect to.
  3. As root do mount /dev/sda1 /mnt/removable1
  4. Do a cp /mnt/removable1/dcim/100k7220/* ...your picture directory...
  5. Do a cp /mnt/removable1/dcim/101sscam/* ...your picture directory...
  6. After that's finished switch off the camera, unmount /dev/sda1 and unplug the cable.

Image Scanning
The command xsane enables scanning with a gui and various options does NOT require you to be root for a USB scanner!

To make copies and print them on paper do the following:
  1. Scan the original to a file - say temp.png.
  2. Open temp.png in gimp.
  3. Righ-click the image and select "File" "Print".
  4. Select correct printer, paper size, and scale the picture to size, then use "Center Both" to put it in the middle of the paper. Do this recursively until you are happy with the look.
  5. Print it!
Instead of gimp you can also use OpenOffice. Adjust the image size to fit on one page. A4 - the most common paper-size - is 8.267 x 11.6 inches = 21 x 29.5 cm.

Graphics Viewers
gqview allows you to view all graphics files in a directory. You can do this using various zoom factors and also have the program fit the picture to the screen. Running a slide show is possible too.

Kuickshow is similar to gqview, allowing you to flip through a directory of pictures. It has also a limited editing capability.

Kview is very similar to Kuickshow.

xv - a graphics editor - can be used as a quick viewer for image files.

display - another graphics editor - can be used as a quick viewer for image files too.

Graphics Editors
Gimp is very powerful, and takes quite a bit of adjusting to - the "emacs" of graphics editors. One undocumented (at least I couldn't find it) feature:
To draw a straight line activate any painting/drawing tool, klick into the image where you want the line's starting point to be, press the [Shift] key, klick where you want the line's endpoint to be (... [Shift] uses the last drawn point as starting point).

xpaint is quite user-friendly. It saves black and white (lineart) .gif pictures much more efficiently than gimp!

xv is even more user-friendly than xpaint but less powerful.

mtpaint is not bad either, so to speak a lightweigt version of gimp.

Optical Character Recognition (OCR)
Firstly I used ocrad that needs the file to be in "raw" pgm format. The results so far were pretty poor. Here is and example how to do it:
gimp ticket.jpg
... save the image as ticket.pgm in Raw format.
ocrad ticket.pgm > ticket.txt

Then there is gocr, which besides being a stand-alone command is also accessible through the scanner application sane. It seems to be a bit better than ocrad.

CD and DVD Burners
k3b
Very nice to copy CDs. Cannot copy video CDs. Can copy DVDs and blank DVD-RWs as well as DVD+RWs. Select this function from the "Tools" menu! I have not tested it for other functions yet but read glowing reviews about it.

Xcdroast
You can write CDs being a normal user, provided you have enabled this facility as "root" first.

To read selected audio tracks from your CD use xcdroast submenus "Create CD" and "Read Tracks". Otherwise you are forced to read the whole lot of the audio CD. Note that these tracks are wave files, which you can convert into any format that you require using the sox utility (see below).

For a data backup use the "Master Tracks" function, go to file/directory view, select what you want to be backed up, then "calculate size", and "Master and write on-the-fly".

To erase a CD R/W go to "Duplicate CD" - "Write CD" - "Blank CD-R/W". Burning DVDs with XCDRoast has been sometimes unreliable on my DVD burner. Also xcdroast cannot blank DVD+RWs. The reason is probably the difference in standards between DVD+RW and DVD-RW: "DVD+RW supports random write access, which means that data can be added and removed without erasing the whole disk and starting over. This means that DVD+RWs can almost be treated like removable hard disks. Conversely, DVD-RW is more like CD-RW: to change data, one must erase the whole disk and start over again" (Wikipedia). I suspect that xcdroast cannot handle DVD+RWs.

Sound
Linux has plenty to offer when it comes to sound - creating, recording, editing, burning, you name it, it's all there!

Creating Audio CDs
Compose a piece of music using a midi sequencer like Rosegarden (see below). This gives you a .mid file. There are also plenty of free midi files available on the net. All these files do not sound very appealing when played with the commands
playmidi or playmidi -4 on a Soundblaster or similar card. However the timidity synthesiser is of a far better quality! Be however prepared to update the instrument-patch configuration file (here in /etc/timidity/gravis/gravis.cfg) to substitute missing instruments, add missing instrument banks and/or drumsets, so that everything in the midi-file is reproduced in audio! There is a configuration file in /etc/timidity/timidity.cfg which is a smbolic link to either /etc/timidity/freepats/freepats.cfg or /etc/timidity/gravis/gravis.cfg. Convert a .mid file to .wav format with the command:

timidity -Ewpso -Ow1sSl -o outputfile.wav inputfile.mid

This gives you a 32,000 BPS sampling rate file. For CDs you need a sampling rate of 44,100, thus convert the file via:

sox  file_to_be_converted.wav  -r  44100  cd_ready_file.wav

But beware - sox is not at all intelligent when interpreting the parameters! In desperation I wrote a little shell script pox to convert the formats:
Usage: pox source-file target-file Only ONE space between parameters!

#!/bin/bash
# This file converts 32,000 samples/sec wave files to 44,100
rm -f tmp0.wav
rm -f tmp1.wav
cp $1 tmp0.wav
touch tmp1.wav
sox tmp0.wav -r 44100 tmp1.wav
touch $2
cp tmp1.wav $2
rm -f tmp0.wav
rm -f tmp1.wav
echo done $2
You can also create wave files for CDs from mp3 files. To do that convert firstly the mp3 file fo raw wave format with:
mpg123 -q -s file_in.mp3 > file_out.raw
Then convert the raw format file to CD capable format with the sox command. Take into account the original format - it is displayed when you first play the mp3 file with mpg123. A typical conversion command looks like:
sox -traw -s -w -c2 -r44100 file.raw -c2 -r44100 file_for_CD.wav

Sox and Timidity are powerful programs, with which you can achieve many special effects with your sound files! Try man sox and man soxexam to learn the usage of sox. Needless to say, there are many other possibilities to get the required wav-files. Most CD players cannot handle CD R/Ws as audio CDs.
Use only CD Rs for audio purposes!

With Xcdroast
Do a "Create CD", "Write Tracks", go to "Layout Tracks", select the desired wav-files as tracks from "Image Information", and add them in the correct sequence. Then accept the track-layout, and have only "Write CD Text" "Eject after write" and "Pad Tracks" checked in the "Write Parameters" section. Write Mode: Disk-At-Once (DAO). Then click "Edit titles" and put some meaningful information for the CD in general and each track in particular. Then hit the "Write Tracks" button and watch your audio-CD being created
This process may take a while. With older CD burners be careful not to let the screen go blank, or any other process possibly interfering with the creation of the CD, lest you get "pauses" in the music!

To duplicate Audio CDs
The easiest way is to use k3b with the "Duplicate CD" function.
You can also use xcdroast with function "Duplicate CD".
Do a "Read CD" and select all the tracks, you want to have duplicated.
This will create files in your specified intermediate directory. When all is read, delete all files, that do not have a suffix .wav from that directory! Then proceed as above, when creating a CD from scratch.

Creating Video CDs
Well I have not yet succeeded in doing this. I have downloaded the following software:
CD Players
So far I could only use kaffeine amd mplayer, apart from the hardware automatically playing a CD when it is put into the DVD drive. gnome-cd does no longer work, neither does kscd.

DVD and VCD Players
Mplayer works on CDs and DVDs without requiring root priviledges: mplayer /dev/cdrom or /dev/dvd is the command. Look at the man pages for control keystrokes!

Creating Compressed Audio Files
MP3 Format:
A simple way is to use gogo which can be installed by first downloading nasmsse from http://homepage1.nifty.com/herumi/soft/petit/nasmsse2.tgzpetit313.tgz (unzip and untar, then move nassm to /usr/local/bin); then downloading petit123.tgz, unzipping and untarring and installing it according to it's readme_e.html file (move gogo to /usr/local/bin).
Usage:
Create MP3:................................ gogo [options] input_file.wav output_file.mp3 Options: -b kbps: bitrate[kbps] 128 (default) 8,16,22,24,32,40,48,56,64,80,96,112,128,160,192,224,256,320 if input is 8,16,22.05 etc. KHz -v {0,1,..,9} 0:high 9:low (VBR quality) -q {0,1,...9} 0:high 5:default 9:low (Quality) For other options: do a gogo -h
The shortest mp3 files are created with the command gogo -v 0 -q 0 inputfile.wav outputfile.mp3. Setting the quality lower paradoxically increases the file size!

Audacity can also export audio in mp3 format.
If you want to put those files on your mp3 player, plug it into the first USB port and simply copy them to /mnt/removable1 - of course after having it mounted first!

MP2 Format:
MP2 files can be created with ffmpeg -i INPUTFILE.wav -acodec mp2 -ac 2 -ar 44100 -y OUTPUTFILE.mp2
... INPUTFILE.mp3 works just as well with this command!
The -ar 44100 is the sampling rate - you don't save much space if you set it lower (32000, 22050 or 1600). At the cost of quality you can set the bitrate lower (-ab 32, the default is 64. Going lower than 32 makes for horrible quality). The -ac denotes the number of channels (1 or 2). The mp2 files created this way are on average half the size of mp3 files exported by audacity.

OGG Format:
Audacity can export music in ogg format. Comparison between file-sizes:
-rw-r--r-- 1 waldis waldis  2211084 2009-12-20 09:26 DEEPRIVgogo.mp3
-rw-r--r-- 1 waldis waldis  1055973 2009-12-20 09:26 DEEPRIV.mp2
-rw-r--r-- 1 waldis waldis  2404578 2009-12-20 09:28 DEEPRIV.ogg
-rw-r--r-- 1 waldis waldis 16897068 2006-10-23 21:01 DEEPRIV.wav
All these formats can be played with Amarok and sound pretty similar.

Sound Recorders
There is a simple command-line recorder rawrec which allows you to create a recording in raw format. Be generous with the allocated time. You can always terminate a RAWREC with Cntrl-c thereby keeping the hitherto recorded data!
Note: for a mixer application use gnome-volume-control with the following settings (for my microphone):
Playback: Master at 90%
Capture: Microphone at 100%
Switches: Do NOT tick Mic Boost +20dB - causes clipping!
Some examples:
rawrec -h -t12 file1.raw
Creates a 44100 sampling rate stereo file of 12 second duration. There are a lot of variations possible - have a look at the man entry! For instance to record a mono soundclip of 45 seconds at a sampling rate of 8000 use:
rawrec -h -t45 -c1 -s8000 file2.raw
Files in raw format can be reproduced with the rawplay command, for instance
rawplay -c1 -s8000 file2.raw
in the above example.
To convert a raw file to CD-capable format use the sox conversion utility, for the first example above:
sox -traw -s -w -c2 -r44100 file1.raw outputfile.wav
For the second example above:
sox -traw -s -w -c1 -r8000 file2.raw -c2 -r44100 file2.wav

To get a voice recording of reasonable quality a sampling rate of 8,000 mono is enough.

To get a music recording of reasonable quality you should use a sampling rate of at least 32,000. The rawrec/rawplay suite can be downloaded from the Freshmeat website and has to be installed from source according to the provided documentation.

From the GUIs there is

Gnome-Sound-Recorder
Record from Microphone (or wherever else, for instance source=Capture enables you to capture sounds played by other programs) to Wave format gives you a 22,050 KHz sampling rate - good quality.

Audacity
which is also a sound editor. It allows to import .raw and .wav files, and export in wav format, as well as recording. With some additional software it can also handle .mp3 files - but there are other options for that too. It is good to cut off the rough start- and end- clicks of a rawrec recording as well as to amplify a low level recording besides many more effects.

Streaming Radio Stations
2CA
Streaming Radio Stations in the ACT
Dto NSW
Streaming radio stations use a variety of protocols. Some can be received using RealPlayer, others require VLC or kaffeine. Sometimes the mms: protocol needs to be enabled. You can record streaming radio stations with Gnome Sound Recorder wave-format (source=AC97), whilst they are playing. Use pcm and pcm2 values (in Aumix) of 88.

Sound Editors
Audacity
It allows to import .mp3, .raw and .wav files. All kinds of special effects can be achieved on the whole or selected parts of the sound file. It needs libmp3lame.so (symlinked to the actual version you have) to export in mp3 format. The export might not be in the format you want it. In this case save your file in .wav format and convert it with gogo or ffmpeg.
To convert the sample format AND the sampling rate, set the new format in the track name manu and the new sampling rate in the "Project Rate" box. Then save and re-load the file and "Trim" the excess silent time at the end (if you have decreased the sampling rate).

Creating Autogenics And Meditation Recordings
To put it all together:
  1. Have your AT or meditation text split up in reasonably small chunks.
  2. Record one after the other (for instance using the rawrec -h -t445 -c1 -s8000 xxx.raw command.
    For every 10 seconds recorded the file will grow by 160,000 bytes. Thus a 10 minute recording will take 9,600,000 bytes = 9.16 MB).
  3. Import one after the other of these files into audacity using 16 Bit PCM, Little Endian and 8,000 Hz rate, and cut off the starting and ending clicks, then amplify it for a reasonable level and save as normal wave files.
  4. Copy the lot together in the correct sequence - either with audacity or sox (the latter has a limit of 32 input files but can easily be used in a shell-script).
  5. Export this file as name.mp3 if your version of audacity allows that, if not save this file as temp.wav.and convert it to mp3 format with: gogo -b 8 -v 0 -q 0 temp.wav name.mp3 (change the "b" parameter for other sampling rates!)
  6. It is handy to use a shell script for the last 3 steps!
  7. Put the mp3 file on an mp3 player (that you mount on /dev/sda) and play it as required!

Creating Subliminal AT Recordings
Subliminal recordings contain messages with volumes below the hearing threshold. You must have a piece of music and your spoken messages on separate tracks and attenuate the message track so that it cannot be consciously heard over the music - between 20 and 36 dB attenuation, depending on the characteristics of the background track. Then save them as a single mono track. So:
  1. Both your recordings must have the same sampling rate (44100 for CD use). If the AT recording for instance has a sampling rate of 8000 convert it with sox:
    sox -r8000 original.wav -r44100 new.wav If the music recording isn't at rate 44100, convert it too!
  2. Open your AT recording in Audacity. You might want to process it first, like applying equalisation thereby emphasizing the 300 to 3000 Hz passband, followed by levelling (heaviest). Export it as wave file and exit audacity.
  3. Create an AT recording of suitable length (a bit shorter than the music track) by copying it with sox:
    sox input.wav input.wav ... output.wav then open it with audacity.
  4. Import Audio: Your music recording (make sure it's mono, convert beforehand if necessary).
  5. Select the voice track only (left click on the track info frame).
  6. Attenuate this track.
  7. Listen to the recording. Change volumes of tracks as required.
  8. Export as .wav or .mp3 file. There will be a message that the tracks will be mixed down to a single mono channel. This is what you want! Exit audacity.
Of course you can use such a recording as starting point for a "Deep Meditation" recording by firstly converting the track to stereo by duplicating it (Edit menu: "Select All" followed by "Duplicate") and selecting "Make Stereo Track" from the track name menu (to open the menu a double-click is required!) and then proceeding as per point 5 of the following topic:

Creating Deep Meditation Music
The theory is that the brain detects frequency differences between the left and right ear and synchronises brainwaves accordingly. Thus slight pitch differences between the left and right channels of a stereo-recording could induce deep meditation more easily.

The simplest way to create such music is to compose a melody with a midi-sequencer thereby using 2 very slightly off-pitch tracks, one of which is routed to the left and the other one to the right stereo channel (use controller event 8 with values of 0 and 127 respectively). More elaborate is the following method:
  1. Compose a simple low pitch melody in midi format.
  2. Convert that to a wave file with the command timidity -Ewpso -Ow1sSl -o outputfile.wav inputfile.mid
  3. Import that file into audacity.
  4. Amplify the sound (no clipping).
  5. Split stereo tracks (from the track name menu).
  6. Change pitch down on ONE of the tracks by 0.5 - 3% (experiment with that value).
  7. Export this file as name.mp3 if your version of audacity allows that, if not save the file in Microsoft 16 bit PCM WAV format.
  8. Convert it to mp3 format with: gogo -b 8 -m s -v 0 -q 0 temp.wav name.mp3 giving you a REAL stereo mp3.
  9. Alternatively convert the wav file to mp2 format with ffmpeg -i temp.wav -acodec mp2 -ac 2 -ar 44100 -y name.mp2
  10. You can put the mp3 file on an mp3 player and play it using headphones during meditation!
    Your mp3 player may also play mp2 files if you change the suffix to mp3, depending on the software version of your player!
See also: uazu.net/sbagen/ and www.jetcityorange.com/meditation/binaural-beats.html on this topic!

Sound Generation
The sox utility can be used to create sound. For instance the following script will generate (for 3 hours or until stopped by Cntrl-C) a sine wave of a frequency set as parameter:
#!/bin/bash
dur='3:00:00'
sox -t sl - -t sl - synth $dur sine $1 < /dev/zero | sox -t sl - -t ossdsp /dev/dsp

Midi with Soundblaster Live! and Audigy
Using the built-in Midi sequencer of the Soundblaste Live! card under Linux was a major exercise! It is very well described in:
http://www.linuxfocus.org/English/September2002/article259.shtml.
In a nutshell:
In /etc/modprobe.conf use the following sound related settings:
alias sound-slot-0 snd-emu10k1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-2 snd-seq-midi
alias sound-service-0-12 snd-pcm-oss
alias sound-slot-1 snd-virmidi

Download the Suse Rpm: pmidi-1.6.0-1.i86.rpm and install it.

Do a pmidi -l giving you:
 Port Client name Port name
 14:0 Midi Through Midi Through Port-0
 16:0 SB Live 5.1 EMU10K1 MPU-401 (UART)
 17:0 Emu10k1 WaveTable Emu10k1 Port 0
 17:1 Emu10k1 WaveTable Emu10k1 Port 1
 17:2 Emu10k1 WaveTable Emu10k1 Port 2
 17:3 Emu10k1 WaveTable Emu10k1 Port 3
 20:0 Virtual Raw MIDI 1-0 VirMIDI 1-0
 21:0 Virtual Raw MIDI 1-1 VirMIDI 1-1
 22:0 Virtual Raw MIDI 1-2 VirMIDI 1-2
 23:0 Virtual Raw MIDI 1-3 VirMIDI 1-3

Download from http://www.alsa-project.org/~james/sound-fonts/8MBGMSFX.SF2
the file 8MBGMSFX.SF2 

Edit /etc/rc.d/rc.local and add the commands:
pmidi -l >/dev/null
sfxload /i586/8MBGMSFX.SF2
... Make sure that "pmidi" and sfxload are in /bin - NOT /usr/bin !!
... of course substitute your own directory for the 8MBGMSFX.SF2 file!
The pmidi -l command is required, otherwise the sfxload won't work! 
Without the sfxload there will be no midi-output.

This concludes the installation. 
To play midi files, execute pmidi -p 17:0 name_of_a_midi_file
Or create the following script plmidi in your $HOME/bin file:
#!/bin/bash
pmidi -p 17:0 $1
exit

Note that only ports 17:0 to 17:3 allow sound to be heard!

Bug: pmidi cannot handle lyrics events! 
Before playing any midi file with lyrics, edit these out with the "event list editor" of Rosegarden.

Kmid works as well if you configure Midi accordingly! 

Note: On another PC I used the same procedure for a Soundblaster Audigy card.
The only difference is that pmidi-l gives you:
 Port     Client name                       Port name
 14:0     Midi Through                      Midi Through Port-0
 16:0     SB Audigy 2 ZS [SB0353]           Audigy MPU-401 (UART)
 16:32    SB Audigy 2 ZS [SB0353]           Audigy MPU-401 #2
 17:0     Emu10k1 WaveTable                 Emu10k1 Port 0
 17:1     Emu10k1 WaveTable                 Emu10k1 Port 1
 17:2     Emu10k1 WaveTable                 Emu10k1 Port 2
 17:3     Emu10k1 WaveTable                 Emu10k1 Port 3

Notice the difference in quality between this and timidity!

Midi Sequencers
So far I have used only Rosegarden.
Its native format is not Midi, so you have to "export" a file in Midi format. Configure Rosegarden as follows:
In "Sequencer Settings" - General:
Leave eveything unticked.

In "Sequencer Settings" - Startup:
Do NOT tick: Start JACK when Rosegarden starts.

In "Sequencer Settings" - Record and Mix:
Audio mix and monitor mode: Low latency.
Tick both post-fader boxes.

In "Sequencer Settings" - Synchronization:
Sequencer timer = System Timer
Tick "Send MIDI clock and system messages".
Jack Transport Mode = Ignore JACK transport.
Since Release 2007.0 the following has to be done when Rosegarden starts:
Go to "Composition" then "Studio" then "Manage Midi Devices".
There set the port for "General Midi Device" to 17:0 (it is 16:0, which DOES NOT WORK). Then save the "General Midi" settings to a configuration-file and change the start command for rosegarden to: rosegarden my-config-file.

This way Rosegarden works nicely with the hardware midi of Soundblaster Live!
There are plenty of effects to be achieved with midi-files. For a definition of the MIDI file format see http://www.sonicspot.com/guide/midifiles.html.

Browsers
Seamonkey handles JavaScript impeccably and displays Baltic and Cyrillic utf-8 webpages. It is now my default browser. It also has an integrated composer.
Firefox seems very similar to Seamonkey.
Opera uses the mozplugger plug-in correctly. ISO-8859-13 webpages are displayed OK. So are dynamically created pages. It has also a mail-client. For Java support you have to specify a Java environment.
Opera is the only browser under LINUX that honours the <object> tags for background music files on this server (orgfree). All the others require you to disable javascript!

HTML Editors
If you have a document in rtf format, use the script rtf2htm.php to convert it to html format. The generated html is (except for the unnecessary font tags for each paragraph that can be removed with a text-editor global replace) very reasonable.

Bluefish is fairly simple but allows you to create good quality html.

Others require less knowledge of html internals, thus have a user interface more like a word-processor, but the quality of the generated html leaves a lot to be desired, particularly when you insert preformatted text! But if you are in a hurry:

Nvu does the job nicely - good for quickly creating pages.
Seamonkey is similar to the old Mozilla Composer; quite usable.
AbiWord has a quite rudimentary web-page creation facility. It can't edit the pages it created.
OpenOffice is a bit better than AbiWord.

Mail Clients
Seamonkey Mail is the one I use - a real "workhorse".
Opera has a mail client too - in a different format.

Instant Messengers
gaim 2.0 was installed with 2007.0, I haven't tested it yet.

Video Conferencing
ekiga was installed with 2007.0. It is easy to get an account at ekiga. As webcam one can use xawtv in position "camera" with any VCR or even a Mustek VDC-100 attached. Also my webcam Pixart Imaging Inc. Easy Snap Snake Eye works just fine with the following module parameters in /etc/modprobe.conf:
options gspca autoexpo=0 usbgrabber=0 compress=0

skype Version 2.0 needs a bit of fiddling at set-up:
Sound In:  SB Live 5.1 (hw:Live,0) 
Sound Out: SB Live 5.1 (hw:Live,3)
Ringing: SB Live 5.1 (hw:Live,0)
As webcam one can use xawtv in position "camera" with any VCR or even a Mustek VDC-100 attached (shocking picture). Contrary to ekiga my Pixart Easy Snap Snake Eye WebCam does only create a usable picture with the nvidia video driver! With the vesa driver the picture is unusable.

Echolink
Install echolinux-0.17a-1.i386.rpm.

Run echogui. It needs needs 2 control files:
$HOME/.echolinux/userdata.txt in the following format:
Callsign (in uppercase)
Name
QTH
Echolink-password
$HOME/.echolinux/info.txt in the following format:
Callsign (in uppercase)
Name
QTH

... any comments ...

Plug-Ins
To play audio and video files on web pages, browsers must be provided with a plug-in module.

Mozplugger
Is similar to the old plugger, I installed version 1.10.1 that handles the <object> tag. The standard /etc/mozpluggerrc does not work properly, particularly when it comes to midi and mp2 files. Here is the one I use now.

Shockvawe Flash
To play Flash-Player files you have to have the Shockwave Flash player. It can be downloaded from the web.

FTP Programs
There is of course the good old line command ftp -useful for quickly uploading one or two files. It also teaches you the syntax of ftp.
lftp is a bit more sophisticated. For bulk up- and downloads use gFTP - it is very fast and reliable.

BASIC Programming Language
Download the FreeBasic compiler from www.freebasic.net/index.php/download.
I installed the 0.18.5 version from the tar.gz archive.
There are some syntax differences between it and the old QBASIC and Turbo Basic, but the compiler is quite good! Most old QBASIC programs can be compiled using:
fbc -lang qb sourcefile.bas

DOS Programs
These can be run using "Dosbox", that gives you a DOS window. Download it from http://dosbox.sourceforge.net/download.php?main=1. Dosbox requires you to "mount" the directories of the programs it runs - see its README file. Download:
libSDL_net1.2-1.2.5-4mdk.i586.rpm followed by:
dosbox-0.63-1_fc3.i386.rpm
I use it to run some QBASIC applications that I haven't yet converted to FreeBasic format.

Using German Language Characters:
Specify in /etc/X11/xorg.conf
Option "XkbLayout" "de"
Then use a font, that contains the German special characters.

This redefines your keyboard, with the German umlaut characters appearing as follows:
Ö is on the semicolon-colon key.
Ä is on the quote-doublequote key.
Ü is on the [ - { key.
ß is on the - key, shift- - gives you the question-mark.
@ is Modeshift - q ... Modeshift being the right Alt-key.
Also: Z and Y are interchanged.
Several other special characters are on different locations - check your keyboard!
To get back to the old keyboard, change the /etc/X11/xorg.conf file to what it was before, and restart X.

Bugs and idiosyncrasies I came across Useful Links
rpm database THE source for rpms - loads quickly and has a built-in search-engine!
Mandriva only rpm database Careful, this is HUGE!
Mandriva Site
Mandriva Wiki
How to make a Mandriva flash-drive
Knoppix
Damn Small Linux
OpenSuSe
Red Hat
Linux Distros
Kernel repository www.kernel.org
Freshmeat Linux Applications
Steve's Linux Links - lots of links
LINUX Magazine - Hints, Tips etc
LINUX USB Information
Fluxbox Window Manager
Openbox Window Manager
IceWm Window Manager
Jwm Window Manager
OpenMotif Mwm Window Manager
Idesk Desktop
KDE
Gnome
Firefox/Thunderbird
Opera
Nedit
Xfm Page
WINE
Timidity
Media Player
Converting Audio Files to Different Formats
O'Reilly LINUX Devcenter
Printers suitable
LINUX Howto
Applications - plenty!
Abi Wordprocessor
OpenOffice
Shockwave Flash Player
HOWTO Use MIDI Sequencers With Softsynths
LINUX Multimedia Tutorial
DeVeDe Software
Dosbox
SPF-PC clone
Streaming Radio Stations in the ACT
Dto NSW
Linux Courses Online
Free Linux E-Books
My HTML Crash Course
Or Search The Web for: 


If you want to give me some tips on any of the subjects mentioned here, please send some E-mail to:
My E-mail
Exchanging information freely is what LINUX is about!

Return to general Linux page
Return to my home-page
Free Web Hosting