Powered by Linux signature

I use this little snippet of code which generates my signature for all my out-going emails. I am just trying to be an Open Source advocate and spreading the word about Linux

#!/bin/bash

powered="$(head -n 1 /etc/SuSE-release)"

kernel=`uname -r`
echo "Powered by $powered Kernel: $kernel"

kde=`kde-config -v | grep KDE`
echo $kde

uptime

I use KDE and hook this script in kmail via the “Identities” > “Signature” tab

And here is a more generic version without KDE or OpenSuSe specific calls

#!/bin/bash
powered="$(lsb_release -d | awk -F':' '{print $2}')"

kernel=`uname -r`
echo "Powered by $powered Kernel: $kernel"

uptime
Posted in Linux, openSuSe | Leave a comment

Getting rid of the pass-phrase dialog at Apache startup time

If you have installed an SSL certificate for your Apache web-server with a pass-phrase setup on the server key, then when you start or restart apache server, this dialog pops up asking you to enter the pass-phrase for the private key. The RSA/DSA private key inside your server.key file is stored in encrypted format for security reasons. The pass-phrase is needed to be able to read and parse this file. When you are sure that your server is secure enough you can remove the pass-phrase from the server.key by performing the following steps:

Make a backup of the encrypted key

cp server.key server.key.encrypted

Export the key

openssl rsa -in server.key.encrypted -out server.key

Enter the pass-phrase at the prompt

Enter pass phrase for server.key.encrypted:
writing RSA key

Update the permissions to be Read-only by root user

chmod 400 server.key

So now when you start/restart the Apache server, you should not be prompted to enter the pass-phrase for the server key as it is not encrypted anymore.

Posted in Linux | Leave a comment

New Seven Wonders

As of today(23/06/2007 – by the time this entry is published) exactly 14 days are left to announce the “New Seven Wonders” of the world, out of the 21 final contestants. The campaign of Swiss non-profit organization New7Wonders began in 2000 and the announcement will be made on July 7, 2007 – appropriately 07.07.07 – in Lisbon, Portugal. The event will be broadcast around the world.

Vote for the greatest symbol of Love & Passion

The Taj Mahal
The Taj Mahal is still strongly in the reckoning but needs all the votes it can get to make it to the final list of seven. New7Wonders describes Shah Jahan’s architectural paean to his beloved as the greatest symbol of love and passion.

So What Are You Waiting For? Vote for The Taj Mahal

Continue reading

Posted in General | 2 Comments

Mounting an ISO image in Linux

If you ever want to mount an ISO image file without burning it to disk, this is how I would do it. First I would confirm that the ISO image file is really an ISO image file by executing the following:

file openSUSE-10.3-Alpha5-KDE-i386.iso

This should return an output like:

openSUSE-10.3-Alpha5-KDE-i386.iso: ISO 9660 CD-ROM filesystem data 'SU103Alp.001' (bootable)

Having confirmed that it is an ISO image, I then mount the ISO image file through the loop-back device to “/media/SU103Alp.001″ directory.

Continue reading

Posted in Linux | 1 Comment

openSuSe 10.2 Reference Manual

If you haven’t known about it yet, grab it. Its not the most comprehensive of manuals but it has got me unstuck a few times. You can download the openSuSe 10.2 Reference Manual from my files repository. The online version can be viewed at Novell’s Website, which also includes few other manuals.

Posted in Linux, openSuSe | Leave a comment

Mounting Partitions that are within a disk Image

If you have played around with virtualisation technologies, specifically Xen, then you may have experienced creating a disk image. To create a disk image on Linux, I execute the following command:

dd if=/dev/zero of=OpenSuse-10.2.img bs=1024k count=0 seek=5000

This would have created for me an image which is approximately 5GB in size. And then I format it to an ext3 file-system with:

mkfs.ext3 OpenSuse-10.2.img

If I now run a file command against this image, it should tell me what type of file-system it is.

file OpenSuse-10.2.imgOpenSuse-10.2.img: Linux rev 1.0 ext3 filesystem data (large files)

Thats all fine when there is a single partition for your disk image. Recently I happened to encounter a problem whereby there was more than a single partition on an image.

Continue reading

Posted in Linux, Virtualisation | Leave a comment

svn:externals – Linking external libraries


Linking to libraries in your projects

If you happen to use external libraries in your projects, you often find that you add the whole library into your project and commit it into your project repository. This ends up with a whole lot of external sources choking up your project. This also prevents maintaining newer versions of those libraries in your project in an efficient manner as there is no record of what version of the library was used.

Externals definitions

Fortunately, Subversion provides support for externals definitions. An externals definition is a mapping of a local directory to the URL – and possibly a particular revision – of a versioned resource. In Subversion, you declare externals definitions in groups using the svn:externals property. You can create or modify this property using svn propset or svn propedit commands. It can be set on any versioned directory, and its value is a multi-line table of subdirectories (relative to the versioned directory on which the property is set) and fully qualified, absolute Subversion repository URLs.

Continue reading

Posted in Linux, Software | Leave a comment

MySQL Database backup script

This script I have here has saved me a number of times from embarrassment. Many a times I happened to have “accidently” dropped an entire database (in phpmyadmin) while wanting to drop only a few tables. Apparently the big-fat “drop” button at the top navigation is related to the database than the tables you have selected in the listing.

The script has the ability to dump your database tables and upload them to an ftp server or email the compressed sql file to your email address. I haven’t written this entirely on my own but with help from various people on discussion forums. Post back your comments and improvements if any.

Continue reading

Posted in MySql | 2 Comments

My Mandriva 2006 Repository is Live

I have put together a collection of RPMS which I have built for various projects I am involved with or was required by me. You can access these RPMS for Mandriva 2006 by executing the foolowing commad on the shell.

urpmi.addmedia jeffery http://jefferyfernandez.id.au/RPMS with hdlist.cz

The list of available packages on the repository can be seen by accessing this list

Posted in Mandriva, Packages, RPM | Leave a comment

Updating Mandriva Menus

I have often found that after installing a package on mandriva, the application does not seem to appear in the menu listing. Here is a quick fix to make the application link appear in the menu. Execute the following on the shell:

update-menus -vv

The double “vv” option is just to show the verbose output. Obviously this will only take affect if the actuall application had been setup (during packaging) to be run from the menu system.

Posted in Mandriva | Leave a comment