Archive for May, 2009

Disable PC Speaker on Ubuntu

Recently did an install on my girlfriends laptop of Ubuntu 9.04 (E1705) . Everything went really well excpet for the obnoxious PC Speaker beeping all time. So to disable this guy you need to edit the blacklist file:

sudo nano /etc/modprobe.d/blacklist.conf

Now you need to add this at the bottom so that your computer wont load the pcspkr module next time it boots:

# Damn PC Speaker is annoying
blacklist pcspkr

Restart the machine and you wont hear that obnoxious beeping anymore!

OR Remove the Module

You can also remove the module as was pointed out below. This may be a better solution because you do not have to restart and it takes immediate effect.

sudo rmmod pcspkr

VirtualHosts on Apache2 (Multihost & Sub-domains)

Several times now I have seen questions in IRC or from friends on how to configure apache2 for multiple hosts and sub-domains. This is a fairly simple task, do not get tempted into using tools such as webmin to handle this kind of configuration for you. It is easy to cripple yourself by using such tools as primary configurators instead of understanding how the systems work. (more…)

Install (Set Up) Git and Gitosis on Ubuntu

Git is a free distribution revision control initially created by Linus Torvalds for the Linux kernel development. Git is different from subversion in several was, a good solid reference for explanation can be found from a 2008 RailsConf talk on Git by Scott Chacon: (Link).

I will be using Gitosis for this setup, Gitosis is a tool written for Git that helps in the setup of secure access controlled repositories. It will manage multiple repositories under one user account on the host machine. Using SSH keys to identify users, your repositories will be securely accessed and controlled. One large advantage to Gitosis is that your users will not need shell accounts on the machine to access repositories, they will however speak to a singular account what will not allow arbitrary commands.

Git is very local in nature, with remote distributed features. One major thing to wrap your head around is that git resides on your machine and tracks files locally, so if you create a new file and want git to track that file you need to let git know through the add command. Git also has remote locations that give it the ability to push to a, you guessed it…, remote location. You can add many remotes, typically you will see the “origin” remote location in most projects, we will be using origin in this article.

Before you start with this, note that I will try to explain every step as best possible. Some of the other guides out there will lead you along without the explanation, do yourself a favor and avoid the temptation to try and do this quickly… understand as much of git as possible, it will save you time down the road.

(more…)