LINUX Mageia 2.0

=== Archived Version. I no longer use Mageia 2 ===


Compiled by: Waldis Jirgens. Last update October 1, 2014.

Why Linux in the first place, since Windows is so popular?
Why use an old PC with an old monitor?

My PC was rescued from the scrap heap (Windows XP didn't like it any more): Intel D945GTP motherboard, see also the technical specs manual. Dual CPU 3 GHz speed, 1.5 GB RAM, 111 GB HDD (SATA). I installed Mandriva 2010.1, put the 2010.2 upgrades on, giving me Mandriva 2010.2 and later upgraded online to Mageia 1, and in April 2013 to Mageia 2. I also added a 232 GB PATA disk and installed Blag (Spartakus) on it.

 
Here are links to my other Linux pages:

 
Linux Mageia 1 This is my previous Linux system
Amateur Radio with Mageia 4 and Lubuntu Mageia 4 and Lubuntu on a separate PC and Mandriva 2009.0 on my ASUS eee PC netbook
Mandriva 2008.0 On an old PC I had this system installed for a while - no longer in use
Upgrade from 2008.0 to 2010.1 Shows how I upgraded from 2008.0 to 2010.1
Mageia 3 with KDE My wife's PC
OpenSuse 10.3 On a very old PC - used as backup
Soniq Cinavision Android This smart TV is also an Android 2.2.1 computer


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!

Contents:
Upgrade to Mageia 2
Installation
Hints Some Control Tables and Scripts
Installed rpms
Some File Locations
Upgrading via RPMS
Kernel Rebuild
Changing System Settings
Configuring Printers
Refilling Printer Cartridges
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. Boot Loaders
  11. Boot-Messages
Applications
  1. Word Processing
  2. Spreadsheets
  3. PDF Viewers
  4. PDF Writers
  5. Ebook Readers
  6. Screen Capture
  7. Etax
  8. Multimedia
  9. Browsers
  10. Plug-Ins
  11. HTML Editors
  12. Mail Clients
  13. Video Conferencing
  14. Echolink
  15. Amateur Radio Digital Modes
  16. FTP Programs
  17. BASIC Programming Language
  18. 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
Utility Scripts
Bugs and idiosyncrasies I came across
Useful Links
A wealth of documentation in various formats is in /usr/share/doc and the various subdirectories thereof.


Upgrade to Mageia 2:
As such the upgrade seemed to be a simple process - Boot the Mageia 2 DVD and do an Upgrade to the existing system. Little did I know that the upgrade process would be initiated and after a while the Mageia 2 system realised that there was not enough space in the /usr partition and left the system in an unusable state.

Therefore I did a back-up of the /home partition, re-partitioned the HDD and did a fresh install of Mageia 2.

This took a reasonably long time, particularly because there were many updates to be applied online.

Problems in the process:
  1. IceWm is not a standard Window-manager in Mageia, but it's available via the software repository. KDM is the standard and seems reasonably sluggish and pompous - starting with music and visual effects, who do they want to impress?
  2. Idesk is not in the software repository. I installed idesk-0.7.5-8.fc11
  3. Xdialog which I need for my Idesk scripts is not automatically installed, but it's in the repository. I installed  Xdialog-2.3.1-2.mga2.
  4. Vsftpd refused steadfastly to work, even after stopping shorewall in MCC. The only way out was to disable /etc/rc.d/init.d/Shorewall.
  5. Rosegarden would have required 1.5 GB of software to be installed, which seemed like heavy overkill, so I installed muse instead - musescore-1.1-3.mga2. It needs the jack server (available as jackit-1.9.8-3.mga2 and starts it automatically itself, The combination does NOT work with pulseaudio)
  6. Xpaint is no longer available, older versions cannot be tricked by symlinks on libraries - trying kolourpaint instead.
  7. Bluetooth has changed a lot - works ONLY under Gnome, OK on Blag.
  8. Streaming radio stations pose sometimes a problem. For instance those who submit an .m3u file which contains a URL. To handle these I wrote a helper TCL program, which works in most cases:
  9. #!/usr/bin/tclsh
    set finp [open $argv r]
    gets $finp urlrec
    exec seamonkey $urlrec &
    close $finp
    exit
  10. My Canon iP1300 printer thought that it needed still several software packets to make it work - but it does NOT - here's what happened:
  
[root@localhost linsoft]# rpm -i cnijfilter-common-2.60-1.i386.rpm
error: Failed dependencies:
        gtk+ is needed by cnijfilter-common-2.60-1.i386 ----> MG2 repository has gtk+2.0 and it is installed
        libxml is needed by cnijfilter-common-2.60-1.i386 === Resolved by installing libxml1 via MCC
[root@localhost linsoft]# rpm -i  cnijfilter-ip2200-2.60-1.i386.rpm
error: Failed dependencies:
        cnijfilter-common = 2.60 is needed by cnijfilter-ip2200-2.60-1.i386
        libgdk-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386 ----> There is no libgdk in MG2 repository. in linsoft is libgdkimlib, fails with similar dependencies
        libglib-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386 ----> libglib2.0_0 has a file libglib-2.0.so.0 that could be symlinked
        libgmodule-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386 ----> Not in repository nor in linsoft. Installed  libgmodule-2_0-0-2.36.0-1.1.i586.rpm  /usr/lib/libgmodule-2.0.so.0 symlinkable
        libgtk-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386 ----> Not in repository nor in linsoft, libgtk+2.0_0 is not symlinkable
        libpng.so.3 is needed by cnijfilter-ip2200-2.60-1.i386 ----> Not in repository nor in linsoft libpng15_15 could be symlinked - file libpng15.so.15
        libtiff.so.3 is needed by cnijfilter-ip2200-2.60-1.i386 ----> Not in repository nor in linsoft libtiff5 could be symlinked - file  /usr/lib/libtiff.so.5
        libxml.so.1 is needed by cnijfilter-ip2200-2.60-1.i386 === Resolved by installing libxml1 via MCC
[root@localhost linsoft]#

BTW Canon has an archive with the following rpms, the one for ip2200 is not part of it:
tar -zxvf '/home/waldis/linsoft/Canon/Linux_Print_Filterv270.tgz'
cnijfilter-mp510-2.70-2.i386.rpm
cnijfilter-mp600-2.70-2.i386.rpm
cnijfilter-common-2.70-2.src.rpm
cnijfilter-ip3300-2.70-2.i386.rpm
cnijfilter-ip430
... needs to be investigated if any of those could be used for the iP1300 printer...

[waldis@localhost ~]$ su
Password:
[root@localhost waldis]# cd /usr/lib
[root@localhost lib]# ls libpng*
libpng15.so.15@  libpng15.so.15.10.0*
[root@localhost lib]# ln -s libpng15.so.15.10.0  libpng.so.3
[root@localhost lib]# ls libpng*
libpng15.so.15@  libpng15.so.15.10.0*  libpng.so.3@
[root@localhost lib]# ls libtiff*
libtiff.so.5@  libtiff.so.5.0.6*  libtiffxx.so.5@  libtiffxx.so.5.0.6*
[root@localhost lib]# ln -s libtiffxx.so.5.0.6 libtiff.so.3
[root@localhost lib]#


[root@localhost linsoft]# rpm -i cnijfilter-common-2.60-1.i386.rpm
error: Failed dependencies:
        gtk+ is needed by cnijfilter-common-2.60-1.i386
[root@localhost linsoft]# rpm -i cnijfilter-common-2.60-1.i386.rpm --nodeps
[root@localhost linsoft]# rpm -i cnijfilter-ip2200-2.60-1.i386.rpm
error: Failed dependencies:
        libgdk-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386
        libglib-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386
        libgmodule-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386
        libgtk-1.2.so.0 is needed by cnijfilter-ip2200-2.60-1.i386
        libpng.so.3 is needed by cnijfilter-ip2200-2.60-1.i386
        libtiff.so.3 is needed by cnijfilter-ip2200-2.60-1.i386
[root@localhost linsoft]# rpm -i cnijfilter-ip2200-2.60-1.i386.rpm --nodeps
[root@localhost linsoft]# /etc/init.d/cups restart
Restarting cups (via systemctl):                                [  OK  ]
[root@localhost linsoft]# lpadmin -p IP2200 -m canonip2200.ppd -v usb://Canon/iP1300?serial=26CB84 -E
[root@localhost linsoft]# lpadmin -d IP2200
[root@localhost linsoft]#

.....In spite of the missed dependencies it WORKS!!! .....

On the Blag system this worked with much less drama, however the printer did NOT work.
What work was simply to add the printer as PIXMA iP1300 from the System Admin menu. 
This option is only available on Blag but not on Mageia.

Hints

Music Files
Mageia: ogg, mp2 and 3 files can be played with mpg123, Blag needs mplayer to do the same. Midi files can be played with timidity on either system. Audacity works on both systems, but the Blag version does not support import/export of mp2 or 3 files.

Basics
Web browsing (Seamonkey, Firefox), E-mail (Seamonkey), Office Suite (Libre Office), File managers, Graphics editor (Gimp), Basic editors all work nicely on both systems.

Tips
To transfer e-mails from one PC to another do the following:
On the "Sender" PC highlight the messages to be transferred. Select to "Save As" files - multiple messages can be saved by specifying a directory name as target.
On the receiver PC start Seamonkey, open each mail, rightclick it and select "Copy to" and specify the mail folder where you want the message.

Online Upgrade:
From the Mageia website I got the instructions for the update:
$ su
# urpmi.removemedia -a
then:
# urpmi.addmedia --distrib --mirrorlist http://mirrors.mageia.org/api/mageia.1.i586.list
... of course change the URL dependig on the new release you want to migrate to!
then:
# urpmi --replacefiles --auto-update --auto 

Orphan RPMs:
Beware of the feature to "uninstall orphans" - you might want to use them at some time later! Also beware when deleting rpms via mcc - sometimes the system wants to delete additional rpms that you rather like to keep! Once I was not careful and managed to have the system uninstall xorg. To remedy that I re-installed the live CD on the existing partitions without formatting them. Of course the rpm database does not reflect any additionally installed software!

PATH Discrepancies:
If you notice that the PATH variable has been changed between a non-X and an X session, check the contents of directory /etc/profile.d for offending files. In one case I found e17_svn.sh resetting PATH to some inappropriate value. Commenting out this instruction solved the problem. The path variable set in ~/.bash_profile should be the same inside and outside of X.

Rescue Systems
A stand-alone LINUX system on a CD or DVD comes in very handy! Mageia, Mandriva, Blag 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 - also called DSL - being only 50 MB on CD.

General Distros USB Stick
If the PC has no CD or DVD drive one can put the iso image of any live CD provided the iso is a so called "hybrid iso" on a small (1 GB) USB stick as follows:
Plug in the USB stick, then locate the USB drive via ls /dev/sd*
Here it was /dev/sdc
Go to the directory that contains the live CD iso, then do:
[root@localhost linux] dd if=Blag-140k-i686.iso of=/dev/sdc bs=8M
87+0 records in
87+0 records out
729808896 bytes (730 MB) copied, 162.129 s, 4.5 MB/s
[root@localhost linux]# sync
[root@localhost linux]# 
... Note: The above figures taken from the creation of a Blag (Spartakus) 1 GB USB stick using an USB 2.0 port.

If you just want a rescue disk you are done. If however you want to use the remaining space on the disk, re-arrange
the partitions (using fdisk and mcc) until you get:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         693      709631+  17  Hidden HPFS/NTFS
/dev/sdc2             694         967      280576   8

That's it!

Caveat: The partition created on the USB disk is readily available when you boot from a regular HDD, however any attempt 
to mount it when you booted from the USB disk fails as follows:
[root@localhost bin]# mount /dev/sdc2 /mnt/sdc2
mount: /dev/sdc2 already mounted or /mnt/sdc2 busy
[root@localhost bin]#
Even more peculiar and probably related to the above PATA system problem with Mandriva 2010: 
When booting from a Blag or a Mandriva 2009.0 stick, both SATA and PATA HDDs are visible, 
when booting from a Mandriva 2010.1 or 2010.2 stick only the PATA HDD is visible.
To edit files on the HDD from the booted rescue system do the following:
Now the files on partition /dev/sdax are available in /mnt/hd. Edit, save and subsequently umount /mnt/hd.

DSL USB Stick - Does NOT boot on this particular PC, but on many others
The DSL iso is not a hybrid iso, so the above process does not work.

To make a DSL USB drive system follow the instructions of this DSL wiki.
I did it the following way:
The USB stick was on /dev/sdc.
 fdisk /dev/sdc
Then I deleted all partitions using the comand "d" repeatedly.
Allocated a new bootable primary partition with the commands "n", "p", "1" and "a".
Made it W95 FAT32 using the commands "t" and "b".

Created the physical filesystem with:
 mkfs.vfat -F 32 /dev/sdc1

Then I created a new MBR:
 dd if=/dev/zero of=/dev/sdc bs=446 count=1
 
Did a rpm -q syslinux --filesbypkg
showing me the path to mbr.bin: /usr/lib/syslinux/mbr.bin

This I followed up with:
 cat /usr/lib/syslinux/mbr.bin > /dev/sdc
 
Finally I mounted the USB drive to /mnt/stick and unzipped dsl-embedded.zip onto /mnt/stick:
[root@localhost linux]# mount /dev/sdc1 /mnt/stick
[root@localhost linux]# unzip dsl-4.4.10-embedded.zip -d /mnt/stick
Archive:  dsl-4.4.10-embedded.zip
 extracting: /mnt/stick/german.kbd   
  inflating: /mnt/stick/linux24      
...
  inflating: /mnt/stick/dsl-vhd.bat  
[root@localhost linux]# 
After the USB stick was done I edited the file syslinux.cfg in its / directory as follows: Note that making the USB stick from within DSL does not work!
There is plenty of space left on any USB stick with a DSL system on it. If one puts some files on this space you can access them from within DSL by mounting the stick with
mount /dev/sda1 /mnt/sda1
The suggested mounting directories of other hard disk partitions that DSL "sees" appear as /mnt/hdxy. Thus to access them you should mount them as:
mount /dev/hdxy /mnt/hdxy

There are plenty of usable programs on the DSL system:
Root Password
If you forget the root-password:
  1. At the boot: prompt enter linux single
  2. When the system comes up enter: passwd
  3. Assign a new root-password
  4. That's it!
Su problems
If after changing security levels, you suddenly find that the root password for su is not accepted or mcc tells you, that you have "insufficient privileges" try the following:
chmod ug+s /bin/su and chmod ug+s /usr/sbin/userhelper
This sets the "setuid" permission and you can use "su" and "mcc" again from a normal user account.

.gvfs Directory Sometimes there is a hidden diectory .gvfs created in the home directory of a user. An ls -l it looks like:
????????????? ? ? ? ? ? .gvfs
To get rid of it one has to first (as root) do an:
Umount home/user/.gvfs
then:
rmdir .gvfs
Hardware Problems
Strange behaviour of the PC (like unwillingness to start, non recognition of drives, or lock-ups) is often related to poor contact between plugs and sockets: Cleaning the contact area with WD40 helps in most cases.

Another possibility is the add on of a memory chip with slightly different characteristics. To make this work sometimes one has to increase the CAS Latency in the BIOS Set-up.

Also beware of some bleedingly obvious blunders: 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! Luckily no permanent damage was done and putting it in a different slot made it work again.

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 second Linux 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. Their device addresses start with /dev/sdc for the first one, /dev/sdd for the second, and so on.

Other Disks
Device addresses can be found out by using fdisk [devicename]. The extended addresses can be found out by using mcc (advanced).
The command to mount a DVD or CD is: mount /dev/sr0 /mnt/cdrom


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/. /mnt/stick/home/waldis

This "." wildcard character refers to the content of the currect directory as a whole without expanding subdirectories.

Bluetooth:
I bought a USB Bluetooth dongle. It is detected as:
[waldis@waldis_main ~]$ hcitool dev
Devices:
        hci0    00:15:83:3D:0A:57
First success came on the Blag system:
[waldis@localhost ~]$ blue
bluefish           blueman-assistant  blueman-sendto     
blueman-adapters   blueman-browse     blueman-services   
blueman-applet     blueman-manager    bluetoothd         
[waldis@localhost ~]$ blueman-adapters
/usr/bin/blueman-adapters:172: GtkWarning: IA__gtk_radio_button_set_group: assertion `!g_slist_find (group, radio_button)' failed
  builder.add_from_file(UI_PATH +"/adapters-tab.ui")
org.bluez owner changed to  :1.9
value:  1.0
value:  0.0
[waldis@localhost ~]$ 
In "Service Configuration" enable "bluetooth" at start-up.
Then I uploaded photos from my mobile phone to the system. They were in folder "/~Public"

[waldis@localhost ~]$ cd Public
[waldis@localhost Public]$ ls
Photo0003.jpg  Photo0009.jpg  Photo0014.jpg  Photo0019.jpg  Photo0024.jpg
Photo0005.jpg  Photo0010.jpg  Photo0015.jpg  Photo0020.jpg  Photo0025.jpg
[waldis@localhost Public]$ 
On the Mageia system I added bluetoothd to top of /etc/rc.local since it doesn't appear to be set up as a service.
Also added to /etc/modprobe.preload
bluetooth
rfcomm
bnep
l2cap
 
Now the system sees my mobile phone, still transferring pictures and videos did not yet work,
 
After installing the "blueman" rpm on Mageia the similar procedure rendered:
 
[waldis@waldis_main ~]$ blueman TAB
blueman-adapters   blueman-assistant  blueman-manager    blueman-services
blueman-applet     blueman-browse     blueman-sendto     
[waldis@waldis_main ~]$ blueman-adapters
... and it aborted with some Dbus problem ...
Under IceWM nothing helped, however under Gnome (which I dislike because it has an Android like look and feel and does not display applications on its desktop, which are not installed via rpms) the following procedure worked:

To upload pictures or videos taken with the phone:
  1. On the PC plug in the bluetooth USB dongle.
  2. On the phone go to "Settings" - "Connectivity" and enable Bluetooth. Enable visibility for the files.
  3. Click on the Blueman icon at the task bar and browse files:
  4. The phones id will appear.
  5. The phone asks if you want to enable data exchange - Yes.
  6. On the PC you will find the pictures now (similar to a file manager window).
  7. Drag and drop an image from the phone to a PC directory. Repeat until yuou have copied all images.
  8. Disable Bluetooth visibility of the items on the phone. Then disable Bluetooth itself.
  9. Optional: On the phone delete the pictures.
  10. Close the blueman-browse window on the PC.

To upload pictures sent to you via SMS use the following additional step:
Go to the Inbox of the phone, view a message with pictures then the associated picture and select "Save Items". They will be saved in "My Files" - "Images". Enable Bluetooth visibility for them

Sound Configuration:
I use the on-board sound system connecting the front output via a stereo cable to the rear microphone input.

Configuration:
snd_hda_intel driver pulseaudio
alsamixer as mixer application:
Playback:
Master: 74%, Capture: 64%
After finding the right values I noticed that they do not survive a reboot. To make them do that, one has first to do as root:
alsactl store 0
and add in /etc/rc.d/rc.local the line:
alsactl restore

Some File Locations: Upgrading via RPMS:
As root do the following:
Installing a rpm: rpm -i {package.rpm}
Upgrading a rpm: rpm -U {package.rpm}
Removing a rpm: rpm -e {package-name-short}
info on a rpm: rpm -q {package.rpm} [--filesbypkg]
info on all rpms whose name contains string xxx:
rpm -qa | grep xxx

Kernel 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. Clean up mcc-altered control blocks in /etc when completely done.

Configuring Printers:
Done by running "mcc".
However installing the usb printer Canon PIXMA iP1300 is a bit more difficult - see the introductory notes at the start of the page!:
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 some cryptic stuff.

Refilling Printer Cartridges
The printer uses a black cartridge of type PG40 and a colour cartridge of type CL41. Refilling the colour cartridge using a refill kit poses no problems. Refilling the black cartridge is easy too, however the printer refuses to use the full cartridge and just does not print black. On the net I found and verified the following solution: So much for user-friendliness!

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:5: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 5.
Following the above rules /etc/rc.d/rc 5 will be executed.
This will execute the scripts in /etc/rc.d/rc5.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: Icewm, Fluxbox, Openbox, Openbox-lxde and Gnome.
Openbox-lxde is a KDE lookalike without the overheads. It uses $HOME/Desktop as its desktop. Here a script to generate shortcuts to applications there.
With the "lightweight" WMs 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 Gnome. 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).
Peculiarities:When starting any KDE application the runtime environment has to be established first, on a terminal you see:
kbuildsycoca running...
There will always be a certain delay.
The Gnome file manager Nautilus assumes that you are running under Gnome and displayes the associated desktop after finishing!

Starting Window Managers:
With the graphical log-in you can select whatever window manager you want by putting putting "DESKTOP=xxx" in file ~/.desktop.

Here a script showing details of the WM switching process:
#!/usr/bin/tclsh
  set optio 0
  while { $optio != 9 } {
    puts "Switch to:"
    puts "1 Openbox"
    puts "2 Fluxbox"
    puts "3 Icewm"
    puts "4 Gnome"
    puts "5 KDE"
    puts "6 Enlightenment"
    puts "7 lxsession"    
    puts "9 Exit this script"
    puts "Enter the option you want"
    gets stdin optio
    if { $optio == 1 } { exec echo "DESKTOP=openbox" > ~/.desktop }
    if { $optio == 2 } { exec echo "DESKTOP=fluxwm" > ~/.desktop }
    if { $optio == 3 } { exec echo "DESKTOP=icewm-session" > ~/.desktop }
    if { $optio == 4 } { exec echo "DESKTOP=GNOME" > ~/.desktop }
    if { $optio == 5 } { exec echo "DESKTOP=KDE" > ~/.desktop }
    if { $optio == 6 } { exec echo "DESKTOP=enlightenment-start" > ~/.desktop }
    if { $optio == 7 } { exec echo "DESKTOP=lxsession" > ~/.desktop }
  } 
exit 0
IceWm
Fast and simple. It is started with exec icewm or exec icewm-session
Control files in: $Home/.icewm - particularly the menu file is designed very poorly - change it asap! When you do that, remember to stipulate the complete path to a program in each "prog" statement. If you don't, the program won't appear on the menu!

One important executable is $Home/.icewm/startup which looks like:
cd
cp -f .icewmmenu .icewm/menu
rm -f .serv*
idesk &
./appointk &
exit 0
Here I do some housekeeping before starting idesk which makes icewm a complete desktop environment without the overheads of Gnome or KDE. After all I use the computer to run applications and not to look at fancy pictures and wait for no reason.

Idesktop
The current version is fairly spartan but usable. I wrote a few bash scripts to create, edit and delete desktop icons plus restart idesktop See here for details
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 .icewmmenu and add or delete applications or whole menues. The file .icewmmenu will be copied at startup to ~/.icewm/menu since the latter will be overwritten by the system at unpredictable times!

Openbox with or without lxde
Edit file $HOME/.config/openbox/menu.xml - xml format.

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 ~/.Xdefaults.

Note that GTK applications have their own configuration file in ~/.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:
fileman.tcl is probably the fastest of the lot, good for basic tasks.

FileRunner is very fast and slick. Started with the command: fr
It can be forced to do an "Open with" by using from the "Utilities" menu the item "Run command on selected" (sometimes even on multiple selections). The configuration file is ~/.fr/config - edit only when fr is not running.

xfm is a fast but "lightweight" file manager. Its configuration files are ~/.xfm/magic, and ~/.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.
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 ~/.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". It has a built in editor xe, a graphics viewer xfi, and a text file viewer xfw.

Nautilus fits also in this category, though it cannot easily co-exist with icondesk. Good when using Gnome.

Editors:
Good and intuitive full screen editors:
For native (non X-Windows) LINUX: joe - this is very similar to DOS Edit, nano and pico.
For X-Windows: xedit (the tk-based version), nedit, gedit.
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
 Tweak ethernet cards:...................... ethtool - see man ethtool

 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 space in a directory:........... du directory-name
 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.

 File Systems: 
 Re-mount a filesystem read-write:.......... mount -o remount,rw /dev/... (only if you're desperate).
 Check used and free space on file systems:. df
 Check integrity:........................... fsck[.ext2|ext3|ext4] /dev/... Filesystem must be unmounted
 HDD Surface check:......................... fsck[.ext2|ext3|ext4] -c /dev/... Filesystem must be unmounted
 
 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
 Get info about a module (parameters):...... modinfo -p module-name
 
 Users and Groups:
 Change attributes of a user:............... usermod [parameters] 
 Change attributes of a group:.............. groupmod [parameters]
 
 Graphics
 Display graphics file:..................... display filename
 Display info about graphics fiel:.......... identify [ -verbose ] filename
 Make a .pdf out of all JPGs in directory:.. convert *JPG pdffile.pdf 
                                             Beware: The size of each picture depends on the "print size" not the actual size !!
 Resize graphic file(s):.................... mogrify -resize horizontalsize in pixels filename-spec
 Resize graphic file(s) x/y independent:.... mogrify -resize <xsize>x<ysize>! filename-spec Example: mogrify -resize 640x480! *.jpg
 Reduce .jpg file quality:.................. mogrify -quality quality_in_precent filename-spec Example: mogrify -quality 30 *.JPG
 Sharpen graphic file(s):................... mogrify -sharpen <radius>x<sigma> filename-spec Example: mogrify -sharpen 3x5 *.jpg
 Strip .jpg file exif data:................. mogrify -strip filename-spec
Note: For sharpening images I found mogrify -sharpen 2x800 as being best. Still the sharpen function of gimp is clearly better!

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
Unzip filed.xz:............................ unxz -d filed.xz.........gives you filed.tar
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
Unzip Windows zip:......................... unzip archive.zip.......many additional options - see man unzip
Uncompress filee.rar:...................... unrar e filee.rar.......see unrar --help

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!
Create Windows compatible zip file:........ zip archivename.zip inputfile(s)..... many additional options - see man zip
Create an .xz file: ....................... xz -z file
Deleting print jobs:
Use the commands:
lpq -l followed by:
lprm [-Pprinter] [-] [job # ...] [user ...]
to remove a job from the print queue.
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:
I don't require telnet. For ftp I use vsftpd.

ADSL Broadband Internet:
I use a router to share an ADSL connection. Interface eth0 has to be configured in the Mageia 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. Temporary changes can be done with that comman too. Example:
ifconfig eth0 hw ether 00:11:22:33:44:55 changes the Mac address of the ethernet adapter to 00:11:22:33:44:55.

Wireless Networking:
Note: I did this under 2010.1 on my second PC, but it should be the same under 2010.2.
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 Mageia 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
 
Boot Loaders:
I replaced the LILO bootloader with Grub, which has a nicer syntax for it's control file.
Here is my /boot/grub/menu.lst file
Here is how to restore a corrupted Grub boot record
And here is how to use Grub

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 Mageia-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. LibreOffice A bit slow but very good.
  2. AbiWord is lightning fast and very good.
AbiWord cannot read .docx files. To read them use either LibreOffice (Versions below 3 cannot read these files either) or download docx2txt-0.3.tgz and use the containing scripts docx2txt.pl and docx2txt.sh.

Spreadsheets
  1. LibreOffice has a similar interface as the old Staroffice 5.2.
  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, gv and xv are all usable.

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

Ebook Readers
I have got the small MiGEAR ebook reader model BSTE101. It has 2 GB internal memory and a slot for a micro SD card. The user manual is very poorly written. To copy files from the PC to the reader or the inserted card one needs at least an USB 2.0 port. All my attempts to copy files from the PC to the reader or the inserted card from USB 1.1 ports failed. I could mount the filesystem of the reader or the SD card (both claim to be "vfat") and writes to it seemed to work for a while, but after an "umount" nothing had been written to the device or the card. If you don't have any USB 2.0 ports, you have to write to the micro SD card using an USB card-reader-writer. With USB 2.0 do it like this (old example; I had 2 HDD /dev/sda and /dev/sdb):
[root@localhost waldis]# ls /dev/sd*
/dev/sda   /dev/sda5  /dev/sdb10  /dev/sdb13  /dev/sdb6  /dev/sdb9  /dev/sdd1
/dev/sda1  /dev/sdb   /dev/sdb11  /dev/sdb2   /dev/sdb7  /dev/sdc
/dev/sda2  /dev/sdb1  /dev/sdb12  /dev/sdb5   /dev/sdb8  /dev/sdd
... showing you /dev/sdc as the internal memory and /dev/sdd1 as the Micro SD card.
[root@localhost waldis]# mount /dev/sdc /mnt/stick
[root@localhost waldis]# mount /dev/sdd1 /mnt/sdmemory
[root@localhost waldis]# xfe &
[1] 8458
Copy the files you wish to either the internal memory (/mnt/stick) or
the Micro-SD card (/mnt/sdmemory) and/or delete the ones you no longer want
to be stored there. You need not copy everything to the root directories; 
the reader accepts subdirectories, allowing the files to be organised as you
like. Contrary to the documentation there need not be a directory called "Record"
on the internal memory. BTW the device plays mp2 audio files just as well as mp3 ones. 
Once you are done:
[root@localhost waldis]# umount /mnt/sdmemory
[root@localhost waldis]# umount /mnt/stick
[root@localhost waldis]#

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:
Go to the window you want the screenshot taken from.
Open a terminal window above it.
Enter there: xwd -out sshot1
Do an Alt-F9 to minimise this window.
Left-click on any part of the window you are interested in. This creates file sshot1 which can be viewed with:
xwud -in sshot1 or edited with xv or gimp.

ksnapshot is very nice, and easy to use.

Etax
The etax program from tha Australian Tax Office has to be run under Wine.
Install:
wine32-1.4.1-1.2.mga2
libkwineffects1-4.8.5-1.2.mga2
winetricks-20120912-1mdv2010.1
wine-gecko-1.4-1.mga2


Then do:
winetricks msxml4 ie7
This installs MSXML 4.0 in ~/.wine/drive_c/Program Files/MSXML 4.0 and Internet Explorer 7 in ~/.wine/drive_c/Program Files/Internet Explorer - without that you cannot connect to the ATO site over the net when running etax.
Download (under native Linux) etax2013_1.msi from http://www.ato.gov.au/individuals/content.aspx?doc=/content/32234.htm&page=5
wine msiexec /i etax2013_1.msi
This installs a subdirectory etax2013 to ~/.wine/drive_c/Program Files

copy the content of it into ~/etax2013
etax.exe needs lots of files open, so to avoid lock-ups:
Add in /etc/security/limits.conf
your_user_name hard nofile 4096
your_user_name soft nofile 4096
Run etax via: wine etax2013/etax2013.exe
Help does not work directly from etax.exe, but you can access the help system by opening in a browser:
file:///home/your_user_name/.wine/drive_c/Program%20Files/etax2013/help/client_nav.html
This way etax works nicely including lodgement and feedback.

Multimedia
Video and audio all can be handled reasonably well by Mageia.

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.
Exceptions: Some cameras are not autodetected and not on the list of supported cameras. To download pictures from these cameras simply plug their SD card in a card reader and use it as an USB disk!

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

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.

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 hard to find 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).
Gimp also retains the "print size" when converting between formats like jpg and png.
xv is very quick and easy to use for simple tasks..

mtpaint is not bad either, so to speak a lightweigt version of gimp. To understand the documentation one has to adjust to the mindset of the author first.
Contrary to gimp mtpaint when converting between file formats uses the size of the actual graphic to determine the "print size" of the picture. Useful if you want to mix pictures of various origins in a publication!

ImageMagic is a powerful command line graphics editor with stacks of useful subcommands and features. Mogrify is one of the commands that can be used for mass changes. For instance:
Reasonably sharpen all jpg files in a directory:
mogrify -sharpen 2x800 *.jpg
The larger the first number in the -sharpen geometry is the larger the "halo" around lines in the picture. It is hard to replicate a gimp sharpen of 76% with the mogrify command.

Get rid of Exif data:
mogrify -strip *.jpg

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 read glowing reviews about it.

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 an ad-on sound 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, but luckily the cd burner program k3b is clever enough to convert the file itself whenever you create an audio CD!

To convert the file manually:

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. Again k3b can use the mp3 files directly to create audio CDs.
The easiest way to convert them manually is to use the sound editor audacity.

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!

Burn the Audio CD with k3b
Use "New Audio CD Project" and follow the instructions!
To duplicate Audio CDs
The easiest way is to use k3b with the "Duplicate CD" function.

CD Players
So far I have only used mplayer.

DVD and VCD Players
Mplayer works on CDs and DVDs without requiring root priviledges: mplayer /dev/cdrom or /dev/cdrom1 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/stick - 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 or INPUTFILE.ogg work 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
Converting ogg files to mp3 format is a bit complicated. I use this script:
#!/bin/bash
for mufile in *.ogg
do
  sox $mufile temp.wav
  gogo -v 0 -q 0 temp.wav $mufile.mp3
  rm -f temp.wav
done  
for mufile in *.ogg.mp3
do
  nufile="${mufile/ogg.mp3/mp3}"
  mv $mufile $nufile
done  
exit
All these formats can be played with Amarok or xmms and sound pretty similar.

Sound Recorders
Generally the built in sound system is less flexible than my old Soundblaster card. There is no way to capture sound from an application other than to route it to the microphone socket of the sound system (see sound configuration above) and run concurrently an application that records from the microphone. This option (rear microphone 0) must be set in audacity. Then it is also valid for gnome-sound-recorder.

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 file1.raw
Files in raw format can be reproduced with the rawplay command, for instance
rawplay -c1 -s8000 file1.raw
in the above example.
To convert a raw file with a sampling rate of 8000 to an mp2 one use:
ffmpeg -f s16le -ar 8000 -ac 1 -i file1.raw file1.mp2
The sox utility can be used for conversion too - this time to a .wav file:
sox -r 8k -e signed -b 16 -c 1 file1.raw file1.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 (source=Capture = only choice and you must use pulseaudio) 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 if you use pulseaudio. 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
It might be necessary to enable the mms: protocol:
  1. Open Firefox or Seamonkey, type "about:config" (no quotes) in the address window, and click enter.
  2. Right click on the window and choose 'New', then 'String' from the pop-up menu that appears.
  3. In the first pop-up box, enter: "network.protocol-handler.app.mms" (no quotes - paste the text into the box).
  4. In the next pop-up box enter the path to mplayer (e.g. "/usr/bin/mplayer").
  5. Now, click in the main window again but choose 'New' 'Boolean'
  6. In the first pop-up box, enter: "network.protocol-handler.external.mms"
  7. In the second pop-up select 'True'. That's it!
Australian Streaming Radio Stations
US Streaming Radio Stations
Streaming radio stations use a variety of protocols. Some can be received using RealPlayer, others require VLC or mplayer You can record streaming radio stations with Gnome Sound Recorder wave-format, whilst they are playing, but ONLY if you route the sound-output back to the microphone socket of the sound-system (see sound configuration above).
I haven't managed to receive all ACT/NSW streaming radio stations yet. Here an incomplete list of stations that Do work:

ACT: 1ART, 1CBR (=Mix 106.3), 1RPH, 1TAB, 1WAY, 2CA, 2CN(=ABC 666), 2CC, 2JJJ, 2PPB(=Newsradio), 2RN(=Radio National),

NSW: 2CBR, 2CFM, 2CCH (=Country 94.1 - mplayer), 2CH, 2DAY, 2GGO, 2KKO, 2MBS (with VLC and mplayer), 2MMM (with VLC), 2SNO, 2UUL (Wave FM), 2UUS (WS FM), 2WSK.

Interstate and foreign streaming radio stations can be received the same way if the link speed is sufficient - worth a try.

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/sdc) 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!
To add some introductory words to such a recording:
  1. Open your (mono) text recording (.wav, .mp2, .mp3) in Audacity.
  2. Open your (stereo) music recording in Audacity.
  3. From the latter: "Split Stereo Tracks".
  4. Replace the RIGHT track with your audio recording.
  5. Fade in the left track (note the end time of the fade in).
  6. Make both tracks "Mono".
  7. Export as xxLEFT.mp2.
  8. Repeat the above process for the RIGHT track, giving you xxRIGHT.mp2 with the same fade-in end time.
  9. Open xxLEFT.mp2 in Audacity - set the track as "left".
  10. Open xxRIGHT.mp2 in Audacity - set the track as "right".
  11. Copy this track into xxLEFT.mp2.
  12. Select "Make Stereo Track" and export the resulting file as your finished product.
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 (up to ultrasound) set as parameter:
#!/bin/bash
 dur='3:00:00'
 sox -r44100 -c1 -t sl - -r44100 -c1 -t sl - synth $dur sine $1 < /dev/zero |  sox -r44100 -c1 -t sl - -r44100 -t ossdsp /dev/dsp
 
Midi Sequencers
On this system I use Muse.
It is quite different and less powerfull than Rosegarden. It uses the jack server and starts it itself. 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.
To see which instruments are associated with which program-change events, look at /etc/timidity/gravis/gravis/cfg

Capturing Web-videos
  1. Install the Seamonkey Add-on FlashGot from the Add-Ons manager.
  2. Play a Web-vido on Seamonkey
  3. From the Menu item "Tools" subitem "FlashGot" select FlashGot Media(n) - n=1,2,... and save the contents. Note: if n > 1 you should cancel the downloads in Download Manager that you are not interested in!
The result is a file with suffix .flv which can be converted to other formats.

Video Players
I have installed: vlc, mplayer, and totem. All of them work OK. VLC is my personal favourite by far. However the exception is playing captured TV on an USB stick (xxx.ts files). This works without hiccups only with mplayer. One has to use keyboard shortcuts to navigate through the file (skip forward and backward etc.) - see man mplayer.

Video Editing
To change the size of a video-file use ffmpeg with the -s parameter, here the new size is 640x480::
ffmpeg -i videofilein.avi -s 640x480 -r 24 videofileout.avi

To convert a flash video-file to mpeg use the following::
ffmpeg -i videofilein.flv videofileout.mpeg

To convert an avi file to mpg format (mp4) and save up to 92% of disk space:
ffmpeg -i videofilein.avi videofileout.mpg

Other formats to convert from/to: mov. ogg and flv. The .ogg format saves even more space but the quality is low.

If you get an error like "MPEG1/2 does not support 12/1 fps" try the following:
ffmpeg -i videofilein.avi -r 24 videofileout.mpg

Audio problems can sometimes be fixed by using the -ar option. Every target format can have only a distinct number of sampling rates, one of which you have to use:
ffmpeg -i inputfile.avi -ar 11025 outputfile.flv

Other formats require setting of audio and size, for instance:
ffmpeg -i inputfile.qt -s 352x288 -ar 8000 outputfile.3g2

Some formats - like .ts from a USB disk capture from a set-top box - cannot be converted by ffmpeg. Use instead:
mencoder inputfile.ts -oac copy -ovc copy -o outputfile.mpeg

Other conversions: To rotate (and at the same time compress) a video file use mencoder with the rotate option:
Example: Rotate 90 degrees clockwise
mencoder -vf rotate=1 -ovc lavc -oac copy videofilein.avi -o videofileout.avi
Or: Rotate 90 degrees counterclockwise
mencoder -vf rotate=2 -ovc lavc -oac copy videofilein.avi -o videofileout.avi

To just compress avi video files:
mencoder -ovc lavc -oac copy videofilein.avi -o videofileout.avi

To compress avi video files converting them to quicktime:
mencoder -ovc lavc -oac copy videofilein.avi -o videofileout.qt

To compress avi video files converting them to ogg:
ffmpeg -i videofilein.avi -r 36 videofileout.ogg

To edit videos with a gui (not always as powerful as the line commands):

kino videofile.avi or some other formats - like mpeg. The file will be converted to the native format. There you can do - inter alia - some simple editing like splitting the file into scenes and cutting the unwanted ones. At the end export the whole thing and convert it to whatever type you prefer.

More on video editing: http://www.yolinux.com/TUTORIALS/LinuxTutorialVideo.html

Creating DVDs and Video CDs
Devede has a nice help facility that explains how to do it. I installed:
devede, mencoder, vcdimager and dvdauthor.
Start up devede and follow the instructions. It uses a separate directory for each DVD od VCD created. It converts the video file format to one suitable for DVDs / VCDs. This process takes a very long time even on a powerful PC! Once everything is done, devede creates EITHER a .cue and a .bin file in the directory OR an .iso file.
Use k3b with function "burn image" and select the .iso (or in case of .cue/.bin) the .cue file. This burns the image to a blank DVD or (if it fits) to a blank CD, that can be played as a regular DVD.

Browsers
In the meantime all serious browsers have learnt the basics like Javascript and non ISO-8859-1 charactersets.
Seamonkey Is part of a whole suite of applications; it has an integrated composer. New versions come out frequently. Often however older versions are more stable.
IceApe Is a "free software only" version of Seamonkey, it's several versions behind Seamonkey.
Trick: To copy an e-mail from an .eml file to the local mail-folders, open the .eml file in IceApe and do a "Message" "Copy to" selecting the target folder. Note that this does no longer work in Seamonkey - the corresponding menu-items are greyed out!
Firefox seems very similar to Seamonkey. It is more stable, but just a stand-alone browser.
IcaCat Is a "free software only" version of Firefox, it's several versions behind Firefox.

Plug-Ins
To play audio-, video-, and many other more exotic files on web pages, browsers must be provided with plug-in modules. Lately this process has been very much obscured with little clear information which browser searches which places in what sequence for plug-in information, resulting in some unpleasant surprises.

Mozplugger
Is similar to the old plugger, I installed mozplugger 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.

Shockwave Flash
To play Flash-Player files you have to have the Shockwave Flash player. It is in the Mageia rpm repository.

RealAudio
To play RealAudio files and streams you have to have the RealAudio player. It can be downloaded from the web. I use: RealPlayer11GOLD

Java
Information about that is particularly obscure - use a search engine. See Bugs and idiosyncrasies I came across.

HTML Editors
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:
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.
LibreOffice 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.

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 I have tested a few times, it is similar to ekiga.

Echolink
This is for licensed Radio-Amateurs only: Install echolinux-0.17a-4.fc11.i586.rpm

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

FTP Programs
There is of course the good old line command cmdftp -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. It is contained in the Mageia rpm repository.
I used 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!
rpb DB by distros
Mageia Site
Mageia Wiki
Mandriva Site
Mandriva Wiki
Linux Distros
Blag
Damn Small Linux
Debian
OpenSuSe
Knoppix
Lubuntu
Linux Home Networking
Kernel repository www.kernel.org
LINUX Magazine - Hints, Tips etc
LINUX USB Information
Fluxbox Window Manager
Openbox Window Manager
IceWm Window Manager
Jwm Window Manager
Idesk Desktop
KDE
Gnome
Seamonkey
Firefox/Thunderbird
IceCat - GNU version of Firefox - and other free software
Nedit
Xfm Page
WINE
Timidity
Media Player
O'Reilly LINUX Devcenter
Printers suitable
LINUX Howto
LINUX Video Tutorial
The Linux Bootdisk HOWTO
Applications - plenty!
Abi Wordprocessor
LibreOffice
Shockwave Flash Player
How To 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
Bash Shell Programming in Linux
Advanced Bash-Scripting Guide
Menu driven scripts - NCURSES
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 my home-page
Free Web Hosting