Chroots 0.2 – First Public release

Chroots is a collection of bash scripts to create, maintain, manage and use several chroot environments on debian based systems. It sports such features as privilege drop, multiple chroot maintenance and caching.

This is the first public release, under GPLv3. The software is now in a state where I can use it every day to maintain chroots. To download the source code, use the link below. There is also a git repository available for cloning. Chroots is developed under Ubuntu, and can build debian and Ubuntu chroots through deboostrap.

December 10, 2008

ffmpeg with xvid, h264 and libfaac on Ubuntu Intrepid

I haven’t blogged for a while now, guess I need a new redesigned template, which seems to boost my blogging ability. But here is a simple and short guide to build ffmpeg with the appropriate codecs to encode stuff for the PSP or iPod. These codecs aren’t enabled by default to legal (patent) issues.

You should have the medibuntu repository enabled for this to work.

Get some tools to build tje package along with the ffmpeg source in Ubuntu Intrepid. Then get the appropriate packages to build ffmpeg, and satisfy the evil codec dependencies:

apt-get install dpkg-dev devscripts
apt-get source ffmpeg
apt-get build-dep ffmpeg
apt-get install libmp3lame-dev libfaac-dev libxvidcore4-dev libx264-dev

To finished up, go into the sources directory, build the package with the external codecs and install everything after it finishes building the debian package. Note that the first command is optional, and is just to bump the package version so that is “newer” that the original repositories:

dch -i
DEB_BUILD_OPTIONS=externalcodecs dpkg-buildpackage -rfakeroot -us -uc
dpkg -i *.deb

And that is it. Look for scripts that use ffmpeg to encode stuff for the PSP or iPod. There are plenty around. I’ll post my favourite at a later time.

October 31, 2008

Howto Tracks GTD on Ubuntu Hardy

As I (re)evaluate my GTD workflow, I’ve been testing a couple of applications that may help me increase my productivity while becoming a distraction or burden to manage. The next one on my list is Tracks. I decided to put forward a quick howto because it might not be that trivial for some users to git this running with Ruby on Rails.

So tracks going on your Ubunty Hardy you just need to install a few packages, most importantly ruby, ruby gems and sqlite 3 support. Then you just need to enable the sqlite3 gem for Ruby on Rails. Copy paste commands below:

sudo apt-get install rake rubygems libsqlite3-ruby
sudo gem install sqlite3-ruby

Then just follow the instructions on the tracks website. But, if your are lazy as me you can just copy paste the information below, which is a nice quick cheat sheet:

Get tracks, unzip into a folder. Go into that folder and edit the configuration file, making it look like the example shown here for sqlite3:

gedit config/database.yml
development:
adapter: sqlite3
database: db/tracks-dev.db

test:
adapter: sqlite3
database: ":memory:"

production:
adapter: sqlite3
database: db/tracks-main.db

Change a variable in config/environment.rb by putting whatever in it:

gedit config/environment.rb
SALT = "MakeThisYourRandomPhraseToGenerateSalt"

Build it:

rake db:migrate RAILS_ENV=production

Run it:

./script/server -e production

And that’s it, you should just be able to point your browser at http://localhost:3000 and give it a try. I personally don’t think that Tracks is my cup of tee, but it’s worth a shot.

One a side note, this is probably my last post before my summer break, so I’ll be back in a couple of weeks, I hope.

August 4, 2008

A usable dark theme for Ubuntu

After reading this entry on planet gnome, I thought to myself: “Another try at fail”. I like dark themes. Dark themes are soothing on the eyes, and at least for me, tend to make a much better work environment because they annoy less. Hey, my blog theme is dark, I like it.

Dark Theme

After using apt-get to install the ubuntustudio-theme package, I was amazed at the first theme that bring dark windows with light background not compromising usability for a dark theme. Don’t take my word for it, here’s a screenshot:

So far, every dark theme I encounter before is a try at fail mostly because they are not usable. Attention is brought to lines, row or text, like Gtk TreeViews in evolution by using a bold font on a dark background, or a little icon that glows just a little bit more than the rest. This is hardly usable, since you fail to get the visual hints needed to quickly parse through an inbox for example. The same goes for the desktop calendar. Try a dark theme and find your events on it and let me know.

This one doesn’t fail like the rest. I’m not saying it’s a perfect theme, I’m not sure about the window borders (too thick), or about the icons, or even the bright blue highlight colors (but it’s customizable). I’m gonna stick with it, play with it some more, and be happy for a while.

July 26, 2008

Taking Epiphany for a second (default) spin

Since I upgraded to Ubuntu hardy, I’ve been trying to give Firefox 3 a fighting chance, mostly because of all the hype around it, along with a couple of bumps with Epiphany.

With Epiphany using the gecko backend, it was hard adding exceptions for every website using self-signed certificates, or broken certificates, including my own, due to the interaction which was covered in Firefox but no in Epiphany. I even started my own Certificate Authority (it’s just a bash script). All of this made me give Firefox a try for a while..

But, after a while, I have come to dislike all the things that made switch to Epiphany in the first place. It’s slugish, it eats all my memory, and makes me squirm in pain…

On the other hand, Epiphany feels lightning fast, snappy and doesn’t eat all my RAM. Meanwhile, with the updates in Ubuntu Hardy 8.04.1 adding SSL exceptions is not a broken process that equals fail. It shouldn’t be easy though, but it should be doable.

Does anyone have any hard facts if the page rendering is faster on Epiphany than on Firefox ? Or is that just a “feeling” people get ?

I can only wait to check out Epiphany with webkit! In the meantime, I’ll take it as it is, and make it my default once again.

July 20, 2008

RadeonHD (git) on Ubuntu Hardy with DRI (3d) support

Here is a quick recipe to getting the latest and greatest radeonhd open source driver for the R5XX/R600 driver series, but this time with dri support. Ubuntu Hardy already has a radeonhd package, but as expected is not updated from the git repo, and does not include the dri extensions. This is an update on previous posts for gutsy and feisty.

Install compile tools and git:

sudo apt-get install build-essential autoconf automake libtool pkg-config git-core

Install driver dependencies, now with dri deps also:

sudo apt-get install libdrm-dev x11proto-gl-dev mesa-common-dev xutils-dev \
x11proto-xf86dri-dev x11proto-fonts-dev x11proto-randr-dev x11proto-video-dev \
x11proto-xext-dev x11proto-render-dev xserver-xorg-dev

Checkout the source code:

git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd/

Last but not least, compile and install

cd xf86-video-radeonhd/
autogen.sh --prefix=/usr --enable-dri
make
sudo make install

And you’re all set. Don’t forget to change the driver to radeonhd on your /etc/xorg.conf.
I’ll try to follow this up with the -ati counterpart… For now, go test. Feedback welcome.

June 17, 2008

Web Development – Improved Ubuntu Workflow

Following my previous post on Web Development Workflow, I decided to be done with my procrastination and setup a local workflow, which keeps me location independent and autonomous.

The work flow is simple: Develop and test locally, deploy remotely. I’m currently applying this towards the development of an improved theme for my blog, which is basically this one, plus minor adjustments.

My setup is an Apache 2 webserver, with PHP and mySQL. On top of this I enable user dirs for the webserver, and deploy a local wordpress, which in fact runs a backup database from my production site.

First , install apache2,php and mysql support:

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server

Now enable user directories support (things like localhost/~jonhdoe which actually live in /home/johndoe/public_html) and create the public_html folder:

sudo a2enmod userdir
mkdir $HOME/public_html

Another twist, since this is my main workstation and I don’t want an apache+mysql setup running all the time, is to remove all of the startup scripts from the default boot runlevels:

sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove

I then run a script to start my environment when I want to code some web bits:

#!/bin/bash

/etc/init.d/apache2 start
/etc/init.d/mysql start

Don’t forget to make the script executable:

chmod +x bin/start-web-dev.sh

After all this I just installing web apps locally. In my case I just install Wordpress by uncompressing it into public_html, creating a DataBase using phpmyadmin, and running the install. After that I went to my production wordpress exported the DB, and imported it on the local wordpress. And I’m done.

As a finally twist I created a git repository of my theme, so i just modify+commit+push, and pull on the main website. Since I can push only when I need or can, this setup is really working for me.

Any further enhancements are welcome, so feel free to drop some suggestions to improve on this.

May 4, 2008

Ubuntu Hardy Heron

The Hardy Heron

The Ubuntu Hardy Heron is upon us. It was released last week. I have already been using it for over a month now, all the way back to the first beta releases, and I can say it’s a well polished release, with some new features and usable by beauty and geek alike. For the first time, suspend really works on my laptop (even with a proprietary graphics driver) and that is something to celebrate. Maybe we could have an Ubuntu Release Party next time ?

But, there is a downside to this release: Firefox 3.0 beta 5 is still quite unstable, with several bugs, and particularly bad Flash support. Bug #192888 is particularly nasty and annoying, since you have to trade crashes for lack of sound within flash animations. If you need to use Firefox 3.0, then hold off on the update for a couple of days until an update comes down the apt pipe . Beyond that, another great release by the Ubuntu team.

(Foto by suneko posted at Flickr, shared under a Creative Commons License.)

April 28, 2008

Top Ten

My top ten looks like this:

$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
161 ls
85 cd
46 vim
33 make
28 clear
21 ll
16 rm
15 svn
14 sudo
10 touch

What does your top ten look like ?

April 10, 2008

Ubuntu Hardy Heron – Spread the word

Shameless plug follows (this is my site, I can do it, if I want to :) ):

You can also do your bit. Take a look at Jono Bacon’s post and see how.

March 27, 2008