OpenSUSE Blog

Linux Batch Prepend Header File to Series of Files
Last edited on: 30/09/2010 - 12:38

Have you ever been in a position where you need to prepend a header file to a series of other files? Typically, if you have created a series of program files and needed to add a standard copyright notice at the top of every file in the suite, then this would be the case.

Below is a method of achieving exactly this. We are going to use the UNIX tac command line utility (cat backwards!) to achieve this, and use a shell script for statement to loop though each file in the directory.

The basic syntax will be:

tac program_file prepend_file | tac > new_file

»   Read more
Linux Directory Batch .jpg Image Resizing and Watermarking
Last edited on: 08/08/2010 - 15:22

These days whenever I take digital pictures I always make sure the image quality and image size settings are set to maximum. It makes sense since hard disk storage is cheap, and processors have the power to crunch large files under Photoshop or Gimp.

However, the problems arrive when I want to upload the images to Photobucket for my friends to access. The saved images are usually above 6MB which is a ridiculous size to attempt to upload to these free image hosting services.

»   Read more
openSUSE 11.1 to 11.2 Upgrade: Getting MySQL 5.1 to Work
Last edited on: 23/04/2010 - 11:00

A new version of MySQL, version 5.1, is part of the openSUSE 11.2 upgrade. Once you have got the basic openSUSE 11.2 upgrade working, you will discover to your horror that MySQL is not. There are a couple of changes made to MySQL at this release.

Firstly, The MySQL socket is moved to /var/run/mysql. So you will need to edit your /etc/my.cnf file. Open this file and change all occurrences of the socket path to reflect this new path. So, for example:

socket = /var/run/mysql/mysql.sock

This will occur more than once so make sure you change them all!

»   Read more
openSUSE 11.2: Downgrade PHP 5.3 to 5.2
Last edited on: 23/04/2010 - 11:00

PHP 5.3 is bundled with openSUSE 11.2 which, if you are a Drupal developer, is not a good thing. As of PHP 5.3 the function ereg_replace() is deprecated - and this function is used heavily in Drupal 6 core along with many community modules. I performed the openSUSE upgrade to 11.2, and decided to see what the net result would be with respect to my Drupal development. Drupal generates a load of warnings, most of which are more annoyances than problems, but image_cache doesn't work and I have a dependency on that module so decided to downgrade from PHP 5.3 to PHP 5.2.

»   Read more
Installing Drupal GeSHi Filter Module
Last edited on: 23/04/2010 - 10:56

The installation of the Drupal 6 Generic Syntax Highlighter (GeSHi) module is of course trivial and wouldn't be worth further consideration if it wasn't for its dependency on the GeSHi PHP Library. Every time I come to install a new PHP library on my rig I am always faced with remembering (a) where the PHP configuration file is so it can be edited with a new path, and (b) where to stick the new library on my filesystem.

»   Read more
Bootable openSUSE Linux 11.2 64bit on a USB Memory Stick
Last edited on: 08/02/2010 - 16:29
If you have problems getting your USB memory stick to boot, check out my page on USB memory stick boot problem solving
»   Read more
Bootable Linux USB Memory Stick Problem Solving
Last edited on: 08/02/2010 - 16:25

These notes accompany my Bootable-openSUSE-Linux-11-2-64bit-on-a-USB-Memory-Stick article as a result of the numerous problems I encountered during its authoring. Hopefully this will save you some legwork.

There are three potential areas to investigate if you are having problems with your boot.

  • Does your BIOS support the booting of an operating system off a memory stick?
  • Can your memory stick actually boot?
  • Is the image loaded onto the memory stick capable of booting?
»   Read more
openSUSE 11.1 to 11.2 Upgrade: Grub Boot Settings
Last edited on: 01/02/2010 - 16:17

Firstly, before upgrading your openSUSE box from 11.1 to 11.2, remember that 11.2 comes with PHP 5.3 which is not compatible with Drupal 6 due to the Drupal core reliance on the deprecated ereg() function.

»   Read more
Synaptics Touchpad Woes: Prevent Cursor Jump During Typing
Last edited on: 01/02/2010 - 16:16

Maybe I am heavy-handed, but I have always had a problem when typing on my laptop of the cursor jumping to another part of the screen, and so my typing continues at that point. This is caused by sensitivity of the Synaptics - a merest brush of the touchpad whilst typing results in a mouse tap event.

Thankfully, this can be cured very easily with the syndaemon command. This disables mouse taps for a specified amount of time after typing finishes, with a default setting of two seconds. The command to run during a KDE xterm sessions being:

syndaemon -d -t

»   Read more
openSUSE 11.1 to 11.2 Upgrade: Postfix Errors Solution
Last edited on: 01/02/2010 - 16:15

Having upgraded from openSUSE 11.1 to 11.2 I noticed that local mail wasn't working on my machine. So a command line mail request like:

# ls | mail root

was disappearing. Further investigation was required, and by inspecting my /var/log/mail
# tail /var/log/mail.err

The output indicated that postfix was issuing warnings and errors

Dec 6 09:24:39 laptop4 postfix/qmgr[4521]: fatal: open database /etc/postfix/relay.db: No such file or directory

»   Read more
Syndicate content