Windows XP Themes

This post reviews the most popular free for download themes for Windows.

Themes for Windows XP often requires different types of heavy and resource demanding 3rd party software, e.g. like ThemeXP and others. In this post I have collected the most popular themes that do not require additional 3rd partysoftware.

The Luna Theme
The Luna Windows XP theme is the traditional Windows XP theme. The Luna themeaka the official Windows XP Style is available in three different color schemes; Blue (the default), Olive Green, and Silver.

The Energy Blue Theme
The Energy Blue theme is a theme concept produced by Microsoft and introduced in 2004 for the Windows Media Center and Windows XP Tablet editions. It is composed of a new redesigned wallpaper (inspired by Windows XP Bliss) and a new desktop theme and skin. The concept presents aesthetic brilliant and relucent blue and green colors. The Energy Blue theme is not only available for Windows Media Center and Windows XP Tablet editions, but also regular Windows XP editions.

Download the Energy Blue theme here.

The Royale Themes
The Royale theme is a new theme for Windows XP that has leaked out of Microsoftand onto the web. The theme appears to have come out of a beta version ofWindows Media Center 2005 that was in testing. The Royale theme is an aesthetic theme and comes with two color schemes Royale (a blue theme) and Royale Noir (a black theme). The Royale theme is refreshingly different to the traditionalWindows XP Luna theme.

Download the Royale theme here and the Royale Noir theme here or here (1).

The Zune Theme
After the Royale and the Royale Noir themes were leaked onto the web Microsoftdecided to release a modified version of the Royale theme called Zune – perhaps to promote the release of their new invention – the Zune. The Zune theme is different to the Royale and the Royale Noir themes by having orange controls and a orange start-button.

Download the Zune theme here at Microsoft

Matching Firefox Themes
Until now I have been unable to find matching themes for Mozilla Firefox. I’m currently searching the net for a Firefox theme that matches the Royale Noir theme.

Comments off

Howto Install Sun Java on Debian Etch

This small guide shows how to install the original Sun Java 2 Platform Standard Edition 5.0 JRE (Java Runtime Environment) and JDK (Java Developer Kit) on Debian 4.0 Etch
.

The original Sun Java 2 is available in the ‘non-free’ section of the Debianrepositories. To enable this section first add the non-free repository to the apt sources file – the /etc/apt/sources.list should look like, – important parts are in bold:


deb http://ftp.us.debian.org/debian/ etch main contrib non-free

Now, update apt:

sudo apt-get update

Then install the Java debian packages.

sudo apt-get install sun-java5-jre

Or this for installing the JDK ( the Java SDK )

sudo apt-get install sun-java5-jdk

Comments off

Xen Howto: Install Windows

This short guide describes how to install Windows XP orWindows 2003 Server on Xen. It provides an overview of theDebian Linux Etch installation, and detailed steps for installing and configuring Xenand starting the Windows XP or Windows 2003 Server
installation.

Requirements

  • CPU with either Intel’s Vanderpool (IVT – Intel Virtualization Technology) orAMD’s Pacifica Technology (AMD virtualization)
  • Windows iso-image

First you need to install Xen on Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils

Boot into the newly installed Xen enabled Linux kernel

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:

(network-script network-bridge)

Install Xen IO Emulation tools:

sudo apt-get install xen-ioemu-3.0.3-1

Create a directory for the virtual machine files e.g. /home/xen/domains/win01 and create a disk image for the virtual machine’s primary disk.

mkdir /home/xen
mkdir /home/xen/domains
mkdir /home/xen/domains/win01
sudo dd if=/dev/zero of= /home/xen/domains/win01/disk.img bs=1M count=4096

Establish a Xen machine Configuration file (/etc/xen/win01.cfg) like this

kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '256'
device_model='/usr/lib/xen/bin/qemu-dm'

# Disks
disk = [ 'file:/home/xen/domains/win01/disk.img,ioemu:hda,w',
'file:/home/cc/iso-images/WindowsXP-SP2/image.iso,ioemu:hdc:cdrom,r' ]

# Hostname
name = ‘win01′

# Networking
vif = ['type=ioemu, bridge=xenbr0']

# Behaviour
boot='d'
vnc=1
vncviewer=1
sdl=0

The ready to fire up the new machine and start the Windows installation in a vnc terminal.

xm create win01.cfg

After the virtual machine is started – a VNC server port should be available on port 5900 at the Xen server’s IP, e.g. 192.168.1.102 – A VNC XEN Client session is depicted here.

If an error like this shows up

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart

For more on creating Xen virtual machines read this guide, which outlines the features of the xen-tools package.

Comments off

Optimize MySQL for Low Memory Use

MySQL is a light database engine compared tomany of it’s rivals, but for some reason theDebian MySQL-server package contains a setup that makes it very heavy and memory consuming. The Debian version of becomes memory consuming because it comes with config file where MySQL’s most memory consuming and seldom used storage engine InnoDB is enable. As result of this the MySQL server instance uses around 100MB of memory while almost idle.

And here comes the optimization tip.

Since the InnoDB storage engine is used very seldom it can be disable in most cases and let the server save almost about 100MB of memory.

To disable to InnoDB storage engine add this to my.cnf (the default MySQLconfiguration files) in /etc/mysql/
skip-innodb

More on MySQL and Apache optimization and here

Comments off

Syntax Highlight Code in WordPress Posts

From time to time I post code snippets in blog posts. Today I found a wordpress plugin, Code Snippet 2.0, a plugin that eases code posting by escaping the the code right. And moreover Code Snippet 2.0 displays the code with highlighting. The plugin uses GeSHi syntax highlighter engine – a flexible and easy extendable highlighter engine.

Install

  • Download the plugin here
  • Copy archive to wp-content/plugins directory
  • Extract the zip file
  • When extracted properly you should have a directory structure like: /wp-content/plugins/codesnippet
  • Enable the Plugin in WP-admin

Usage

<code lang="php">
< ?php
echo "Hello World";
?>
</code>

Result:

< ?php
echo "Hello World";
?>

The list of supported languages in Code Snippet 2.0:

  • actionscript-french
  • actionscript
  • ada
  • apache
  • applescript
  • asm
  • asp
  • bash
  • caddcl
  • cadlisp
  • c_mac
  • c
  • cpp
  • csharp
  • css-gen
  • css
  • delphi
  • diff
  • div
  • dos
  • d
  • eiffel
  • freebasic
  • gml
  • html4strict
  • ini
  • inno
  • java
  • javascript
  • lisp
  • lua
  • matlab
  • mpasm
  • nsis
  • objc
  • oobas
  • oracle8
  • pascal
  • perl
  • php-brief
  • php
  • python
  • qbasic
  • sdlbasic
  • smarty
  • sql
  • vbnet
  • vb
  • vhdl
  • visualfoxpro
  • xml

Comments off

Installing Xen on Debian Etch 4.0

For a long time I have tested many different virtualization techniques; Xen, VMWare, and Microsoft VM. Until now I’m able to conclude that all of them are usable on my desktop machine, but bothVMWare and Microsoft’s VM are more sluggish that Xen. This weekend I deployed my first server based on the upcoming Debian Etch andXen. Everything worked out of the box.

Here is what I did to install Xen on Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils

Boot into the newly installed Xen enabled Linux kernel

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:

(network-script network-bridge)

Install xen-tools:

apt-get install xen-tools

Xen tools is a collection package containing different tools related to Xen, a virtual machine creator etc.

Edit adjust the kernel and initrd parameters in /etc/xen-tools/xen-tools.conf to match the ones on your system:

Find out what the kernel image and initrd is named by:

ls /boot/vmlinuz*
/boot/vmlinuz-2.6.18-4-686 /boot/vmlinuz-2.6.18-4-xen-686

and

ls /boot/initrd*
/boot/initrd.img-2.6.18-4-686 /boot/initrd.img-2.6.18-4-686.bak /boot/initrd.img-2.6.18-4-xen-686

Adjust the lines

#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.18-4-xen-686
initrd = /boot/initrd.img-2.6.18-4-xen-686

Further adjust the xen-tools.conf to this settings:

dir = /home/xen
debootstrap = 1
size = 4Gb # Disk image size.
memory = 128Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = etch # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.

Create a home for all the coming virtual Xen guests:

mkdir /home/xen
mkdir /home/xen/domains

And then ready to create a virtual machine – guest, simply by:

xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd

Afterwards I was able to fire up the newly created virtual machine with:

xm create mailserver.cfg

If an error like this shows up

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart

When up and running either “xm list” or “xentop” can be used to get an overview of what instance are currently running

debian5:# sudo xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      874     1 r-----    657.9
mailserver                                 3      128     1 -b----      8.0

Based on my experiences so far with virtualization and deploying virtualization in a enterprise setup, I really think that Xen is a very strong asset for Linux and Linux based distributions to show the world what they are up to. Virtualization is really a technique for enterprise server and data center managers to make a more robust and simplified setup, and I think that virtualization could play a significant role within the server market the coming years.

Comments

Howto setup SPF (Sender Policy Framework) on a domain

SPF is a Policy Framwork that helps fighting return-path address forgery and makes it easier to identify spoofs. Domain owners identify and pinpoint sending mail servers in a DNS record, and thereby its posible for SMTP receivers (e.g. MTAs like Exim, Postfix, Qmail etc.) to verify the envelope sender address against this information, and can distinguish authentic messages from forgeries before any message data is transmitted.

Create a SPF record
The easist way to create a SPF record is to use this online tool: openspf

Deploy the SPF record
To use the newly created SPF record on a domain, make sure you have access to create a TXT-DNS record for the given domain. If you have access to create a TXT-DNS record all you need is to create such a TXT-DNS record containing the SPF record information, and you are done.

Comments off

Howto PHP / Java bridge on Debian

Updated 20. Marts 2007

The PHP / Java Bridge makes it possible to run use java objects within your PHP code. For example; let’s say you have a jar-file containing some functionality you may want to use in a PHP application.

To use this you must have a Java installed – either the latest version of Java (JDK) or a black hawk version installed.

Get the source code php-java-bridge_3.0.4.tar.bz2 from the PHP / Java bridge website and unpack it with

wget http://switch.dl.sourceforge.net/sourceforge/php-java-bridge/php-java-bridge_3.0.8.tar.bz2


tar xvjf php-java-bridge_3.0.4.tar.bz2


cd php-java-bridge-3.0.4


phpize - in order to use this you'll need to have the php5-dev package installed


./configure --with-java=/usr/lib/j2sdk1.5-sun - be sure to set this to the path where the Java installation is located

If the ./configure command fails because the automake version is less than 1.6 try this

apt-get install automake1.6
update-alternatives --config automake

Select version 1.6 of automake in the update-alternatives dialog and then try to run ./configure again

Now we just need to compile and install, this is done by:

make
make install-modules

Add this line to php.ini in order to enabled the PHP/Java bridge extension:

extension=java.so

Comments off

BisonCam ( ALi M5603C ) Linux driver round up

I have written this as a round up on my search for a Linux driver for the built-in webcam in my Asus A3N series notebook. The built-in webcam in my book is built on a micro chip from Ali and it is named m5603c, more in general the chip is sometimes refered to as m560x. I found that this m560x chip is used in a lot of different devices and even other notebooks like the Asus A6 series.

Right now – it seems that there are a few projects focusing on creating a driver for m560x chip, currently I have noticed these ones.

  • SANE m5603c backend
  • Ali M560x Linux Driver Project
  • ALi USB2 M5603C Video Camera Controller – Seems stalled

Until now I have assembled this list of devices that are build upon the m560x chip.

  • Asus Z9100G notebook series
  • Sweex webcam
  • Asus A6 notebook series
  • Q-TEC Webcam 300 USB 2.0
  • Trust SpaceC@m 360
  • Creative Live Pro
  • USB 2.0 Webcam 1.3 Megapixel
  • Genius VideoCam Slim USB2

Please leave a comment – if you know a device or driver project not listed here

Comments

Block referer spam easily

I have built this small tutorial because somebody kept requesting different urls on the server with referer spam. The tutorial shows how to block referer spamon a Debian 3.1 server with a apache 2 webserver by using mod_security

Install mod_security

debian21:~# apt-get install libapache2-mod-security
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  mod-security-common
The following NEW packages will be installed:
  libapache2-mod-security mod-security-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 274kB of archives.
After unpacking 737kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.sunsite.dk stable/main mod-security-common 1.8.7-1 [240kB]
Get:2 http://mirrors.sunsite.dk stable/main libapache2-mod-security 1.8.7-1 [34,4kB]
Fetched 274kB in 0s (682kB/s)
Selecting previously deselected package mod-security-common.
(Reading database ... 28605 files and directories currently installed.)
Unpacking mod-security-common (from .../mod-security-common_1.8.7-1_all.deb) ...
Selecting previously deselected package libapache2-mod-security.
Unpacking libapache2-mod-security (from .../libapache2-mod-security_1.8.7-1_i386.deb) ...
Setting up libapache2-mod-security (1.8.7-1) ...
Setting up mod-security-common (1.8.7-1) ...
debian21:~#

 

Enable the newly installed module

debian21:~# a2enmod mod-security
Module mod-security installed; run /etc/init.d/apache2 force-reload to enable.
debian21:~#

 

Add this setup to your apache2.conf or your .htaccess file

<ifmodule mod_security.c>
    # Turn the filtering engine On or Off
    SecFilterEngine On

    # Make sure that URL encoding is valid
    SecFilterCheckURLEncoding On

    # Unicode encoding check
    SecFilterCheckUnicodeEncoding Off

    # Only allow bytes from this range
    SecFilterForceByteRange 0 255

    # Only log suspicious requests
    SecAuditEngine RelevantOnly

    # The name of the audit log file
    #SecAuditLog logs/audit_log
    # Debug level set to a minimum
    #SecFilterDebugLog logs/modsec_debug_log
    #SecFilterDebugLevel 0

    # Should mod_security inspect POST payloads
    SecFilterScanPOST On

    # By default log and deny suspicious requests
    # with HTTP status 500
    SecFilterDefaultAction "deny,log,status:500"

    # Block request with suspicious referers
    SecFilterSelective "HTTP_REFERER" "(holdem|poker|casino|porn)" deny,nolog,status:500
</ifmodule>

 

And then restart apache

debian21:~# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2.
debian21:~#

 

Then run a few test requests to ensure it works as we intended it to

debian21:~# wget http://localhost/ --referer=http://www.holdem.com
--15:33:34--  http://localhost/
           => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
15:33:34 ERROR 500: Internal Server Error.

debian21:~#

 

It blocks the request just like we thought it would.

 

debian21:~# wget http://localhost/ --referer=http://www.google.com
--15:33:43--  http://localhost/
           => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,009 [text/html]

100%[========================================>] 1,009         --.--K/s

15:33:43 (9.62 MB/s) - `index.html' saved [1009/1009]

debian21:~#

 

The request passed right trough as intended ;)

And we are done.
This is only one way of preventing referer spam, some others have done a similar block by using the built-in Linux firewall called iptables. Perhaps more on using iptables as blocking mechanism another time.

Comments off