My Linux tips and tricks page part 1. Many useful commands for Ubuntu and Linux Mint.

My Linux tips and tricks page, Part 1.

Go to part 2.

Setting up your BASH prompt.

A nice BASH shell prompt. This shows the current time and the current folder you are in as well as a full directory path if you are in a subfolder.

PS1="-\t-- \u@\h [\w]\$ "

How to set the contents of the xterm title bar. Using the PROMPT_COMMAND variable. This displays the current directory path in the titlebar. Very useful indeed.

# Setting the value of the Xterm title.
# Only if we are in X...
if [ $DISPLAY ] ; then
	PROMPT_COMMAND='echo -ne "\033]0;${OSRELEASE}: ${PWD}\007"'

This function will scan a folder and find any symbolic links that do not point anywhere. Very useful indeed.

function badlink()
# From Atomic magazine #43 August 2004.
	DEFAULT=$(tput sgr0);
	[ -e $FILELIST ] && $( rm -fr $FILELIST )
	function checklink()
		for badlink in $1/*; do
			[ -h "$badlink" -a ! -e "$badlink" ] && echo \
			\"$badlink\" >> $FILELIST
			[ -d "$badlink" ] && checklink $badlink
	for directory in `pwd`; do
		if [ -d $directory ] ; then
			checklink $directory;
	if [ -e $FILELIST ] ; then
		for line in $(cat $FILELIST); do
			echo $line | xargs -r rm | echo -e "$line \
		rm -fr $FILELIST
		printf "Bad symlinks not found.\n\n"
} # End Atomic function.

How to find out what your IP address is. Using ifconfig and awk.

sudo /sbin/ifconfig eth0 | awk '/inet/ { print $2 } ' | sed -e s/addr://

More useful variables to have in your ~/.bashrc.

# Setting a blinking block cursor for the console.
echo -e '\033[?6c'
# try to set DISPLAY smart (from Hans) :)
# From a SUSE .bashrc file.
if test -z "$DISPLAY" -a "$TERM" = "xterm" -a -x /usr/bin/who ; then
	WHOAMI="`/usr/bin/who am i`"
	_DISPLAY="`expr "$WHOAMI" : '.*(\([^\.][^\.]*\).*)'`:0.0"
	if [ "${_DISPLAY}" != ":0:0.0" -a "${_DISPLAY}" != " :0.0" \
		-a "${_DISPLAY}" != ":0.0" ]; then
		export DISPLAY="${_DISPLAY}";
export EDITOR=mcedit
export TIME_STYLE=+" %d-%m-%y %I:%M %P"
# These two examples from bash-doc.
export PAGER="/usr/bin/less"
export VIEWER="mcedit"
export LESS="-i -e -M -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-..."
shopt -s checkwinsize
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"

Getting started with Linux.

The Linux virtual terminal in action.
The Linux virtual terminal in action.

Getting started with Linux for the first time is intimidating if you want to use the Linux command-line and you do not know the commands to use the prompt to its full potential. The best way to get acquainted with the Linux system after installation is to open the Gnome terminal or the Konsole and type man intro. An excerpt from this manual page is shown below. This manual page will give you a quick introduction to the BASH shell or Bourne Again Shell, this is the default shell prompt for Linux, there are others such as the sh shell, as well as Ksh, Zsh and Csh, but the Bash shell is the easiest and most common shell used by Linux distributions. If you wish to type a command such as cat myfile.txt you do not need to type the whole command. You may type: cat my[TAB], ie type cat my then press the TAB key to auto-complete the command. Once you get used to using the TAB key to auto-complete the commands you are typing on the Linux command line the process will become very fast indeed. Using TAB will show a list of possible completions of a command making it clear what you need to type. You may also use wild-cards, ie typing ls DS* in a folder full of files will show a listing of all of the digital camera pictures that are in the folder. or ls -l *.jpg to list all of the jpg files in that folder.

The man intro command will print an introduction to the Linux shell. There is a hypertext copy of this manual page here:

This is a very good way to learn the basic commands to navigate around your UNIX/Linux system with the command line. And my Linux PDFs here: You can even type man man to learn about the man command and how it works. A manual page that has 1 at the end, for example ls(1) is a command manual page. A manual page such as printf(3) is a manual page for a programming function. Sometimes a command and a function like printf() share the same name, in this case type man 3 printf to access the desired manual page.

To list a folder like in DOS, type ls -la to list the files vertically. If you type ls -hula, then the file listing will use kilobytes and megabytes instead of bytes in the filesize column.

Creating a zip file containing a file with the Linux command line is very easy. Just use the zip command that should be included with your Linux distribution. The -8 parameter is to increase the level of compression applied to the file. You can use -9 for even more compression.

john@deep-thought:~/Documents$ zip -8 phobos3.wad
updating: phobos3.wad (deflated 64%)

Using the finger command to list all logged in users.

This is easily achieved at the terminal prompt. Just type: finger $LOGNAME and the command will list all logged in users. See the example below.

john@deep-thought ~ $ finger $LOGNAME
Login: john           			Name: John Cartwright
Directory: /home/john               	Shell: /bin/bash
On since Mon Jan 30 21:15 (EST) on tty2    1 day idle
On since Mon Jan 30 21:15 (EST) on tty3    1 day idle
On since Tue Jan 31 22:42 (EST) on pts/5 from :0.0
No mail.
No Plan.
john@deep-thought ~ $

You may also put this in your ~/.bashrc and this will print this information every time you open a terminal window.

if [ -x /usr/bin/finger ] ; then
   INFO=$(finger -lmps $LOGNAME | sed -e "s/On/Logged in/g" | grep "since" )
   INFO=$(uname -msov)
echo -ne "${INFO}\n"

Mounting an improperly shut down Windows XP installation with Knoppix 6.4 Linux.

I recently found an old hard disk with a Windows XP installation on it and I was trying to mount it with the GUI file manager, but I kept getting errors that the disk had a hibernation file on it and I could not mount the drive. I found out that I had to use this command to mount the disk.

[email protected]:/home/knoppix# mount -t ntfs-3g -o remove_hiberfile /dev/sdd1 /media/sdd1

This command repaired the errors in the file-system and mounted the drive allowing me to access the contents.

Suspend to disk in Fedora Core 15 with the command-line.

Suspending your machine from the command line in Fedora Core 15 is very easy with the pm-suspend command. this command requires root privileges but this is no real problem and this means that you do not need a GUI to suspend your machine.

[email protected]~# pm-suspend

More information here: This is an awesome tip, meaning that your system will shut off very quickly and come back up in a couple of seconds. Ubuntu advertise they can boot up in 10 seconds, but with suspend to disk allows you to bring your machine back up much faster than that. And it will save your open login sessions so that you may pick up right where you left off. The Linux suspend and resume works faster than it does in Windows 7, and Linux is more reliable than the operating system from Redmond any day. The strange interface in Windows 8 will not be popular with everyone who is intending on using that abominably ugly operating system.

Linux Uptime.

Very long Linux uptime. This is Mandrake Linux 10.
Very long Linux uptime. This is Mandrake Linux 10.

The Linux operating system can run for a very long time between any re-boots, there have been Linux machines that have been running for seven years without a re-boot, try that with Windows. Sure Windows 7 is pretty reliable but I have had a few BSODs even on that modern operating system, whereas Fedora Core 15 has never let me down. This screenshot shows the longest uptime I have had, 52 days with Mandrake Linux 10. A very good and stable operating system indeed. SUSE Linux 9.2 and 10 were also awesome Linux distributions, the SUSE 9.2 DVD I had was an 8.5 Gigabyte dual layer disc with every program on it you could ever want.

Killing a running program in BASH.

To kill a running program in the BASH shell you must first find the PID of the running application:

14:28:58-thx@matrix Documents >$ pidof bash
9032 8609 8441 6547 1348

or this way… Using ps and grep to find all running instances of BASH.

14:29:10-thx@matrix Documents >$ ps ax | grep bash
 1348 ?        S      0:00 /bin/bash /usr/sbin/ksmtuned
 6547 tty2     Ss+    0:00 -bash
 7378 ?        Ss     0:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/startkde"
 8441 pts/1    Ss     0:00 bash
 8609 pts/1    S      0:00 bash
 9032 pts/2    Ss     0:00 bash
 9062 pts/2    S+     0:00 grep --color=auto bash
14:29:51-thx@matrix Documents >

Once you know the PID of the program that you want to kill, you may use the kill command to get rid of that running program.

kill 9032

or if it is a stubborn program that will not die you will need to be more persuasive:

kill -9 9032

Using Linux as your alarm clock.

Just copy these two lines shown here into your crontab using the crontab -e command and then copy an mp3 file into your home folder and name it to match the file referred to in this file and it will play automatically in the morning as your alarm clock. Using mplayer is fine, it can run without any display and play music as well as movies. The crontab -l command allows you to view the crontab and review the contents to make sure they are correct.

[12:31:20-*-homer@hungry-forest ~]$ crontab -l
# Edit this file to introduce tasks to be run by cron.
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# For more information see the manual pages of crontab(5) and cron(8)
# m h  dom mon dow   command
30 8 * * * mplayer "/home/homer/sun.mp3"
40 8 * * * mplayer "/home/homer/sun.mp3"

Recording TV with VLC.

VLC settings panel.

I was wanting to record television from my Compro T-300 video capture card and I could not get the sound to record properly from the line-in port. There would just be silence when the file was played back. I have the volume muted in alsamixer for the line-in port and when the VLC program is accessing the TV card I can still hear sound, I found out that the volume setting as pictured in the screenshot to the linked above had to be a non negative setting to be able to record any sound. Very simple once you know how to do it but it had me stumped for ages working this out. I probably could have the volume set to stereo instead of mono, but that does not matter, now I can record sound to my video files and record TV programs to watch again later.

Windows has myriad software options to record TV of varying quality, and it is about time that Linux had comparable software options that can allow you record television programs and you can also play a DVD or a Xvid file in VLC and press the red record button and it will capture the video to a video file. That is useful for capturing a clip from a movie to another file that you can put up on Youtube and show to the world. The Blaze DTV software for Windows is a good example of video software that can record from a webcam or video capture card. It saves as a mpeg file and VLC saves to a avi file, but the file sizes are huge and you need a lot of disk space to be able to store the files, but mencoder can be used to transcode the files to a more compressed format to save space.

Due to the flexibility of Linux, this is easily achieved with free software. I have purchased the Blaze DTV 6.0 software before when I was running on Windows XP, but I prefer the freedom and stability of Linux and UNIX over Windows these days. There are many and varied malware and spyware attacks directed at Windows and it is better to run something more secure and reliable over a insecure and attack prone operating system with a built in web browser, Internet Explorer that in it’s version 8.0 incarnation is just as vulnerable to attack as the IE 6.0 web browser. The Firefox web browser should always be installed and only use Internet Explorer once to visit and download a proper and more secure web browser that will not be a conduit for every bit of malware under the sun. The Internet Explorer web browser has always been a thorn in the side of the Internet and if we got rid of that unfixable heap of code the Internet and it’s denizens would be better off indeed.

A Mac computer is very good though, as you can use a UNIX terminal emulator application and ssh, that means you can log into remote servers with it and update your website. The Mac gets a bad rap, but I actually like them as they run a variant of the UNIX BSD system and they are stable and reliable which is more than can be said about Windows.

Updating OpenSuse 11.4.

To do a proper update of OpenSuse 11.4 you can type these commands.

sudo zypper ref && sudo zypper up

But typing sudo zypper dup will make sure all of the updates are installed, like typing sudo apt-get dist-upgrade on Ubuntu or Debian.

Useful Linux commands.

Reading just the start or ending of a file.

When you just want to see the start or ending of a file this command will help.

head -n 40 data.txt

This will output the first 40 lines of the file.

tail -n 40 data.txt

will output the last 40 lines.

Converting videos to play on a Sony PSP.


This works perfectly when using the avidemux package available in most package repositories providing an easy to use GUI to transcode video files into other formats. The screenshot to the left shows the program being used to convert a video file to play on a Sony PSP gaming device. My Playstation Portable has the version 5.03 frimware and works perfectly when playing these video formats. Then once the video file is converted into the proper PSP format, then copy it onto the portable device, copying it into the VIDEO folder with the .MP4 extension, the rest of the filename can be anything you want, this is a good way to copy youtube videos onto your PSP device and watch them whenever you want.

I tried to use mencoder to transcode the video files but it does not seem to work anymore. Same with ffmpeg, but this software works very well, it can also transcode video to play on an Apple Ipodtm. I have not tested that though I do not have an Ipod, but I am sure it would work perfectly. Avidemux is a very useful and easy to use program and is more fun to use than copying very long command lines from the Internet for mencoder and ffmpeg and not having them work. With the impending release of the new Sony PSP, this program should be very popular, hopefully the new PSP will have inbuilt storage of at least 40GB. That would be cool.

Fedora Core missing command support.

I have discovered when I tried to run the command ‘mc’ on Fedora Core 14, it was not installed and it started a package manager that offered to install the missing program. Now that is very useful. and if you want to find out where the console fonts are so you can change the default font, just type locate cybercafe and it will tell you they are in /lib/kbd/consolefonts. iso02-12×22.psfu.gz is a good choice.

Watching TV with mplayer.

Use this command to watch television from your capture card. Mine is a Compro DVB-T 300, with tuner and composite as well as S-Video inputs.

mplayer -tv input=1 tv://

Recording TV to an Xvid file.

This script records television from a capture card to an Xvid file. Just put it into ~/bin and make it executable with chmod +x This records in very good quality, and you could upload the results straight to youtube. Very useful for recording something whilst you go out for a bit and you will not miss your favorite television program.

# Records tv to Xvid file.
DATE=$(date +"%H:%M:%S:$A:%F")
mencoder -cache 512 tv:// -ovc xvid -xvidencopts bitrate=1350:trellis:vhq=2:\
qpel:psnr:autoaspect -tv driver=v4l2:width=720:height=576:input=1 -fps 24 -oac\
 mp3lame -lameopts cbr:br=128 -endpos 03:00:00 -o ~/Videos/record-$DATE-.avi \
> /dev/null

Installing NVIDIA drivers on GNU/Linux.

To install the NVIDIA drivers in Ubuntu or Linux Mint, you need to log out of your desktop back to the GDM login manager, then press CTRL-ALT-Fto get to the text console and login as your user and then type:

sudo /etc/init.d/gdm stop

This will stop the login manager and then you can install the drivers by typing:

sudo sh ./

And follow the prompts and the drivers will be installed. Make sure you say yes to updating your xorg.conf file to enable the nvidia driver when loading Xorg.

Installing expansion packs in Darkplaces quake.

When running Darkplaces Quake on Linux and you want to install the expansion like Scourge of Armagon for example, then you need to extract the PAK files that it comes with and create a folder under the Quake directory like armagon/ and then put all of the PAK files that the expansion comes with and then start Darkplaces quake like this.

makron@localhost ~$ ./darkplaces-linux-686-sdl -game armagon

Then it will start and you can play Scourge of Armagon. Easy. The directory structure should look like this.

total 19148
drwxrwxrwx   5 makron makron    4096  28-04-10 04:55 pm .
drwxr-xr-x 183 makron makron   12288  30-04-10 06:10 pm ..
drwxr-xr-x   3 makron makron    4096  28-04-10 04:58 pm armagon
-rwxrwxrwx   1 makron makron   25462  12-07-96 05:31 pm comexp.txt
-rwxrwxrwx   1 makron makron   25920  12-07-96 05:31 pm cwsdpmi.exe
drwxrwxrwx   3 makron makron    4096  10-01-10 11:21 am
-rwxrwxrwx   1 makron makron 1873619  28-01-09 09:16 pm
-rwxrwxrwx   1 makron makron 1779712  28-01-09 09:17 pm darkplaces.exe
-rwxrwxrwx   1 makron makron 1657344  28-01-09 09:19 pm darkplaces-linux-686-dedicated
-rwxrwxrwx   1 makron makron 1724316  28-01-09 09:19 pm darkplaces-linux-686-glx
-rwxrwxrwx   1 makron makron 1721116  28-01-09 09:19 pm darkplaces-linux-686-sdl
-rwxrwxrwx   1 makron makron 1833872  28-01-09 09:21 pm darkplaces-linux-x86_64-dedicated
-rwxrwxrwx   1 makron makron 1912328  28-01-09 09:21 pm darkplaces-linux-x86_64-glx
-rwxrwxrwx   1 makron makron 1905448  28-01-09 09:21 pm darkplaces-linux-x86_64-sdl
-rwxrwxrwx   1 makron makron 1760768  28-01-09 09:17 pm darkplaces-sdl.exe
-rwxrwxrwx   1 makron makron  148350  30-09-08 09:47 pm darkplaces.txt
-rwxrwxrwx   1 makron makron   84207  13-08-08 02:47 am dpextensions.qc
-rwxrwxrwx   1 makron makron   17408  12-07-96 05:31 pm genvxd.dll
-rwxrwxrwx   1 makron makron    4751  12-07-96 05:31 pm help.txt
drwxrwxrwx  13 makron makron    4096  28-04-10 04:55 pm id1
-rwxrwxrwx   1 makron makron  234791  03-11-07 08:22 pm libcurl-4.dll
-rwxrwxrwx   1 makron makron  114688  03-11-07 08:22 pm libjpeg.dll
-rwxrwxrwx   1 makron makron  207681  20-12-07 02:36 pm libmodplug-0.dll
-rwxrwxrwx   1 makron makron   16533  14-11-07 08:14 am libogg.dll
-rwxrwxrwx   1 makron makron  207964  10-05-08 12:34 am libpng12.dll
-rwxrwxrwx   1 makron makron  158049  14-11-07 08:14 am libvorbis.dll
-rwxrwxrwx   1 makron makron   32505  14-11-07 08:14 am libvorbisfile.dll
-rwxrwxrwx   1 makron makron    4031  12-07-96 05:31 pm licinfo.txt
-rwxrwxrwx   1 makron makron   44326  12-07-96 05:31 pm manual.txt
-rwxrwxrwx   1 makron makron    9883  12-07-96 05:31 pm mgenvxd.vxd
-rwxrwxrwx   1 makron makron    3869  12-07-96 05:31 pm order.txt
-rwxrwxrwx   1 makron makron   26511  12-07-96 05:31 pm
-rwxrwxrwx   1 makron makron   18892  21-03-97 04:58 pm PMPRO16.DLL
-rwxrwxrwx   1 makron makron   32768  21-03-97 04:58 pm PMPRO32.DLL
-rwxrwxrwx   1 makron makron      65  12-07-96 05:31 pm q95.bat
-rwxrwxrwx   1 makron makron  314880  12-07-96 05:31 pm qlaunch.exe
-rwxrwxrwx   1 makron makron  396288  12-07-96 05:39 pm quake.exe
lrwxrwxrwx   1 makron makron      24  19-04-10 08:39 pm quakenix -> darkplaces-linux-686-sdl
-rwxrwxrwx   1 makron makron    2855  31-03-10 05:01 pm quake.PIF
-rwxrwxrwx   1 makron makron   32256  12-07-96 05:31 pm quakeudp.dll
-rwxrwxrwx   1 makron makron     438  20-07-07 12:25 am readme-sdl.txt
-rwxrwxrwx   1 makron makron   18853  12-07-96 05:31 pm readme.txt
-rwxrwxrwx   1 makron makron   10862  12-07-96 05:31 pm rlicnse.txt
-rwxrwxrwx   1 makron makron  321536  03-01-08 05:39 pm sdl.dll
-rwxrwxrwx   1 makron makron   76067  12-07-96 05:31 pm techinfo.txt
-rwxrwxrwx   1 makron makron   27542  21-03-97 04:58 pm WDIR16.DLL
-rwxrwxrwx   1 makron makron   40960  21-03-97 04:58 pm WDIR32.DLL
-rwxrwxrwx   1 makron makron       5  21-03-97 04:58 pm WDIRNOP.COM
-rwxrwxrwx   1 makron makron     995  21-03-97 04:58 pm WDIRNOP.PIF
-rwxrwxrwx   1 makron makron  553472  22-03-97 02:20 pm WINQUAKE.EXE
-rwxrwxrwx   1 makron makron    1226  22-03-97 08:52 am WQ.BAT
-rwxrwxrwx   1 makron makron   47996  22-03-97 11:38 am WQREADME.TXT
-rwxrwxrwx   1 makron makron   59904  14-11-07 08:14 am zlib1.dll
total 86424
drwxr-xr-x 3 makron makron     4096  28-04-10 04:58 pm .
drwxrwxrwx 5 makron makron     4096  28-04-10 04:55 pm ..
drwxr-xr-x 2 makron makron     4096  28-04-10 04:57 pm id1
-rw-r--r-- 1 makron makron 18689235  25-12-96 09:32 am pak0.pak
-rw-r--r-- 1 makron makron 34257856  25-12-96 09:32 am pak1.pak
-rw-r--r-- 1 makron makron 35527205  25-12-96 09:32 am pak2.pak
total 8
drwxr-xr-x 2 makron makron 4096  28-04-10 04:57 pm .
drwxr-xr-x 3 makron makron 4096  28-04-10 04:58 pm ..

Using strings to search elf binary executables.

Using strings is very easy, you can just use it with grep(1) to search through binaries and other non-text files to find various strings. This is useful for finding illegal content on a hard drive partition or searching through an executable file to find text strings.

strings -a ./doom | grep "final"
Now, it's on to the final chapter of
final confrontation with that terrible
final cleaning-up ...
level 24: the final frontier

The above command searching a linuxxdoom binary gives us this output. It has found all instances of the word final in the linuxxdoom executable. See how useful this is? Try it yourself! Try searching MP3 files for the ID3 tag data.

Using this command on the pagefile.sys file that Windows uses, you can find all sorts of things that the user has been accessing on the Internet and find E-Mail addresses and URL strings that will be recorded in this file. This is a good indication that if you are using Windows, you should try and set up your machine so that the pagefile is erased when you shut down.

mencoder video recording.

I was trying mplayer for watching tv on my Linux box and I did some looking and I have found out the best way to record TV with mencoder.

mencoder -tv input=1:norm=PAL:width:640:height=480 tv:// -oac mp3lame -ovc xvid -xvidencopts bitrate=1200 -o tvout.avi

The input=1 option tells the v4l driver to use the composite video input to record from, as I have a VCR plugged in to the capture card to be able to watch tv easily and record/timeshift shows. The output of mencoder will tell you which inputs are available. You need to have mplayer compiled with tv support to be able to use this feature, but it works very well.

Canon MP210 in Ubuntu Karmic.

I managed to get this working in Ubuntu Karmic. I ran system-config-printer and selected the Canon MP150 printer driver to use and followed the prompts and then I put in some paper and printed a test page and it worked first time. I do not recommend trying to install the drivers from source if you can just do it this way and it will work. This should work for everyone, it worked for me and is worth trying.

Converting Youtube videos to MP3.

This is quite easy. This video displays the process required and this is so easy to do once you know how. You can paste the url of the video you want to download into And download the file and then use this technique to convert to MP3. The KID3 ID3 tagger for KDE is the best program for adding the ID3 tags to your files once you have the MP3s. It does not take too long to do this and get your files organised does it?

React OS getting better with each release.

ReactOS screenshot. This is the ReactOS running in qemu, this is the free operating system compatible with Windows that will be able to run Windows applications. This is very promising and it would be good for Microsoft to have some competition these days when they are trying to dominate the computing market. I love the fact that the commercial Windows OS is not the only one available, and we can choose a free open source version if we want to. This makes a huge difference when you are using something that is not made by a huge uncaring corporation like Microsoft. They do not care about the end user, they just want you to give them your money and for you to run the insecure and virus prone operating system that is only for those who are forced to use this at work or are using it at the town library or Internet cafe. Windows runs OK on my mates systems but some people seem to have problems with Windows and various hardware and software issues. This should not happen these days, but it is an unfortunate reality. This is the website of this project, the ISO zipped image is only about 33 Megabytes and runs with qemu, just use qemu -cdrom ReactOS-LiveCD.iso to run the ISO image on your desktop. And it runs quite well in qemu even without the kqemu kernel module. This operating system is looking awesome and I cannot wait for it to be out of beta status and taking on Windows, as I will be using it and I am sure that a lot of people cannot wait for this to be completed. There are videos of people running Unreal Tournament on React OS and I am sure you could get Doom Builder 2 and Zdoom running on this OS very soon. If I could run Winamp 5, Doom Builder 2 and Zdoom on this then I could replace Windows XP. And it would be more secure and safe than Windows XP. I would love to be able to install the Nvidia drivers and get Dark Places quake running on React OS. I know there is Wine and Cedega for Linux, but I believe that a dedicated OS that is compatible with Windows applications is a much better idea and will be awesome in the future. Just imagine if you will a free version of Windows XP SP2 that is more secure and stable than the shit Microsoft release that is full of bugs and is insecure and vulnerable to spyware and adware and is a laughing stock compared to Linux and UNIX Operating Systems that have security at there core.

BSD is very secure and does not have the problems that are dogging Fedora 12 right now. It is unimaginable that they would allow unpriviledged users to install packages with superuser priviledges without checking what they are. Package installation is done byt the superuser and not by and unpriviledged user, I mean it boggles the mind, I use sudo on my machine, but that asks for my password and I would lock down my system if it was shared with other users so they could not use superuser priviledges to install anything they wanted. That security mentality is just idiotic. I would never want any company that cares about security to hire these morons that work at Redhat. Open Solaris or FreeBSD would be more secure by default than Redhat Operating Systems if this continues. I run Ubuntu and it is pretty secure. And it does not have the Windows Registry which gets bloated and corrupted and slows down the machine and leads to crashes and errors as well as lowering the performance of the machine. Then you need to re-format and re-install Windows. And there is the black screen bug in Windows 7 that happens after you log in to the desktop. That is a joke that is for sure.

I cannot believe that Microsoft cannot fix this at all, they should put out a patch to fix this, or is it unfixable? I believe not, I believe that they can fix this, maybe they should re-code windows from scratch and build a whole new operating system that does not have the problems that the current codebase has in spades. A whole new operating system would give them the chance to remove the Registry and start anew with something else. Then Windows would be faster and more stable like Linux and UNIX have been for decades. If there was more peer review of the code before submission, then there would be less errors and crashes in the operating system and this would help considerably with the user experience and confidence in the operating system and there would be more happy Windows users. I use Ubuntu and I am happy with that, but I use Windows XP Home sometimes to run Doom Builder 2 and the occasional game like Quake3 and Quake2 and even Neverwinter Nights. I will be happy when ReactOS is finished and I can run these applications on that free OS.

Ubuntu 9.04 xcdroast accessing /usr/bin/cdrecord.

Xcdroast usage as covered here.

Cd Roast.

With the latest version of vanilla cdrecord from I have managed to get Xcdroast working on Ubuntu Jaunty. It was not hard, you just compile and install cdrecord, which goes under /opt and then replace the symlinks under /usr/bin to cdrecord that link to wodim and change them to point to the cdrecord and mkisofs & friends binaries under /opt/schily/bin/ then you can run xcdroast as root with sudo xcdroast and setup the program. You just need to add your user and setup the CD/DVD writing hardware and the path to your temporary files folder, Exempli Gratia /tmp. I do not know why those on the Ubuntu mailing lists can not work out something so simple. But it is that easy. I just created a 3 gigabyte iso image backing up all of my most recent files and burned it to a DVD-R with Xcdroast and it worked perfectly. I have always liked using Xcdroast and now I can use it in Ubuntu it is even better. This program is broken in Ubuntu Karmic as well, but at least if you are reading this you will be able to fix it easily.

This is the good thing about GNU/Linux, you always have the vanilla versions of the programs source code available so you can replace the version you have with the unmodified version to fix problems. This is not possible on Windows. That is why Linux rules over Windows. Now I can experiment with multisession DVD burning with Linux and Xcdroast whenever I want. I want to try burning a Linux distro ISO to the disk and use the rest of the space to burn more files like a magazine cover DVD like Linux format. Although Linux+ and Linux User And Developer are also good magazines to read about Linux. I have been using Linux since Redhat 6.2 and Turbolinux, so I know what I am talking about when I mention Linux. Everything works on Linux now, Flash and movie watching and listening to music with Xmms and playing doom and using Office productivity applications like Openoffice and Evolution for E-Mail. I am using Linux every day now I only re-boot into Windows occasionally to use Doom Builder 2 and play Unreal and/or Quake 3.

Linux/Unix distributions I have used.

  • Redhat 6.2.
  • Debian 3.0.
  • Mandrake Linux 9.0
  • Mandrake linux 10
  • Free BSD.
  • Open Solaris.
  • Suse 9.2
  • Suse 10.1
  • Suse 10.2
  • Ubuntu 8.10
  • Ubuntu 9.04

Free BSD is a good operating system and has the ports system to install more software.

Youtube Ubuntu haters.

Qemu OS. Name this OS and you are good. I got this off the ‘net a new version of an old OS. There is also the new version of DOS called freedos and reactos that is the free OS that can run Windows programs. And I bet it will be slightly more secure too. And there is the new version of the Amiga OS. When the Reactos is finished then it could definitely be a good alternative to the Windows Operating System from Redmond. Ubuntu is my favourite Operating System right now and I will not swap that for anything. I have used DOS 3.3 and MS DOS 5 and 6.22. DOS 5 sucks arse through a straw. I have downloaded and compiled a new kernel for Linux ( and I got my Compro DTV T-300 TV tuner card working, which will not work with the default kernel. But now it works very well, you have to go into the video for Linux options and select the right video capture card drivers. It should work right with the default kernel, but this Ubuntu 9.04 distribution is still a good version of Linux and is quite stable despite what some haters on Youtube say. They are only Windows drones who do not even give another OS a true test before they say that it does not work as well as Windows, when Ubuntu and Linux Mint really do run very well on modern hardware. They would not have a chance installing something like FreeBSD. If I and people like me are used to using Linux and are happy with it, then that is good. Do not criticise that.

There are videos on youtube showing people that try to install Ubuntu on a old laptop and the installation program will not display, there are just wavy lines instead and they just dismiss that as being evidence of Ubuntu’s failings when they have no idea about how to fix it and just assume that is evidence of Linux being broken. The hardware might not be fully supported. I have had not many problems with Linux ever since Red Hat Linux 6.2 and Debian 3.0 and Mandrake Linux 9 and 10 and then OpenSuse 9.2 and then 10.1, 10.2 and then Elive and now Ubuntu. I have even installed Free BSD and tried Open Solaris UNIX. New Linux users just need to do more research on all of the forums and websites that are dedicated to helping Linux users with their problems. At least they have the Internet and forums and countless websites to look for information on what to do. If they were back in the days of the Cray X-MP / 48, they would not have the Internet and all those webpages to tell them what commands to type, not in 1987.

And imagine loading a game off a tape reel instead of a CD or DVD? Maybe the Biggest computer was the Mark 1 in 1944. It had 500 miles of wire and 3 million electrical connections. A simple Multiplication could be done in six seconds and twelve seconds for a division. The ENIAC or Electronic Numerical Integrator And Calculator was unveiled in 1946. The machine was 100 feet long, 10 feet high and had 18000 vacuumn tubes in it. It also consumed 140 kilowatts of electricity when it was running. I am sure that the server farms running Entropia Universe consume more than that nowadays though. I am sure that those knocking Ubuntu do not even know what a DEC PDP-8 is. Or a Tandy 1000 PC. Those were the days, when you had a 10 Megabyte hard disk that you had to fit DOS on and all of your applications.

Could they even decode this?


I thought not. Answers on a postcard.

Windows 7 is due to be released soon and although the desktop OS has copied untold components and techniques from Apple OS and GNU/Linux it will still sell by the bucketload despite being overpriced in Australia. But people will buy Windows even though it has many security issues, and even though I have said bad things about Ubuntu in the past at least it does run faster and better than Windows 7. I have tried Windows 7 and given it a fair trial but even with a Geforce 6200 256MiB card and 1.5 GiB of RAM and a Athlon 1800+ CPU it was actually quite slow. Slower than Windows XP and obviously slower than Ubuntu. I would have thought that it would be so optimised by now since Microsoft have had quite a lot of time and experience to get it to run super fast, but I guess not.

The powershell is quite good, but can not match the bash shell running in an xterm or Eterm that I am using at the moment. And I am editing this HTML page in vim, which Windows 7 has not a match for. Sure it has notepad and Wordpad but they are no match for vim or GNU Emacs. And I would rather jump into a pit full of piranha than use IE8 for browsing the world wide web. That browser is poor at rendering modern CSS. I get some visitors using IE6.0 but whatever floats your boat I guess, but Mozilla. Mozilla based browsers are free and give more security than the alternative browsers like the afforementioned Internet Explorer browser which is legendary for security holes. Just thinking about how I used to use Windows ’98 and Internet Explorer 6.0 to browse the Internet makes me shudder… Sort of like my memories of MS DOS 3.0. Oh my god that was bad. And MS DOS 5.0.

I have used that and MS DOS 3.0 as I said, I still own a box with MS DOS 3.0 disks in it with the manual and 5.4″ disks in it the 3.2″ disks are missing though but it is cool to own something like that even though I will never use it. And it has IBM on the front not Microsoft.  But if you install Dosbox. Then you can enjoy some freedos goodness without the pain associated with MS DOS. I wonder what MS DOS 1.0 was like… Maybe you could download it somewhere. Below, there is information about the types of disk drives and floppy disks that were around in the 90’s. I remember using 5.25 inch disk drives and the floppy disks that went in them. You would put the disk in and flip down the lever on the front to lock the disk in place and read in your files on your trusty Apple Mac IIe. Those were the days were they not? And using a 8086 and 80286 and 80386. I have used DOS on a 08286 and it was useable, but I would rather have a modern PC now. I remember that a 80386 was not the best thing to run Doom on, it would run slowly, a 486 sx/33 was perfect.

Floppy disk drive types.

5.25 inch Single-sided: 160KB/180KB.

5.25 inch Double-sided: 320KB/360KB.

5.25 inch High-capacity: 1.2MB.

3.5 inch Double Sided: 720KB.

Types of diskettes.

5.25 inch Single-sided, double-density: 160KB/180KB.

5.25 inch Double-sided, double-density: 320KB/360KB.

5.25 inch High-capacity, double-density: 1.2MB

3.5 inch Double-sided: 720KB.

3.5 inch Double-sided: 1.44MB.

How many of those have you used?

Playing DVD videos on Ubuntu 9.04.

I recommend that you install smplayer, this program is perfect for playing just about any video format and DVD videos to boot. And although totem plays DVD videos just fine, I have found, just use smplayer instead, it rocks. I take back everything bad I said about Linux and Ubuntu especially since I have been running a new installation for a few days (Jaunty Jackalope) and it is working fine right now, I just did a huge update to my system and after rebooting to load the new kernel it is all sweet and pulseaudio is working too, I had better not tweak anything at all right now it is just fine even xawtv and xmms work just fine too. Once you have installed the ubuntu-restricted-extras package you will be set.

Compro DVB-T 300 saa7134 Ubuntu 8:10 setup.

I have got my Videomate Compro DVB-T 300 card with saa7134 chipset to work in Ubuntu 8:10. I setup the card using the following settings.

# /etc/modprobe.d/dvb
# Load the saa7134-dvb driver when the saa7134 module gets loaded.
install saa7134 /sbin/modprobe --ignore-install saa7134 ; { sleep 1 ; /sbin/modprobe saa7134-dvb ; } &
options saa7134 card=70
options saa7134 card=70

I am using the analog tv at the moment, I am working on getting the digital tv to work, but I am very happy that I worked this out. You just need to connect the audio out cable from the card to the cd audio input on your soundcard. I am using a vanilla handbuilt kernel from

[ $ ]-> cat /proc/version
Linux version 2.6.31 (makron@onimusha-desktop) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #1 SMP
PREEMPT Thu Sep 24 04:58:46 EST 2009

Here is the relevant output from dmesg.

[   16.678804] Linux video capture interface: v2.00
[   16.775075] nvidiafb: Device ID: 10de0221
[   16.781384] nvidiafb: CRTC0 analog found
[   16.786437] nvidiafb: CRTC1 analog not found
[   16.866628] i2c-adapter i2c-1: unable to read EDID block.
[   16.988368] i2c-adapter i2c-1: unable to read EDID block.
[   17.113381] i2c-adapter i2c-1: unable to read EDID block.
[   17.156368] nvidiafb: EDID found from BUS1
[   17.296021] saa7130/34: v4l2 driver version 0.2.15 loaded
[   17.296177] saa7134[0]: found at 0000:02:08.0, rev: 1, irq: 3, latency: 66, mmio: 0xf0500000
[   17.296271] saa7134[0]: subsystem: 185b:c900, board: Compro Videomate DVB-T300 [card=70,insmod option]
[   17.296393] saa7134[0]: board init: gpio is 843f00
[   17.296650] input: saa7134 IR (Compro Videomate DV as /devices/pci0000:00/0000:00:08.0/0000:02:08.0/input/input4
[   17.296962] IRQ 3/saa7134[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[   17.434079] cfg80211: Calling CRDA to update world regulatory domain
[   17.539315] saa7134[0]: i2c eeprom 00: 5b 18 00 c9 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
[   17.540218] saa7134[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
[   17.541123] saa7134[0]: i2c eeprom 20: 01 40 01 03 03 ff 03 01 08 ff 00 87 ff ff ff ff
[   17.542022] saa7134[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.542930] saa7134[0]: i2c eeprom 40: ff 02 00 c2 86 10 ff ff ff ff ff ff ff ff ff ff
[   17.543829] saa7134[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff cb
[   17.544964] saa7134[0]: i2c eeprom 60: 34 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.546025] saa7134[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.546924] saa7134[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.577225] saa7134[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.578129] saa7134[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.579029] saa7134[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.579935] saa7134[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.580832] saa7134[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.581730] saa7134[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.611956] saa7134[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.612892] i2c-adapter i2c-4: Invalid 7-bit address 0x7a
[   17.761260] nvidiafb: EDID found from BUS2
[   17.761365] nvidiafb: CRTC 0 appears to have a CRT attached
[   17.761439] nvidiafb: Using CRT on CRTC 0
[   17.763022] nvidiafb: MTRR set to ON
[   18.293523] Console: switching to colour frame buffer device 128x48
[   18.294657] nvidiafb: PCI nVidia NV22 framebuffer (64MB @ 0xE0000000)
[   18.732367] tuner 4-0043: chip found @ 0x86 (saa7134[0])
[   18.848864] tda9887 4-0043: creating new instance
[   18.848909] tda9887 4-0043: tda988[5/6/7] found
[   18.859382] tuner 4-0061: chip found @ 0xc2 (saa7134[0])
[   19.032375] tuner-simple 4-0061: creating new instance
[   19.032422] tuner-simple 4-0061: type set to 67 (Philips TD1316 Hybrid Tuner)
[   19.043305] saa7134[0]: registered device video0 [v4l2]
[   19.043409] saa7134[0]: registered device vbi0
[   19.126168] dvb_init() allocating 1 frontend
[   19.234065] DVB: registering new adapter (saa7134[0])
[   19.234115] DVB: registering adapter 0 frontend 0 (Philips TDA10046H DVB-T)...
[   19.254030] tda1004x: setting up plls for 48MHz sampling clock
[   19.741035] tda1004x: found firmware revision 23 -- ok
[   19.745664] phy0: Selected rate control algorithm 'minstrel'
[   19.747168] Registered led device: rt73usb-phy0::radio
[   19.747242] Registered led device: rt73usb-phy0::assoc
[   19.747297] Registered led device: rt73usb-phy0::quality
[   19.752158] usbcore: registered new interface driver rt73usb
[   19.793787] usbcore: registered new interface driver rt2500usb
[   19.939822] saa7134 ALSA driver for DMA sound loaded
[   19.939928] IRQ 3/saa7134[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[   19.939998] saa7134[0]/alsa: saa7134[0] at 0xf0500000 irq 3 registered as card -2

Setting up the console in Ubuntu.

To configure the text console in ubuntu you can use the dpkg-reconfigure command like this:

~$ sudo dpkg-reconfigure console-setup

Then you just follow the prompts to set up the text console however you want. Very simple indeed. This is good if you are using a high resolution like vga=31B which is 1600×1200 pixels.

My old sysinfo program.

I have just fixed up the latest version of this for Linux. I hope you find it useful.

Ubuntu Sound fixed.

Here is a copy of my /etc/group file. I have uninstalled pulseaudio and now I have edited the /etc/group file to look like this so that alsa is used and pulse is nowhere to be seen in this file. And follow the tips in the last entry below this one, where you can enable alsa and get your sound working. I am logged into X right now using startx from the console and not using gdm. My user is makron.


Ubuntu 904 no sound.

I have installed Ubuntu Jaunty 9.0.4 and I could not get the sound working with gstreamer applications until I tried this: Now it works perfectly. I can use Totem and rhythmbox and I get perfect sound. The only downside to this is you have to re-boot, but that is a small price to pay to get the sound working. Pulseaudio is a beast at times and is not really worth using until they iron out the bugs. But why would you want to use it when alsa works so well and has always worked very well indeed.

Running Windows XP in a virtual box.

Windows Installation.Here is a screenshot of Windows XP installing in Virtual Box. This is a good way of installing and using Windows as my Windows 7 drive (80GB) just failed and I am having problems with my Windows XP installation, so I decided to install XP in a virtual disk image and then if it gets slow and bloated, I can just format & re-install or just delete the disk image and start again. I love virtual box! I am running Linux mint at the moment and I would not switch for the world. My M2 card that I use in my Sony Ericsson phone is supported out of the box, which Ubuntu does not do.

To install NVidia drivers in Linux Mint, download the drivers and save them to your home directory, then at a text console type:

sudo ./

Just follow the prompts and choose to update your Xorg configuration when prompted and you will be set. Make sure you are not running Xorg when you do this, press CTRL-ALT-F2 to get to a text console and type sudo /etc/init.d/gdm stop. This will shut down Xorg and then you can install the drivers. Linux Mint supports compiz features out of the box so you will be very happy. Windows 7 has nothing like compiz and if you have beryl then it should be even better. I love this Gnome desktop. Totem is a good music player, I do not want Xmms now, I can save a playlist and play it whenever I want to, Linux Mint enables all of the codecs you need by selecting an option on the main Gnome menu it downloads and installs the gstreamer codecs and mplayer so you can play all of the music and video formats you would want to play. Light years ahead of Fedora Core 10, that is shite. Try to get xvid movies to play in that… You try and try and it does not install. But at least Linux Mint takes care of you.

Fedora are against non-free formats like Xvid, which I like to use to watch movies. I bet in a vanilla Windows XP installation with SP2, you can not play back aac and flac formats like Totem can. I mean just by installing all of the codecs with a simple command. You click Menu->Sound & video and install multimedia codecs. This is pretty easy to do and as I said it is easier than Windows to get good support for various codecs, I usually installed Winamp 5 on Windows and got support for aac flac and ogg vorbis codecs. smplayer will not work well on Windows 7, but the Windows media player that 7 comes with can play just about anything anyway.

Fixing resolutions in Ubuntu. Xorg.conf

If you want to be able to change resolutions in Ubuntu, then you can load up
your xorg.conf in an editor and follow along.

Your /etc/X11/xorg.conf might look like this:

# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg
Section "Device"
	Identifier	"Configured Video Device"
Section "Monitor"
	Identifier	"Configured Monitor"
Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"

But you want it to look like this. With your favourite resolution and color
depth right there where you need it. Xorg can autodetect most things these days,
but it is good to have the ability to choose what resolution you want to run at
and this this is how you do that.

# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg
Section "Device"
	Identifier	"Configured Video Device"
Section "Monitor"
	Identifier	"Configured Monitor"
Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	SubSection	"Display"
	    Viewport	0 0
	    Depth	24
	    Modes	"1920x1440" "1600x1200" "1024X768" "800x600"