Gosh! I just found this in my list of draft posts (originally written in early 2010). I thought I might as well post it as it could be useful to someone out there?
Again, this is one of those posts more for me, but hopefully other people might find it useful.
Recently I updated my Arch Linux box
# pacman -Syu
and during this update a new kernel was added – which meant that my VirtualBox installation didn’t work any more, chucking out the following message
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing
With Jabbakam we save a lot of images. All these images are stored in Amazon’s S3. Recently I thought I’d delete some of the test buckets.
Not as easy as I first thought. It turns out that you have to empty buckets before you can delete them. Fair enough, but there didn’t seem to be a way to easily bulk delete hundreds of images.
After some Googling I found Robert LaThanh’s S3Nukem which looked like it would do the job. All I needed to do now was fire up an EC2 instance, install and run. The steps were as follows:
Create an EC2 instance on AWS (I used Ubuntu on a medium instance)
make sure it is all up-to-date
apt-get update
apt-get upgrade
install ruby (if not already installed)
apt-getinstall ruby1.8 ruby1.8-dev
(not sure about ruby1.8-dev, but added just in case)
As some of you know, whilst Emacs is my editor (et al.) of choice my favourite window manger is Awesome. Awesome is, according to the website,
.. extremely fast, small, dynamic and heavily extensible using the Lua programming language
I’ve never delved into Lua before, but since using Awesome I’ve had to play around with a bunch of config files. They have always looked very clean and simple so, this weekend, with a spare couple of hours to kill I thought I’d have a play around with Lua and see if Awesome really is as “heavily extensible” as the claims make out.
A couple of weeks ago I set up real time web analytics on a number of sites with Clicky. Clicky have an incredibly simple API which I thought would be perfect to play around with.
I decided to try and build a widget that displays the total visitors and actions for a specified website. Really simple, but also quite useful. I had never written anything in Lua before, or even played around with widgets too much in Awesome. Fortunately both Awesome and Lua made the whole thing fantastically easy and fun. What follows is the code I wrote, use it if you want to, it’s just an example of what I did with my first attempt, so feel free to extend it as you want.
Following from my dependencyhellproblems the other day my new version of MySQL seems to have all its stored procedures corrupted, displaying the following message when any of them are executed:
Cannot load from mysql.proc. The table is probably corrupted
After a bit of research, I found the simple fix is to run
mysql_upgrade
Problem solved.
Posting it to my blog as a reminder to me to RTFM, and just in case it is useful to some other poor soul out there.
What you have to do is edit the /usr/share/dbus-1/services/org.gnome.keyring.service file, comment out where it says Name=org.gnome.keyring and add the line Name=org.freedesktop.secrets
For example, my /usr/share/dbus-1/services/org.gnome.keyring.service file looks like this:
So today is the day I start building my perfect system. Before getting going, I had a good think about which distro to use for the base install. I’ve been using Ubuntu for about 2 years now and love the ease of package management with apt and aptitude. I had a bit of a play around with Ubuntu Karmic yesterday and I must say it looks fantastic, and with Lucid Lynx only a few weeks away it might come as a bit of a surprise to discover that my choice is a distro I’ve never used before: Arch.
Why Arch?
There are three main reasons I’ve picked Arch over Ubuntu, or even Debian.
I really like the idea of Arch’s rolling release system. My laptop is currently running Jaunty and in order to get the latest packages I would have to upgrade to Karmic. With Arch this is less of an issue.
As mentioned in my initial post, the base system should be small, quick and light. With Arch you can pick and choose exactly what you want at installation time, keeping it bloat free.
Installation was relatively painless, the only two slight issues being:
I chose Auto prepare for partitioning, but I didn’t really know what filesystem to choose. Eventually I opted for Ext4, with so far, no ill effects.
During Boot Device Selection, again I wasn’t really sure what to do, but after some Googling I found this page, whose advice I followed, but just pressing enter.
I restarted and was greeted with a shell prompt. I quickly pinged Google and my network was still up and running through the ethernet on DHCP.
The next step up a non-root user and X. Again, the Arch documentation is excellent.
Setting up X was relatively simple. I originally decided to not opt for hotplugging, which was a mistake because I only have a USB keyboard and mouse, neither of which I could use in X (muppet of the day award goes to me). After turning off the machine and setting up hotplugging, all was fine!
I have been using the Awesome window manager for about a month now. Awesome is a tiling window manager which is heavily geared towards being keyboard friendly, and as it’s name suggests, it is pretty awesome.
Unlike Jaunty, installing the latest stable version of Awesome was a breeze, I simply ran:
# pacman -S awesome
and edited my ~/.xinitrc file adding:
exec awesome
at the bottom. When I started X again, Awesome was there without any problem.
Sound was equally as simple to install, which was a nice surprise.
So my base system is now setup, with my window manager of choice in place and sound ready and waiting for my music collection. And all this running under 100MB of RAM!
After my first foray into the world of Arch I’m pretty impressed. Pacman is very straight forward to use, after a bit of tweaking here and there it has just worked.
Following my previous post about installing PHP5.3 on Jaunty, I have had a few requests about installing it on Karmic. I’ve never used Karmic before so I thought it would be a fun excuse to have a poke about whilst also keeping my blog (sort of) up-to-date.
After freshly installing Karmic (the desktop version looks very nice btw) on a new VirtualBox image and then updating with the latest, er, updates I was ready to begin.
The entire installation procedure is very simple, once all dependencies are met.
Firstly you must edit your sources list to include the DotDeb package repository and the old Jaunty security packages to meet dependencies.
$ sudonano/etc/apt/sources.list
# php5.3
deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all
deb http://security.ubuntu.com/ubuntu jaunty-security main
Now update and upgrade Ubuntu
$ sudoapt-get update
$ sudoapt-get upgrade
You may find that you get the following warning:
WARNING: The following packages cannot be authenticated!
libevent-1.4-2
Install these packages without verification [y/N]?
I just answered Y and continued as normal
Once successfully upgraded then you can install Apache, MySQL and PHP as normal, feel free to cater the installation line to your tastes.
You will get a warning about untrusted packages being installed but this simply means that the PHP5.3 stuff is not signed, so I typed in “yes” and carried on.
After you have installed everything you need to, test it out, either command line:
$ php -v
PHP 5.3.2-0.dotdeb.1 with Suhosin-Patch (cli)(built: Mar 9201010:14:53)
Copyright (c)1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c)1998-2010 Zend Technologies with Suhosin v0.9.29, Copyright (c)2007, by SektionEins GmbH
Or by using phpinfo() page within your Apache installation:
$ sudonano/var/www/info.php
<?PHP
phpinfo();
?>
then fire up http://localhost/info.php and at the top of the page you should see something along the lines of PHP Version 5.3.2-0.dotdeb.1
Note: if your browser asks if you want to download info.php, simply restart Apache and try again:
$ sudo/etc/init.d/apache2 restart
All done. Not quite as simple as on Jaunty, but still better than compiling the source!
Post Script: Before starting this post, I did a quick search looking for tutorials to see if the work had already been done, but couldn’t find anything on installing PHP5.3 on Karmic. As there wasn’t anything I decided to continue with my tutorial and I ended up struggling for an hour or so with the dependency issues. Typically, after I had figured it out for myself, whilst searching for another dependency issue I found this post on the JMOZ blog about installing PH5.3 on Karmic Koala. No idea why it’s not in Google, but either way, damn, I could have saved myself an hour or so!
Today is an exciting day. I have in my possession a brand new custom built computer to use exclusively at the office. I currently use the laptop for both home and office work, but since the laptop is getting a bit old and computer components are so cheap these days I decided to build a work station just for me to use at the office. The best thing is that as it is custom built I can put whatever I damn well want on it – no pre-installed Windows or anything else. I can make it absolutely perfect for me.
I’ll be documenting here in my blog exactly the steps needed to take it from a tabula rasa to my perfect desktop system. Apart from the system being obviously Linux based, there will be a number of things to consider before I get started. If I want it to be perfect, I need to think about what it is that I really need and want from a work only system. So, after a brainstorm this is the breakdown of what I require:
Keyboard Friendly
I am becoming less interested in using the mouse. This is for a number of reasons, firstly it is quicker to keep your hands on the keyboard rather than always having to find the mouse and point and click. Secondly, using the mouse greatly exacerbates RSI and all that jazz. As such a system designed for maximum keyboard usage is important.
Great Web Development Tools
As a web developer this is a no brainer. I need to be able to have the tools for developing websites, testing (at code, server and client level) deployment and client side version control.
Base system should be small, quick and light
Due to point 2, I can see the need for being able to have virtualised instances of Windows running, each running a different version of IE. As such, the base system should be as small, quick and light as possible so it doesn’t get bogged down when I have one (or more) windows running for testing purposes.
Communications
I have to be able to email, chat, and talk with people via my computer
Music and sound
I need to listen to music at work!
Must get on with others
Some strange people out there still use propriety software. My system needs to be able to read Word and Powerpoint and all that stuff.
Not be rude
This is a strange request, but over the weekend I had a friend staying who is an IT administrator for a large international company. He had to do some work on their Windows based infrastructure, so he powered up Vista on my laptop (which I never use*) to log into their systems via the Remote Desktop. Half way through he had to make a couple of calls. When he came back Vista had rebooted and he had lost everything. We narrowed it down to the fact that Vista had updates, installed them and rebooted without even asking for permission. IMO, that is really fucking rude.
Stable
Last, but by no means least, the system has to be solid. I can’t have it crashing on me every hour.
And that is pretty much it. Follow me over the next week or so whilst I sort out my ideal perfect work station.
This is more a post for me than anyone else, but I thought I’d share anyway.
In our team we have a mixture of Linux and Mac users, and we are constantly editing the same files. One of the most irritating things is when a file is saved with Mac line endings instead of Unix line endings (displaying as ^M in Emacs). This happens very rarely, but on the occasion it does I can quickly convert back using the following commands on my Linux box:
I’ve just read quite an interesting article on the Linux Mint blog courtesy of Linux Today. It describes how Clem, a Linux Mint user, managed to get a refund on Windows that was pre-installed on a Dell laptop they purchased, and then donated the money to Linux Mint!
One of the comments tries to argue that Clem shouldn’t have been entitled to a refund as they knew what they were buying. I don’t hold with this argument as last time I tried to purchase any laptop that wasn’t a netbook I found it impossible to buy one without Windows pre-installed – and to make it worse they were pretty much all Vista!
With people like Clem engaging in this kind of action, and with Ubuntu trying to make Linux more accessible to the average user, hopefully one day I’ll be able to purchase a laptop and have a choice of what I put on it.