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. Read the rest of this entry »

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.

Read the rest of this entry »

Install (Set Up) OpenGoo on Ubuntu

OpenGoo is requires PHP 5.2+, MySQL 4.1+ and Apache 2.0+ so to get your AMP stack installed you can run the taskel command here:

sudo tasksel install lamp-server

Now there are more things you might want to address regarding that install, there is quite a bit of configuration that I hope to cover in a later post. The default install should be adequate except for a change to the php setup, you will want to edit the /etc/php5/apache2/php.ini file. Find the “memory_limit=” line so that you can modify it from probably 16MiB to 32MiB, OpenGoo requires at minimum 10MiB but we moved this to 32MiB just to be safe. Also you will want to install the gd module for php:

sudo apt-get install php5-gd

Once that is completed you can move on to the install. First thing will be to create a schema in your database, and a user that has access to that schema. I suggest giving the user access specifically over the localhost connection and none other. Once the database is prepped you just need to download opengoo and unzip it into a folder in your webroot. Navigate to this folder using your web browser and opengoo will ask you for some database credentials… and your finished.

If you have any tips and tricks with this software I would be happy to hear about it!

Install (Set Up) Uncomplicated Firewall (UFW)

Uncomplicated Firewall is a tool to create rules for iptables. Iptables are rule-sets that are used by netfilter which provides kernel-level packet manipulation and in turn… a firewall. It is important to note that UFW is not a firewall, it is however a tool for configuring the firewall in Linux. Obtaining proficiency with iptables takes time and effort, as a result there has been some successful front-ends written for iptable set up over the years. For terminal based configuration ufw is excellent, however there are some graphical based firewalls also available to configure iptables.

Read the rest of this entry »

Thunderbird + Lightning (Migrate from Evolution)

I was an avid Microsoft Outlook user right up until my adoption of linux as my primary operating system about eight months ago. Going cold turkey was easy becuase I fell right into Gnome’s Evolution email client. Evolution is great for email, however address book management and calandering can be quite lacking. So I now have seven emails, three calenders and about two hundred contacts that need to be migrated into another solution. Thunderbird is a cross platform compatable email client from mozilla and with the lighnting plugin you can have robust calender support.
Read the rest of this entry »

Tunnel Traffic through SSH with a Socks Proxy

If you have a laptop then you surely have been in a situation where you need to have a secure connection while on the move. This is most important when you are at a random hotspot and need to log into a non-secure site (authentication over http) or do not trust the vendor providing the connection. If you have access to a server running SSH then you can use a great feature in openssh to set up a SOCKS proxy and route all your traffic through. This is very similar to VPN’ing but you can do it on the fly and dont have to have an special client software on your machine.

This is written specifically for Unix based systems with some stuff even more specific for Gnome. If you are using Mac OSX, Linux or Unix variants you can set up the proxy with the commands but telling your system to use the tunnel may vary. Under windows there is a way to perform all these same things with putty, my apologies for not covering that here. If you are a windows user and cant find any good documentation please let me know I would be happy to write it up.

Read the rest of this entry »

RAID gets Revisited (TLER and the WDTLER utility)

I have a friend that I talk about computer parts and prices with non stop, he spends a lot of time down in the trenches with enthusiasts and keeps his finger close to prices on almost all PC components. Recently he let me know that 500GiB Western Digital hard drives (WDC500AAKS) were going used for about $50. My original array was built out of 6 of these drives, and brand new 1TiB drives are hovering around $100. So a couple of fedex boxes later I am the new proud owner of some 1TiB drives.

I have heard horror stories about these drives regarding RAID arrays, with them dropping out for no reason and causing the array to degrade and rebuild. Looking a little further, in particular the newegg reviews, I found that by enabling TLER (Time-Limited Error Recovery) all of the issues with RAID on these drives are solved. In fact one of the only major differences between the Caviar line of HDDs from Western Digital and the RE line is this TLER feature. Lucky for the poor college kids in the computing crowd Western Digital makes a tool named WDTLER that will enable or disable TLER on Western Digital HDDs.

TLER exists because there are sometimes conflicts in whether the error handling should be undertaken by the HDD or the RAID controller, if TLER is not enabled the drive can be marked as unusable and cause significant performance degradation. With TLER enabled the HDD will wait for the RAID controller to resolve errors up to the amount of time that has been set. In my case Ihave set the drives to their recommended RAID times of 7 seconds.

Read the rest of this entry »

File Syncronization in Linux

There is a great tool in unix and windows to perform file synchronization called Unison. Unison shares a number of features with other file management/tracking packages (CVS, SVN, BitKeeper). It also runs on windows and many variations of Unix, and provides the ability to sync across platforms without worry.

I really need to sync my schoolwork and settings for varios programs (Evolution, Pidgin, Firefox) between my main desktop and laptop. To do this in Unison you need to create profiles for each directory that will need synchronization. You can do this with the GUI, but ultimately I would check the profiles in your ~/.unison directory. Here is an example where I am syncing my documents:

Read the rest of this entry »

Transcoding Video for Zune 4GiB/8GiB/80GiB

My brother has a zune that my parents bought him, this all took place unknown to me because I would have suggested an ipod or something else. Not that the little player is bad, the software for Zune is so terrible that I wont even begin discussing the issues I have had with it.

Handbrake can convert video from all kinds of sources to something readable by your zune, I will discuss the presets for handbrake here and they should work for all Zunes except the Zune 30 because it doesn’t support MPEG-4 or H.264. If you have a Zune 30 you can use these methods to convert video, however the Zune software will convert whatever your videos are to WMV during the syncing process.

Read the rest of this entry »