My Linux tips and tricks page part 2.

My Linux tips and tricks page, Part 2.

Go to part 1.

Fixing sound in Ubuntu. 8:10. When using `startx`

If you want to have sound working when you are using Ubuntu at the console and using the startx command to start Xorg and you do not get sound at all then you need to open up the /etc group file in an editor as root and follow along. For this example the username is bejiita. If you have your username right next to the audio entry and nothing else then you will be fine.

Change the entry from this:

audio:pulse;bejiita

To this:

audio:bejiita

This is what I did, and I have sound in xfce4 loaded from the text console and it works fine.

Installing a new hard disk in GNU/Linux.

I just added a 160 Gigabyte hard drive to my Linux system. I added the partitions with cfdisk, which was not too hard, you can see the results of my editing below.

                          cfdisk (util-linux-ng 2.14)
                              Disk Drive: /dev/sdb
                       Size: 160041885696 bytes, 160.0 GB
             Heads: 255   Sectors per Track: 63   Cylinders: 19457
    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
                            Pri/Log   Free Space                           1.05*
    sdb1                    Primary   NTFS             []              52428.80*
    sdb2                    Primary   Linux ext3                       79999.08*
    sdb3                    Primary   Linux ext3                       27610.36*
     [   Help   ]  [   New    ]  [  Print   ]  [   Quit   ]  [  Units   ]
     [  Write   ]
                               Print help screen

Then I had to run mkfs like so…

root@deusexmachina:/home/bejiita# mkfs.ext3 /dev/sdb2

After I had done this for each partition, then I rebooted the machine and then setup /etc/fstab to mount the partitions with the mount points I wanted.

[ bejiita@2.6.28.7Bejiitas ]
[ Jobs 0.PWD: ~.bash 3.2.39. ] [ 6 ]
[ 14:29:19 ]
[ $ ]-> cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda2
UUID=8fb5b706-1f4e-4723-bbd3-95db7de0c564 ext3	relatime,errors=remount-ro 0	1
# /dev/sda3
UUID=32601595-bcc1-49de-ab60-cc6842ac5178 none	swap	sw	0	0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0	0
/dev/sdb2	/usr/local	ext3	relatime,errors=remount-ro 0	1
/dev/sdb3	/home/bejiita	ext3	relatime,errors=remount-ro 0	1

Then, for /home/bejiita and /usr/local, I re-named the folders /old_home/bejiita and /usr/old_local and then created empty folders in their place to mount the partitions to, then copied the folders & files back to where they belong, only they are now on new partitions. Now I have added more hard disk space to my Ubuntu 8.10 installation and now I can fit more files and music on my computer. With this installation method, it is quite painless and gives an easy way to add more storage space. Now my /home has 26 Gigabytes free instead of 515 Megabytes. And you could see from the cfdisk screen above that I also created an NTFS partition, that is to share music & movies with Windows Vista.

Creating a loopback filesystem.

https://securitronlinux.com/debian-testing/how-to-create-a-loopback-filesystem-on-linux-and-store-data-in-it/.

GNU/Linux has it good, I installed Apache HTTP server from source code then ran /usr/local/bin/httpd -k start as root and it worked straight away. Much better than the time I tried to set it up on Windows ’98. That was quite frustrating. I had quite a time using that Operating System. I do not wish to repeat that ever again. Now we have Windows Vista which is alleged to not work with the Apple 2 Gorillas sitting against a tree.Ipod. You would need to purchase a Zune and put up with the horrible software that M$ expects you to use. I would not use that for all the Spice on Dune. I am happy with Xmms and storing my music on the hard drive. I have an xmms playlist file in the directory and I can load it up instantly and play my music. Microsoft Software is reputed to be unstable and slow. Far worse than Media Player 9. Amarok is much better and supports the Ipod. And it does not need DRM and all the other proprietary annoyances that plague closed source software. It even got a mention in APC magazine. Australian Personal Computer magazine. This is a great compliment to the hard work of the Amarok team.

I just installed Knoppix 5.1 as my main OS on my HDD and then installed OpenSuse 10.2 to /dev/hda4. It installed its own bootloader over the existing Knoppix one but kept the Knoppix entry. Now I have two GNU/Linux distros installed to the one machine. The bootloader installation was done without prompting but worked perfectly. Try that with Windows XP and Vista… I am very happy. And my rpm’s of xmms, larswm lame and mp3blaster installed perfectly in Suse. On my Knoppix installation, I am working at the console, with a kernel building on one, mplayer playing a CD on another and writing this on a third. And it works quite well indeed. Just type mplayer cdda:// to play an Audio CD disc with mplayer. Nice and easy. And as I said, I can use the Alt->arrow combination to change virtual consoles which is better than pressing alt-F2 for example. It is a much faster method of switching screens. Unless you are using screen, but I dislike that program. Mp3blaster is a good choice for playing mp3s. You load in your xmms playlist and play any track you want on the text console. I have disabled the CD sound in alsamixer and the CD still comes through. Totally cool.

I hate having the CD level up which introduces noise. Better to extract the actual data on the fly from the disc and play that. It is binary data after all, and I get crystal clear CD quality music the way it should be. Now I have unplugged the CD audio cable from the DVD drive and I can still hear it. But having the CD audio cable to play music through is such a 20th century concept and belongs in the dark ages. I would be very upset if Windows Vista does not support the direct digital audio extraction that I am using on Knoppix 5.1. The OpenSuse KDE 3.5.5 desktop has a Windows Vista styled start menu with instant Beagle searching built-in. So if you are looking for your fish document then you can easily find it. You just click in the search box and type “fish” and it will be found instantly. Windows Vista users are stuck with a search tool that has to search the folders on the target drive every time, it does not build a database of all the files to be searched so that the future searches are just about instant.

That is not as good as beagle, which is fast, but not the same as that excellent search application. A good thing about the OpenSuse 10.2 installation is that it backed up the boot sector of my hard drive to /boot on /dev/hda4 so that if I uninstall Open Suse, (not likely,) I can restore the correct boot sector on the hard drive. I bet Windows 7 or Windows 8 does not have this type of feature. I just upgraded to Kernel 2.6.20.2 and it worked perfectly with my machine first time. The preemptive kernel option makes the machine faster than using the default kernel, and disabling SMP support for a single processor desktop machine makes the kernel run even faster. Windows XP does support the digital audio extraction that I can use on Linux, so that is pretty good.

Now I am using the OpenSUSE 10.2 Gnome 2.16.1 desktop, and I have the deskbar plugin on the top panel. I can instantly search my machine and find any document or application I want. And the CD audio works without the audio cable from the DVD drive. Totally cool. This makes it better, as I can switch off the CD sound level in alsamixer and it still works. Saves having the noise introduced by the CD audio cable. I have just tried running an old Unreal Tournament demo with wine and it ran perfectly. And the original Unreal. Very nice indeed, the Command & Conquer Tiberian sun game runs perfectly if you download the rar from the Westwood website and unpack it to your home folder and run the game.exe with Wine.

Some people I have talked to have been telling me about their Windows XP machines and how they are always rebooting it and updating their antivirus software and antispyware. And they are almost proud of the fact! They are so used to this they just accept it. But Windows Vista will introduce more strict DRM and some new security features, but most people will just turn it off if it keeps popping up windows asking for permission to perform something with root privileges. I know this for a fact. People want to sit down at the machine and do something, without having to switch to Administrator mode first. Although most users run in Administrator mode anyway, as most software will not work in a limited user account. Because of the laziness of the Windows programmers, and the laziness of the programmers of the software that will not work.

And programming for DirectX is another matter as it limits games to Windows when if they used SDL, it could be more portable. Zdoom is a good example of this, it comes in a source package and it can be compiled on Linux or Windows with the same Makefile. Try that with a commercial game. Although Half Life 2 runs on GNU/Linux with Cedega, it is not an ideal solution. Better to have a GNU/Linux binary like Doom3. Prboom also is a good Doom source port that is available for Windows and Linux. And also FreeBSD Unix. And is my preferred Doom source port.

I was once helping someone with a computer, a Pentium III 500 and the shop had installed Norton Anti-Virus and Spybot which made the machine slower than before, even though they had installed a new 80 Gigabyte hard drive. With 7200RPM speed. But having bloated software like that installed does not help, and it made the machine totally unusable. It took up all of the CPU and the computer was way too slow to use. So slow that I had to quit the Spybot scan and call it a day. Total Shite. Who would want to put up with something like that? Having multiple layers of Antivirus, Antispyware, and software to protect against malicious computer users that want to break into your machine. If that machine in question was running OpenSuse 10.2 with the KDE 3.5.5 desktop, it would be very fast indeed with the 384MB of RAM it has. Windows ’98 is quite laboured running with all that anti-spyware and anti-virus.GNOME  Nautilus File Manager.

But GNU/Linux has many good things to its credit. Like the ability to have many text consoles to switch between with the ALT->right arrow combination. And Xemacs. A totally awesome editor. And the KDE and Gnome desktops, which are derided for being memory hungry, but are faster than the Windows Explorer shell. FVWM is faster still, being a very old Window Manager. And in GNU/Linux, you can send messages to other text consoles. Just type echo "Hello Friend" > /dev/tty3 as root, for example, and the message will be sent. I just tried this with myself logged in at text console tty3 and typing the command from tty2 using sudo. A great way to show off GNU/Linux to your friends. Or if you use an Xterm on a KDE 3.5 desktop like I do then try echo "Hello Mate" > /dev/pts/0 this works as well, just type tty to get the device name. Some distros setup the Windows key to switch virtual consoles. Nice indeed. Now there actually is a use for that key!.

Mozilla Easter Egg.

The Mozilla Easter Egg. Click on this link: about:mozilla. This should also work with Mozilla 1.7. I have had it work with Firefox 2.0 and Epiphany 2.16.1.

Misc GNU/Linux goodness.

Quake running in xdosemu!.
Quake running in xdosemu!.

To the right, you can see a screenshot of Quake running in Xdosemu. This game runs just as fast as with a native DOS session. Quite fantastic. And the sound works perfectly. boom.exe also runs fine with Dosemu, and I am trying to get Zeth running with this emulator. I have tweaked the Dosemu configuration to within an inch of its life and I am rewarded with a good game of emulated Quake! Those people cursed with running Windows XP could try Dosbox in order to get Quake running. That might work. quake.exe will not run in Windows XP by itself. Maybe not even winquake.exe, but this is a GNU/Linux page and I am not concerned with that. Although the quake2 Debian package running with Knoppix 5.1 is nice too. I love to visit Stroggos. But running the original Unreal with wine is quite awesome. I was playing the Nali castle map and I shot at the top of a table that had books on it and they were blown off the table and bounced around the room. One book landed on top of a table on top of another book and bounced a couple of times and came to a halt. Totally sweet.

Quake v1.08 runs well in Xdosemu and is easily controlled when I use the CONTROL->ALT-HOME key combination to activate the mouse grab. I just played a game in episode one and had no problems at all.

Very useful GNU/Linux links.

  1. Customize.org A website with lot’s of good styles and themes for various Window managers.
  2. Slashdot.org A website with many interesting and highly technical news stories and commentary.
  3. Gnome Website. The website of the Gnome destop project. Go here for more information on the excellent Gnome 2 desktop project.
  4. Home of the GNU project. Visit this site to learn more about the GPL and the GNU project.
  5. Fresh Meat. A website highlighting the new and useful files released for Linux every day.
  6. Secure Deletion of files. A discussion of secure deletion of files on various filesystems.
  7. The latest version of Xterm. A useful terminal emulator for XFree86.
  8. Creating DVD slideshows on Linux. A sourceforge page with information on how to make your own slideshow DVD’s.
  9. DVD slideshow page. The main DVD slideshow page. With examples and information. Also see: /usr/share/doc/dvd-slideshow/html/examples.html
  10. SUSE 10.1 Desktop Setup. Setting up SUSE 10.1 as a fully working desktop system. From: http://www.linuxforums.org/reviews/review_of_suse_10.1.html
  11. Mplayer Website. A good site for the best DVD and multimedia player.

2 thoughts on “My Linux tips and tricks page part 2.”

  1. book + DVD in an Indigo store. By April, Ubuntu 6.06 was my main operating ssetym and by July I had rid my laptop of Windows. A few weeks before, I had heard Richard Stallman speak on copyright at the University

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.