Wednesday 31 October 2007

I'm not reading mags

I stopped reading magazines years ago for several reasons:
  1. they distract from the issue
  2. their net ratio of information transferred is bad
  3. cost per page of information is beyond acceptable ranges
Let me elaborate on this.

Magazines usually cover just one or two subjects that interest you or that are helpful to your current situation. The rest is either unsolicited input or, worse still, advertisement. I don't need advertisement. Who wants to learn about the n-th version of a charting package that can be embedded into your source code or the umpteenth version management with pink color coding of source files ending with the letter x. Take away cover, index, imprint, the info per pages ratio lies somewhere around 3%.

Even if an article covers an issue right in your focus, usually the issue is large enough to be broken into several articles. Publishers do not want articles to extend two pages and they want to sell the next issue as well. So, the article consists of 30% intro and repitition, 60% information and 10% links to supportive web pages, half of them not online otherwise you would have found them in previous web searches. So the info per space ratio lies around 60%.

Your average magazine costs about € 10,- for around 60 pages. This makes 17 cent / page.

Compared to a book with 1.000 pages (e.g. O'Reilly JavaScript Reference, € 46,99) the price of a magazine is about 3,5 times as high.

All that said, I found a magazine and an aspiring magazine that are worth reading:

dotnetpro is a magazine that concentrates on .NET software development. Much to my surprise it also covers Mono (in those much-hated multi-issued never-ending article-threads). On average, I can read 4 to 8 articles in it that interest me and the quality of code is more than acceptable.

pythonmagazine is an effort to get a Python developer magazine up and running. Issue 1 can be downloaded in PDF and offers an interesting blend of Python issues.

I am not going to change my mind: I read books, no magazines.

But I will keep an eye on the two.

Monday 29 October 2007

Upgrading 7.04 server -> 7.10

I upgraded my server from 7.04 to 7.10. It went through straightforward.

Prerequisites
  • package update_manager_core
If you have not installed it, you can do so:
sudo apt-get install update-manager-core
Installation

Start upgrade with:
sudo do-release-upgrade
I did this over a ssh session. The installation process warns you that you might loose connection during the upgrade and gives you the option to open a secondary ssh session on port 9004.
ssh server -D serverip:9005 -l username
will do the trick.

My upgrade went smoothly. Connection did not fail and after about 30 minutes I had 7.10 installed.

Post installation procedures

VMware Server did not start automatically. I had to install the linux headers manually. The upgrade deleted the old ones without adding new headers. This was due to my installing the server 1.0.4 provided by the vmware.com site, so this is no error in the package upgrade mechanism.
sudo apt-get install linux-headers-generic
Then recompiling all modules:
/usr/bin/vmware-config.pl
and
/usr/bin/vmware-config-mui.pl
There is an error in the way, the installation procedure sets up access rights to the /var/run/vmware/ directory. httpd.vmware cannot create a httpd directory to store temporary data. I added the following lines to /etc/init.d/httpd.vmware (after the ### END INIT BLIOCK):
RUNDIR="/var/run/vmware/httpd"
OWNER="www-data"
GROUP="www-data"

/usr/bin/test -d "$RUNDIR" || \
/bin/mkdir -p "$RUNDIR" && /bin/chown "$OWNER:$GROUP" "$RUNDIR"
This changes the ownership to www-data, the processes user and group ID. Now one can start the httpd.vmware process that handles the web administrative interface.

Tuesday 23 October 2007

Enabling compiz on ATI Mobility Radeon X600

I enjoyed compiz on my ATI graphics card during 7.10 beta. Then xserver-xorg-video.ati got updated and screen effects stopped working.

Many complaints and errors filed but no update to activate the feature.

To fix this, I opened /usr/bin/compiz (a wrapper script to start compiz) and edited the cards blacklist.

In my case I searched for my card using
$ lspci -nn | grep ATI
This gave me 1002:3150 as the card ID.

Delete this string from the blacklist (T).

Activating compiz, now works.

Sunday 21 October 2007

11 most useful console tools

Here are the most essential command line tools:

> filename
Redirect output of commands into a text file, so that you can attach it to emails.
$ uname -a > mypc.log
man command
This gives a brief online description of the command. man always requires a parameter.
$ man uname
sudo command
Run a command with full access rights. You will be asked to enter your password again. The command then executes.
$ sudo chown root:root /etc/init.d/networking
Attention: You turn off Ubuntu's protection features, so double check what you enter!

uname
Provides general system information. Usually called like:
$ uname -a
less filename
If you need to view configuration- or logfiles, less allows you to view them on the console. less always requires a parameter.
$ less /etc/X11/xorg.conf
tail (-f) filename
To view just the most recent part of logfiles, tail shows the last 10 lines of the file. The parameter -f will show new lines as they come in.
$ tail -f /var/log/syslog
lspci
Lists all devices attached to the PCI bus. You can analyze hardware problems with this.
$ lspci
lsusb
If you have trouble with USB devices, this lists all attached USB ports.
$ lsusb
lsmod
Lists kernel modules and their dependencies. You may want to find out, if kernel modules are loaded at all and which modules depend on others.
$ lsmod
dmesg
To read what was printed on the boot screen, this command preserves the messages even when you are in X-Windows.
$ dmesg
sysctl kernel.parameter
If you ever need to display or set any kernel parameter, you can use this.
$ sysctl kernel.hostname
To start a console window, from the main menu select Applications -> Accessories -> Terminal. At the prompt ($) you can enter your command. The output will be shown in the same window.

Saturday 20 October 2007

8 steps into Ubuntu

You are new to Ubuntu? Here are 8 steps to remember in order to enjoy working with it.

1. Ubuntu is not Windows

If you come from a Microsoft Windows environment, you might expect everything to work the same.
Drop this expectation!
If you don't, you will always compare Windows with Ubuntu and will not benefit from the differences between the two.

2. Different GUI

The first and most obvious difference is the Graphical User Interface, the way information is displayed on the screen and the way how you can interact with the machine.

With Ubuntu you can choose your favourite Edition:
  • Ubuntu (easy to use Gnome based user interface)
  • Kubuntu (highly customizable KDE user interface)
  • Xubuntu (optimized for old and slow machines)
  • Gobuntu (no restricted software included)
To get the most out of Ubuntu, start experimenting. Things follow a certain logic that is concise and clear.

3. Different CDs

Ubuntu comes in different packages:
  • LiveCD (Ubuntu, Kubuntu, Xubuntu) lets you start Ubuntu from CD, play and experiment with it or install a standard set of applications on your PC
  • AlternateCD is for installing special hardware or configuration requirements
  • Server CD is required to install out-of-the-box server systems
If you are new to Ubuntu, you should be fine with the LiveCD. You can download any of the above from here.

4. You cannot destroy anything

Ubuntu protects essential parts of the computer system from being changed in a way that the system stops working. Every change that is considered critical is cross checked and authorized by you by entering your password again.

Ubuntu cleans up after all changes so there are no left overs from previous changes.

You may loose some personal adjustments but the system generally protects you from altering the system inoperable.

5. One CD covers all

Ubuntu comes with everything on board.
  • Email -> Use Thunderbird (my favorite) or Evolution
  • Internet -> Firefox
  • Office productivity -> OpenOffice is a complete suite of applications that allow you to write documents, calculate spread sheets, present slide shows, access databases and some things more
  • Entertainment -> Sound Juicer, Media Player, RythmBox, Serpentine CD Creator and others come out of the box
There are more applications in the software repository that comes with Ubuntu. You can install, test and deinstall any of them without the risk of degraded performance or instability of your system.

6. Under the hood

Every 6 month a new version will be released. You can upgrade to these new versions automatically and at no extra cost. You choose the time and authorize individual updates at your own leisure.

Security issues are fixed and shipped to you during these periods. To update your system you can choose between fully automated or individually authorized procedures. There is no hidden updating of system components.
You get what you ask for. Nothing less, nothing more.
7. Yes, there is a console window

Most things can be done from the graphical user interface. Some actions are more efficient or only possible using a special command window: the Console.

Don't panic. You will use the console only on rare occasions where you want to query your machine about specific details usually required to fix problems.

See my blog entry about the most useful commands.

8. Help where help is due

There are zillions of books on Windows available. There are only a few books on Ubuntu out.

Information is conveyed over the Internet.
  • A good starting point would be Ubuntu's homepage
  • Special search engines cover Ubuntu topics
  • There are User groups around the world. (If you happen to be Austrian, here is a good choice)
  • You can get professional support from Canonical or RSB at a reasonable fee.
Good luck!

Chess does not show 3D board

In Gnome, when you switch Chess (glchess) into 3D mode, you get an error dialog:
Unable to enable 3D mode

Your system does not have the required software to enable 3D mode. Please contact your system administrator and ask them to install the OpenGL Python bindings and the GtkGLExt Python bindings.

You are still able to play chess in 2D without these packages.

[Close]
In order to activate 3D you need to install the following packages:
  • python-gtkglext1
  • libgtkglext1
  • python-opengl
  • python-setuptools (not required in 8.04)
I had trouble getting 3D to work on an ATI X2600 graphics card. With the nVidia card, everything works fine.

Monday 15 October 2007

VMWare Workstation & Server console

VMware Workstation prerequisites:
  • You need the linux headers installed
  • also install build-essential package (this has the C compiler and make utility required for the vmware modules)
Installing VMware Workstation is straight forward:
  • Download the installation package from VMwares webpage.
  • Unpack the zip-file in a directory
  • sudo ./vmware-install.pl and answer the questions about directory location
  • confirm that you want to run the vmware-configure.pl script as well
  • add bridged, NATed and host network adapters. I chose the ones suggested
You will get a working installation with icons available under Applications -> System Tools. Start the Workstation and enter a license. Viola, you are ready to go.

There is also a VMware Player installed which is free of charge and does not require a license.

If you run into trouble the most likely causes are that you do not have the latest VMware build. On several occasions I found that there was a newer build on the web. Incidences included:
  • Could not compile vmnet and vmmon utilities (I tried the vmware_any_any_update113 patch and it worked partly but not on every machine, so I could not recommend it)
  • Installation routine finds wrong network adapter. This is the case when you work with a notebook connected to you LAN via wireless adapter. The scripts suggests eth0 as the default bridge. This is no good if you use eth1 or wlan0 to connect to you LAN.
  • Wrong set of kernel module drivers. I tried to install the kernel module drivers that come with Ubuntu. They never worked for me.
To fix problems, run sudo /usr/bin/vmware-config.pl and recompile the kernel modules. You can keep the network settings by skipping network discovery.

VMware Server console:
  • Same prerequisites as with VMware Workstation.
  • Decompress the vmware_server_linux_client archive. Take the vmware_server_console archive and decompress it in a directory
  • in the vmware-server-console-distrib run sudo ./vmware-install.pl
  • again answer the questions. You can change the port the client communicates with the server. But this has to be done on the server as well. I recommend you don't change this.
  • The installation script asks whether you want to run the configuration, which you want to do.
After the installation, you are left without any menu entry. I manually added a lauch icon under Applications -> System Tools and chose the icon that comes in the /usr/lib/vmware-server-console/share/pixmaps directory.

Most likely errors are:
  • Your server does not run the console service (default on port 902)
  • You haven't installed the prerequired components
  • You do not run the latest vmware build (in 7.10 only 1.0.4 build 56528 worked on my machines)
To fix problems, run sudo /usr/bin/vmware-config-server-console.pl and recompile the kernel modules if required.

During the latest updates I got a vmware kernel components from the Ubuntu repository. They prevent you having to recompile kernel modules after each kernel update.

Sunday 14 October 2007

Screen resolution on HP 8510p is wrong

I run Gnome 2.20 desktop on the machine. Ubuntu 7.10 recognized a screen resolution of 1400x1050. This produces a blured image (as the native resolution is 1680x1050).

Here is what my xorg.conf says:
Section "Device"
Identifier "ATI Technologies Inc ATI Default Card"
Driver "vesa"
BusID "PCI:1:0:0"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc ATI Default Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "1680x1050"
EndSubSection
EndSection
Under System -> Administration -> Screens and Graphics -> Screen I have selected:
  • LCD Panel 1680x1050 (wide screen)
  • Resolution = 1400x1050 (cannot be changed), 60Hz
  • Default Screen selected
On the Graphics tab:
  • Graphics Card VESA driver (generic)
  • Video memory = automatic
Under System -> Preferences -> Screen Resolution:
  • Resolution = 1400x1050
  • Refresh Rate = 60Hz
  • Rotation = (disabled) Normal
  • Make default for this computer only = not selected
Steps to fix the screen resolution
  1. Changing xorg.conf I tried several hint offered on the internet:
    a. changed the graphics driver to "ati" in xorg.conf Section "Device". Restarting the X-server provides an obscured logon screen (horizontal sync does not work)
    b. added
    Screen 0
    Option "MergedFB" "off"
    to the Section "Device". Still the same effect.
    c. added
    Vendorname "Generic LCD Display"
    Modelname "LCD Panel 1680x1050"
    Horizsync 31.5-65.5
    Vertrefresh 56.0 - 65.0
    modeline "1680x1050@60" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync
    and removed
    Option "DPMS"
    to and from Section "Monitor". Still the same pattern after restarting gmd.
  2. Then I tried setting the screen resolution in Gnome:
    a. from the recovery dialog at the start of Gnome I set 1680x1050. Gnome starts with 1400x1050 resolution.
    b. tried several other ways but no resolution other than 1400x1050 and a vesa driver.
  3. Tried to install xserver-xorg-video-radeonhd package. I could not find the correct driver in the control panel and the driver was not selected during startup of the X server.
Installed ATI proprietory drivers

Next I took ATI proprietory drivers. I followed the installation instructions:
  • Download the driver from the web site
  • chmod o+x to make the driver file executable
  • ran the file as sudo user
  • answered the following dialogs by selecting a default installation
  • The final dialog informs you that you have to run aticonfig --initial to create a suitable xorg.conf configuration file and reboot the machine
If you do not follow the procedure exactly as described you still run into the situation described above. If you reboot (hey, are we back to Windows) you are welcome with the correct screen resolution.

OK, now it works

Having a suitable screen resolution of 1680x1050 I tried to enable desktop appearance enhancements (compiz). As described in the Readme of the ATI installer, compiz is not supported.

Further, the graphical performance of the driver leaves a lot to be asked for. I have never seen anything that sluggish. I'm left with the choice of having a screen with a readable resolution where I do not even want to move windows or have a decently fast GUI with an unreadable resolution.

The driver prohibits the machine from entering sleep mode (suspend to RAM). The machine stays in a semi-suspended state, consuming full power but with a blank display. To wake up the machine you have to force reboot it, as the driver never wakes up again.

Conclusion

If you have the choice of not getting an ATI card, then do so. NVidia seems the far better choice. It works out of the box and has support for visual enhancements

7.04 -> Server

My Server is an assembly made up of individual components that had a high price/performance ration at the time of purchase. You can always get cheaper or better equipment if you wait but eventually you have to start. This is what I started with.

Installing the hardware

Right after the first boot we ran into several issues:
  • CPU frequency would only operate at 2,2 GHz
  • Memory access was half the frequency than what was advertised
Installed BIOS update that I downloaded from the EliteGroup website. This solved the issue of CPU speed. The documentation of the motherboard mentioned nothing about specific banks that you should install memory in, it turned out though that leaving a gap between two memory banks would provide the desired improvement in access time.

Intalling Ubuntu 7.04

Booting with the LiveCD did not work. Sometimes the CD would boot and perform as expected, but this was not reproducible.
  1. At first, after the initial loading dialog, the screen blanked. This could be resolved by selecting a display resolution using F4.
  2. Next, the boot process would continue providing the well known splash screen. After a short period the boot process terminated and dropped out into a recovery console (a special ash).
  3. Quick research on the kernel hompage did not help.
  4. I found an online copy of O'Reillys Kernel in the Nutshell. Two parameters -irqpoll and (the more resource saving) -irqfixup solved the problem of hangups during the boot process
Currently I boot the machine with -irqfixup as this performs significantly faster than -irqpoll (which polls all IRQs and rebuilds an IRQ table inside the kernel, irqfixup does this on the fly where needed).

LiveCD installation worked fine from there on.

As this was intended to be a server, a Gnome front end was not required. LiveCD does not allow to install the logical volume manager LVM or RAID functionality. So I reinstalled from the Alternate 64 bit CD.

Installing from the Alternative CD

With -irqfixup in place, installation went without interuption. Some issues that required consideration:
  • The LVM2 requires you to define physical volumes, volume groups and logical volumes. While the installation is straightforward it helped me to read through the RedHat LVM webpages to gain a better understanding and build confidence in the software (I later ran into problems that I cover in a separate blog entry). Another source of information is the LVM HowTos. Other than those two pages other web pages were mostly junk.
  • Ubuntus native webbased administration tool was too limiting. Only a few services were supported. I installed webmin instead. Webmin comes as a Debian package and a clear concise installation script. It supports a full range of services (including a nice LVM administration).
After the basic installation I added servers as required:
  • File services, I installed Samba. Configuration was straight forward. Adjusting security required a bit of fiddling as the modifications recommended on the Ubuntu wiki page were simply not correct. I followed the original Samba documentation and got usable results.
  • Print service, I installed a HP 4500DN on the server. The printer driver that comes with the Alternative CD is different from the one that comes installed from the LiveCD. It allows for duplex printing, 3 Trays and even PCL works fine. I copied the PDD file to all workstations and get better results and faster print times.
  • DHCP server installed fine. Defining scopes was straightforward, help from the ICS homepage was available and useful.
  • DNS server required some tweaking. I use the DNS server internally and also service several domains externally. Not so straight forward was the adjustment to allow dynamic DNS updates only internally. I will cover this in a separate blog entry.
  • OpenSSH requires not separate configuration
  • VMWare Server and web administration will be covered in a separate blog entry.
The server runs stable. LVM survived some tweaking and several power outages. Just as expected.

7.10 -> HP 8510p

Started to install 7.10 Tribe 5 on my HP 8510p from a downloaded LiveCD.
  • Bootup worked to the selection screen
  • Default installation dropped out into BusyBox, an ash recovery console
  • Tried with kernel parameters -irqpoll and -irqfixup (both were successful on my server). No success
  • Tried kernel parameter -noquiet -nosplash. This showed that the harddisk would not be recognised. 8510p has a 120GB SATA which worked in native mode (BIOS setting)
  • Changed BIOS SATA to Disable native mode -> 7.10 booted ok from LiveCD
  • Installed on the local harddisk. Boot worked fine
  • Changed SATA setting in the BIOS to enable native mode, booted fine still
As 7.10 rc came out that very evening, I did a complete reinstall (as there was not much customizing done yet).

7.10 rc did not hickup with SATA native mode enabled. Installed without any flaws. I ran the customizing from there.

Saturday 13 October 2007

Migrating Thunderbird nx8220 -> 8510p

I use Thunderbird as my Mail and Calendar client. Main reason for this is that Thunderbird has an excellent spam filter built in. My current settings are:
  • Thunderbird 2.0.0.6
  • Additional address books
  • IMAP and POP connections
  • Extended German dictionary
  • Dictionary switcher 1.1.2
  • Enigmail 0.95.3
  • Lightning 0.5 (2MB version that supports calendar publishing)
  • QuoteColors 0.2.8
  • QuoteCollapse 0.7
  • Signature Switch 1.5.4
Target machine is the HP 8510p. Here are the results:
  • Thunderbird 2.0.0.6 works fine.
    I had trouble maintaining the date format (US format shown, EU format required).
    I installed language-pack-de.
    In .profile I added a line to export LC_TIME=de_AT.utf8. This did the trick
  • Addressbooks had to be exported on the source machine and re-imported on the target machine. Only the default address book (abook.map can be copied)
  • Extended German dictionary went in ok.
  • Dictionary switcher 1.1.2 works fine. Due to installed language pack I see all English and all German settings. This can be awkward but works
  • Enigmail 0.95.0 was installed from the repository (originally I installed a separate xpi). Adding the keys for communication required me to copy the folder .gnupg onto the target machine.
  • Lightning 0.5 could not be installed (32 bit version). Even the 64 bit version crashes the system. Installing Ubuntu package lightning-extension 0.5-0ubuntu4 works. Copied storage.db to get all calendar setting and data.
  • QuoteColors 0.2.8 works fine
  • QuoteCollapse 0.7 works fine
  • Signature Switch 1.4.2 upgraded to 1.5.4 without problem. Added the signatures which I kept in separate files.
Errors I ran into:

I tried to shortcut porting my settings by copying the profile folder. This did not work for several reasons:
  • Some files contain absolute path description
  • The extension folder contained the old 32 bit version of Lightning
  • Thunderbird crashed unexpectedly and none reproducable
I resorted to install a plain vanilla Thunderbird and add extensions and settings iteratively. There is a detailed description of porting profiles in the Mozilla knowledge base. It helped migrating address books, key rings and other account settings.

Installing Lightning from the Mozilla download site resulted in reproducible crashes. Installing from the Ubuntu repository solved the issue.

How I test

I am not an expert in Ubuntu. So all I can do is
  • try to identify incidences
  • isolate the possible cause (by comparing 3 different machines, documenting changes)
  • check for solutions on the web
  • register bug (if it is one) with Launchpad
If possible, I provide additional documentation, logfiles and surrounding information.

My mayor target of testing lies in business application. I do not care much about fancy stuff. If it works, ok, if it does not, so what.

This site concentrates on Ubuntu Linux

7.04 -> 7.10 on nx8220

I upgraded from 7.04 to 7.10 (Tribe 5) by simply downloading the CD and inserting.

Update started no request and went without flaws.

With 7.10 installed, the compiz desktop effects worked out of the box (until an update to xorg 7.2-5ubuntu3. Since then the nice desktop effects are gone again (Launchpad 144077)

All in all the machine is stable. I update regularly and things work pretty stable.

Some known issues:
  • Thunderbird does NOT honor gnome-vfs. They say it should but it does not (Launchpad 105088)
  • Having usplash enabled (kernel parameter splash) the machine hangs after a resume from suspend to RAM (Launchpad 106198, 146489)
  • After resume from suspend, sound does not work (Launchpad 146491)
Other than that there are some minor glitches that do not hinder efficient work

Wolfs configration

Here is my testbed environment:

HP nx8220 notebook (my workhorse):
Pentium M 760, 2GHz, 1GB RAM, 100 GB IDE HD, ATI mobile Radeon 600 (64MB), wireless network
Ubuntu 7.10 rc 32bit

HP 510 notebook (my spouses workhorse):
Pentium M 770, 2,16 GHz, 1GB RAM, 60 GB IDE HD, Intel 945 graphics card
Ubuntu 7.04 32bit

HP 8510p notebook (my future workhorse if it survives my testing)
Intel T7700 2,4GHz Dual Core 2, 2GB RAM, 120 GB SATA HD, ATI Radeon X2600 (256MB)
Ubuntu 7.10 rc 64bit

Server
EliteGroup P956T-A (V1.08), Intel E6600 2,6GHz Dual Core 2, 2GB RAM PC5400 CL4, 1 TB SATA HD, Gigabyte GV RX155256D-RH Radeon X1550 PCI express fanless, Antec P180 case