Tuesday, July 31, 2007

Dreaming about Blowfish and Daemons

I've had a moment with Ubuntu, yes one of those moments where your eye develops a twitch. So I quietly and calmly backed-up my files, rebooted and wiped my hard drive, a few times :)

I decided to reinstall OpenBSD 4.1, and so far I'm loving it. The freedom and the experience of the command line is unlike any other. After all the command line is why I wanted to learn a Unix based system in the first place.

I'd forgotten how excited I feel working with the commandline. I'm actually looking forward to using my computer again.
My servers don't have GUI's yet it's been a while since my desktop was a command line.
Everything is very fast, I almost don't know myself. I feel as though I'm flying along.

I think I'll be dreaming about blowfish and daemons tonight ;) If I ever get to bed that is.

Wednesday, July 25, 2007

Turning Ubuntu's Brown Eyes Blue

I mentioned in my post yesterday, that I've been having trouble looking at Ubuntu's orange theme.

The orange is wonderful for attracting people, for grabbing attention, and drawing you in and in these ways it certainly works. However looking at it all day can become a bit much.

There is a solution though. In the Ubuntu repositories there is a gnome theme called Blubuntu. Some elements of this theme I'm not keen on. Yet overall my eyes are thanking me.

Installing Blubuntu
It's really easy to make Ubuntu blue. First open Synaptic, and do a search for blubuntu.
As you can see here there are a number of results. I would suggest installing them all.
If you want to just install Blubuntu-theme you can.

*Note: If you only install the Blubuntu-theme then you only need to read: "Selecting the Blubuntu theme" below. The rest will not apply.

Once the packages have installed you need to select them as follows.

Selecting the Blubuntu theme

To select the blubuntu theme you need to go to System / Preferences / Theme:

Once the Theme Preferences dialogue is open you need to select Blubuntu from the list:

Now you have the blubuntu theme installed, you'll notice that your icons, selection colour, window borders and more has changed.

If you are unhappy with any part of this theme you can customise it further. To do this hit Customise on the side of the Theme Preferences dialogue.

Selecting the Login Window (GDM)
Selecting the Blubuntu login window is really easy. Just Go to System / Administration / Login Window. You will need to enter your password.

Select the local tab at the top of the dialogue box and then choose the "Blubuntu" theme (or another blue theme) from the selection. Make sure that the radio button is on.

You might also want to change the Background colour, in this dialogue box.
The Background colour is the colour that appears between the login window and the desktop being displaying. (Where the splash screen appears.)

Selecting the Splash screen
To change the splash screen you first need to open a terminal.
(There are other ways of doing this, yet this is the quickest.)

Then backup old splash image:
# sudo cp /usr/share/pixmaps/splash/ubuntu-splash.png /usr/share/pixmaps/splash/ubuntu-splash.png.bak
# sudo cp /usr/share/pixmaps/splash/ubuntu-slick.png /usr/share/pixmaps/splash/ubuntu-slick.png.bak

Now copy the new image and replace the ubuntu-slick.png.
# sudo cp /usr/share/pixmaps/splash/ubuntu-blubuntu.png /usr/share/pixmaps/splash/ubuntu-slick.png

*Note: This will automatically change ubuntu-splash.png to the new image, because it is just a link to ubuntu-slick.png.

There you have it a nice fresh blue look throughout your system. If you are not happy with any part of it, there are many more options at Gnome-look. Check it out, your eyes will thank you. There are some very talented people out there. Thanks guys.

Monday, July 23, 2007

Stunning icon theme

Yesterday I installed a new icon theme in gnome. I'm very happy with it.

It's beautifully done, and very complete. The artist has obviously taken a long time in construction.

I don't normally play around with icons, yet I've been having trouble looking at the Ubuntu orange all the time. This is a very nice change.

The theme is called: AER-OS-XK. It's 58.96 MB. You can download it at gnome-look here: AER-OS-XK

Installing the theme
First download it. Now open Theme preferences (in Ubuntu click on: System / Preferences / Theme). In Theme preferences click the Customise Button on the right.
In the new windows that opens select the Icons tab at the top. Then click install, navigate to where you downloaded the AER-OS-XK.tar.bz2, and select it.
It will take a long time to install, as there are many icons. Yet I think it is worth it. I'm enjoying using them. I hope you do too.

Sunday, July 22, 2007

New Blog, and new theme

If you have been wondering what I have been upto...
Come and check out my new Blogger theme. I have been busy creating it over the past couple of days. I'm really happy with it. There are still a couple of niggling things that I will look into. Yet overall I really like it.

I have also been preparing another blog: Of Tea and Turtles. This is going to be my personal blog. Of TnT will be about my personal development, opinions, thoughts, links, music, health and other things non computer related.

I have been getting annoyed having to mix information and technical howto's with with my personal thoughts and notes.
Hopefully this will make things easier for you and me.

Therefore the focus on Geekybits³ will now just be Computer related.

Wednesday, July 11, 2007

Installing Wordpress on OpenBSD

To install Wordpress in OpenBSD you need to have a web server, (e.g. Apache) with PHP and a MySQL database.
OpenBSD already comes with Apache. Therefore we only need to install and configure MySQL, PHP and Wordpress.

Starting the Apache (httpd) server
To start Apache from boot edit /etc/rc.conf and change this line:
To read:
For more information see my tutorial how to start the Apache (httpd) server.

Now reboot then test that Apache is working.
I don't like moving on to the next step until each step works. Then if there is a problem I know what was working last, and where the problem is likely to be.

Installing MySQL Database Server
To learn how to install, and configure MySQL to work inside of chrooted Apache please see my tutorial: Installing MySQL Database Server.

Now test that MySQL is working.

Creating a Database in MySQL for Wordpress
After installing, and configuring MySQL we need to create a database and a database user for Wordpress.
I will call my Wordpress database: wordpressdb, My user: kris and my password: new-password. Please change these to suit your situation.
# mysql -u root -h localhost -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE DATABASE wordpressdb;
Query OK, 1 row affected (0.04 sec)

mysql> GRANT ALL ON wordpressdb.* TO kris@localhost IDENTIFIED BY 'new-password';
Query OK, 0 rows affected (0.02 sec)

| Database ---|
| wordpressdb |
| mysql ------|
| test -------|
5 rows in set (0.02 sec)

mysql> \q

Installing Wordpress
Once you have finished creating a MySQL database we can install Wordpress. I'm going to use pkg_add(1)'s interactive mode (-i) so that I can choose which version of wordpress I want to install:
# export PKG_PATH=ftp://ftp.nara.wide.ad.jp/pub/OpenBSD/4.1/packages/i386/
# pkg_add -i wordpress

Ambiguous: choose package for wordpress
1: wordpress-2.0.7
2: wordpress-2.2.1
Your choice: 2
wordpress-2.2.1:libiconv-1.9.2p3: complete
wordpress-2.2.1:expat-2.0.0: complete
wordpress-2.2.1:gettext-0.14.6: complete
wordpress-2.2.1:libxml-2.6.26p0: complete
wordpress-2.2.1:php5-core-5.1.6p1: complete
wordpress-2.2.1:php5-mysql-5.1.6p2: complete
wordpress-2.2.1: complete

Configuring php5
Before we can use Wordpress we need to configure php for use inside of the chrooted Apache: in /var/www/. To do this I ran the following commands:
# /usr/local/sbin/phpxs -s
# cp /usr/local/share/examples/php5/php.ini-recommended /var/www/conf/php.ini
# chown root:www /var/www/conf/php.ini
# chmod 640 /var/www/conf/php.ini
# mkdir /var/www/tmp

Now enable the php MySQL module:
# /usr/local/sbin/phpxs -a mysql

Lastly we need to inform Apache that we have PHP installed, by editing the httpd.conf file and add the following:
# vi /var/www/conf/httpd.conf
LoadModule php5_module /usr/lib/apache/modules/libphp5.so

AddType application/x-httpd-php .php .php4 .php3 .htm .html
AddType application/x-httpd-php-source .phps

Now edit the DirectoryIndex line in httpd.conf to read:
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3

Testing php5
# vi /var/www/htdocs/phptest.html
<?php phpinfo() ?>
Now in your browser open the phptest page, e.g. http://www.yoursever.tld/phptest.html

NOTE: It is a really good idea to remove this page once you have tested php, as it could be a security risk.

Configuring Wordpress
WordPress has been installed into /var/www/wordpress, which is not the document root.

You could point this to the DocumentRoot of your web-server:
# ln -s ../wordpress /var/www/htdocs/wordpress
(make sure you use a relative symlink since Apache is chrooted)

However I want to create two blogs. Therefore I shall copy the contents of the wordpress directory into /var/www/htdocs/

Creating blog one
# cp -rp /var/www/wordpress /var/www/htdocs/one
Creating blog two
# cp -rp /var/www/wordpress /var/www/htdocs/two

Now I need to edit wp-config.php in both blog directories, and add the database information in each.
# vi /var/www/htdocs/one/wp-config.php
// ** MySQL settings ** //^M
define('DB_NAME', 'wordpressdb'); // The name of the database^M
define('DB_USER', 'kris'); // Your MySQL username^M
define('DB_PASSWORD', 'new-password'); // ...and password^M
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value^M

With the second blog I will also change the $table_prefix option, so that I can use the database created above for both blogs:
# vi /var/www/htdocs/two/wp-config.php
// ** MySQL settings ** //^M
define('DB_NAME', 'wordpressdb'); // The name of the database^M
define('DB_USER', 'kris'); // Your MySQL username^M
define('DB_PASSWORD', 'new-password'); // ...and password^M
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value^M
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = '2wp_'; // Only numbers, letters, and underscores please!

Now in your browser go to: http://your-server.address.tld/one/wp-admin/install.php. This should set-up the database tables needed for your blog.
NOTE: If there is an error, double check your wp-config.php file, and try again.

Then follow each of the steps on the page. Make sure you note the password given to you.
The install script should then send you to the login page. Sign in with the username: admin, and the password generated during the installation. You can then click on 'Profile' to change the password.

Have fun with your new Wordpress blog.

Tuesday, July 10, 2007

OpenBSD Tip: Installing MySQL Database Server

Installing the MySQL Database Server, in OpenBSD is needed for a number of different applications. Including Wordpress, which is what I have been playing with today.

Installing MySQL
First if you don't have PKG_PATH set then set this first, then install mysql-server. For a package server near you please see: FTP mirrors
# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/
# pkg_add mysql-server

mysql-server-5.0.33:mysql-client-5.0.33: complete
mysql-server-5.0.33:p5-Net-Daemon-0.39: complete
mysql-server-5.0.33:p5-PlRPC-0.2018p0: complete
mysql-server-5.0.33:p5-DBI-1.53: complete
mysql-server-5.0.33:p5-DBD-mysql-3.0008: complete
mysql-server-5.0.33: complete

Configuring MySQL
The mysql-server package doesn't initialize a default database. The following command will create one:
# /usr/local/bin/mysql_install_db

Now we need to temporarily start mysql to set the root access password for the database. Changing 'new-password' to a password of your choosing.
# /usr/local/bin/mysqld_safe &
# /usr/local/bin/mysqladmin -u root password 'new-password'
# /usr/local/bin/mysqladmin -u root -p -h Your-server.name.tld password 'new-password'

Verify the server is running by using the 'fstat' in the following example:
# fstat | grep "*:" | grep mysql
_mysql mysqld 29321 15* internet stream tcp 0xd6121af4 *:3306

To start MySQL from boot, edit /etc/rc.conf.local:
# vi /etc/rc.conf.local
Then edit: /etc/rc.local:
# vi /etc/rc.local
After the 'starting local daemons' and before the following echo '.' Insert the following into the /etc/rc.local file:

if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ]; then

echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=256 &

for i in 1 2 3 4 5 6; do
if [ -S /var/run/mysql/mysql.sock ]; then
sleep 1
echo -n "."
# Apache chroot Settings

mkdir -p /var/www/var/run/mysql
sleep 2
ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock

# Postfix chroot Settings
if [ "X${postfix_flags}" != X"NO" ]; then
mkdir -p /var/spool/postfix/var/run/mysql
sleep 2
ln -f /var/run/mysql/mysql.sock /var/spool/postfix/var/run/mysql/mysql.sock


Now every time you restart; the machine will check to see whether you have enabled mysql in the rc.conf (rc.conf.local) file then start the mysql daemon. To disable mysql we can simply change mysql=YES to mysql=NO

After restarting verify the server is running again:
# fstat | grep "*:" | grep mysql
_mysql mysqld 29321 15* internet stream tcp 0xd6121af4 *:3306

Once the above startup script has worked you can change the mysqld_safe line to something like:
/usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=1000 > /dev/null 3>&1 2>&1 &

For more information, and different configurations please see:

Using MySQL
MySQL security
Remove history
The MySQL history file ( /.mysql history), contains all executed SQL commands, even passwords, (which are stored as plain text). We can easily clear the contents of this file:
# cat /dev/null > /.mysql_history

Disable remote access
If you are only going to use MySQL on this server, (i.e. the database will be used only by locally installed applications) then you can disable remote access. MySQL listens on tcp port 3306, we can disable listening on the port by doing the following:

# vi /etc/my.cnf

Improve local security
The next change is to disable the use of LOAD DATA LOCAL INFILE command, which will help to prevent against unauthorized reading from local files.
# vi /etc/my.cnf

Change admin name
It is also recommended to change the default name of administrator’s account (root), to a different, and harder to guess one.

mysql> UPDATE USER SET user='dbadmin' WHERE user='root';

Now you should have MySQL up and running on your OpenBSD server. Good luck, and have fun.

Sunday, July 08, 2007

OpenBSD Tip: Starting Apache

Apache is included in a basic install of OpenBSD. However it is not running by default. Starting Apache in OpenBSD is really easy. You can start the server manually or automatically.

Automatic: To start Apache every time the computer starts/restarts you need to do the following:

Edit /etc/rc.conf and change this line:
To read:
httpd_flags="" # note the use of two double-quotes
Then save the changes. When the computer is restarted, the Apache server (httpd) will automatically start.

Manual: To start Apache manually you need to run the following command:
# /usr/sbin/apachectl start
/usr/sbin/apachectl start: httpd started

Testing your Web Server: To test your webserver point your web browser to your servers IP address, or use lynx on the webserver like this:
# lynx localhost

[ lynx displays the following ...]
It Worked!

If you can see this page, then the people who own this host have just
activated the Apache Web server software included with their OpenBSD
System. They now have to add content to this directory and replace this
placeholder page, or else point the server at their real content.
[ ... cut ... ]
The Document Root directory (the directory where all of the server's web pages are stored) is /var/www/htdocs. You can now place your web pages in this directory.

Virtualization using VirtualBox

For the past couple of days I have been playing around with VirtualBox.

VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).
For more information please see: About VirtualBox.

VirtualBox 1.4.0 was realised on June 5, 2007 for Windows and Linux. It now contains support for 64bit Linux Hosts, as well as better networking and storage solutions, (for full details please see: Changelog.)

I have tried a earlier version of VirtualBox, but had limited success installing it. The new version installed perfectly.
I used Automatix in Ubuntu 7.04 ("Feisty Fawn") to install it. Yet there are many other binary versions, including a beta version for OS X, (Intel Macs only). For downloads please see: VirtualBox Downloads.

So far I'm very impressed with VirtualBox. In my opinion it's the best virtualization software I have tried to date. I've found it professional, and easy to use. I feel like the programmers have really thought about how to make this a good product from a user standpoint. Also it is OpenSource, what a wonderful bonus.

There are a number of problems, (to be expected with a new piece of software). Yet each time I have gone to write a bug report; the problem has either been fixed and is available in SVN (subversion) or it's currently being fixed. That impressed me.

Unfortunately there is a problem running OpenBSD, and NetBSD as vm's (virtual machines). Yet the issue has been solved in SVN.

I'm running a FreeBSD vm and it is beautiful. I thought I might have trouble as the machine I'm running it on only has 512MB of RAM, however it's been wonderful. I wouldn't recommend any less than 512MB though. When I close VirtualBox it cleans out the RAM amazingly well.

I will write more about it, when I can install some more virtual machines to play with. I'm intrigued to see if DragonflyBSD, and Slackware will work in it.

If you would like information on installing and using VirtualBox please see:You can download VirtualBox here: Downloading VirtualBox.

EDIT: As pointed out by one of my readers VirtualBox is actually released under two licences (dual licensing). There are two versions:
The Open Source Edition (OSE) is released under the GNU General Public License V2 and:
The full VirtualBox package, which is free of charge for personal use or evaluation purposes is released under the Personal Use and Evaluation License.
For more information please see: VirtualBox Licensing FAQ.

Friday, July 06, 2007

A fresh start

Now that I have realised that my lack of confidence isn't because of my own inadequacy, it's much easier to move on. I can't blame anyone else for my low self-esteem. For if I don't have confidence in myself no one else will.

I want to make a fresh start!

My partner and I are going to start our own business. We're heavily researching this topic. We want to go in with our eyes open. Having everything in place before jumping in. I'm so excited. I really think that this is going to be brilliant.

I didn't really want to have a job anyway. I was only after the experience in the industry. Yet after reading this article: 10 Reasons You Should Never Get a Job, I KNOW we can do this.

I have a new found drive to get on with my life. I'm sick of listening to the naysayers the critics. I'll never get anywhere if I keep allowing people to tell me I can't.

Pay no attention to what the critics say. A statue has never been erected in honour of a critic.
~Jean Sibelius
I'm only hurting myself! It will probably take me a while to not look at myself through others eyes. Yet if I don't start trying I will never get anywhere.

Thursday, July 05, 2007

Lack of confidence

I feel like I have had a massive wake-up call today. After reading the following article: Gender Differences: Recognizing and Developing Potential in Female Students. I realised many things about the way I have been feeling.

Before I went to TAFE Tasmania I knew what I knew. I was confident when it came to computing. I was actually proud of my abilities. If you know me; you'll know that's a pretty big deal.

After I started TAFE my confidence dropped. At times almost completely. I'm not even sure about something when I KNOW the answer. Pretty silly aye.

I feel like I was set-up to fail at TAFE. All the projects I was asked to do were impossible to pass. Even when I explained why they where impossible I was made to do them anyway.
What got me was the teachers were then shocked, and disappointed when I failed the tasks. In the end I was made to feel like I only graduated by the good graces of one of the teachers. I was shown over and over again that I couldn't compete in the IT industry, and that my skills where highly inadequate.

I don't know why they teach IT here in Tasmania, as there is NO IT industry, which kinda makes a Technical diploma mute. That probably makes my diplomas worthless. Yet I digress.

After reading this article I have realised that it's perhaps not my abilities at fault. Perhaps it is more that my confidence has taken a massive knock. Perhaps it is more the way that I learn, and how that has not been nourished.
I feel as though I have been letting all of this get to me so badly. At times I'm even worried to do things on my own network.

Also when I think back to my schooling, I might have let it get to me there as well. I am a very logical, and technically minded person. Yet I left college (Year 11 and 12 in Australia) thinking that I would be lucky if I was smart enough to even wash dishes.

Now I have a new outlook on all of this. I want to start believing in my abilities again. I want to find a way to build up my confidence. I know that it'll be hard. I probably need to achieve something small to help bring it back up.
Yet I am grateful that I have realised that it probably isn't my abilities, and knowledge. Maybe I can do this. I guess time will tell.

Wednesday, July 04, 2007

Ubuntu tip: Turning off tooltips

When you hover over anything in Ubuntu Yellow boxes pop-up (Tooltips) and give you information. Personally it bugs me really badly. If you are like me; turning them off is really simple.

Note: the quotation marks are not part of the names.

First right click on the "Applications" button in the top panel, then click "Edit Menus". e.g:

When the menu editor opens click "System Tools". In the right column you will see: "Configuration Editor" Tick the box next to it, and close the menu editor. e.g:

Now click on "Applications" then "System Tools" then "Configuration Editor". Once the configuration editor opens click the arrow next to "apps", then click the arrow next to "panel". This expands the menus. e.g:

Now select the "global" folder. and in the right column untick the box next to "tooltips_enabled". e.g:

There you have it. Annoying yellow boxes gone :)

Tuesday, July 03, 2007

Things you may not know about Wikipedia

I found this link today and I think it is worth sharing. I leaned a couple of things I didn't know. So perhaps it might help you as well! Nine Cool Things You Didn’t Know You Could Do With Wikipedia. The thing I am loving the most is: Wikiversity:

Wikiversity provides tutorials and worksheets on subjects ranging from AJAX programming to Philosophy. Wikiversity is currently woefully incomplete, but many subject have lengthy, well-written tutorials.
There is some awesome information here.