HOWTO: Disable pulseaudio in Ubuntu

This has been tested on Ubuntu 12.04.1 and 12.10 x86_64

I got myself a USB DAC and a set of nice headphones for Christmas. One of the main concerns was that the new hardware must work with Linux since Linux is my main OS at home. As it turns out most USB DACs work out of the box with Linux as they are standard USB compliant sound devices.

All modern Linux distributions seem to use pulseaudio as a front-end for ALSA these days. The thing that pulseaudio does is to remix all audio streams in software which is a bad thing if you have some nice audio gear that probably can do this much better.

The following explains how to uninstall pulseaudio and to configure ALSA on a per user basis. It also explains how to up-sample your audio from spotify, deadbeef, vlc and so on via ALSA.

Continue reading

Disk check script

It has been a while since my last update to this site. Now the time has come for another post. :-)

A few days ago I visited UDS-r in Copenhagen Denmark. I met a lot of nice people and got the chance to hear about the plans for the next release of Ubuntu.

The trip to UDS was fantastic but on my way home i got mail from my server telling me that one disk had failed. Bummer! That ruined the day for me. Lost a few files because i had not taken a backup for a couple of weeks.

Continue reading

Time Machine for Linux – Bash and Rsync

Recently i made “the switch”! Not in the way you might imagine though. Ever since 2003 i have been a passionate mac user. I still use macs at home and work and am still passionate about them.

Before 2003 i was playing a lot of games. Linux was and is something that i have been working/playing around with since 1996. To make a long story short: I wanted to use Linux and also play games (read dual boot linux/windows). The price tags on new macs ware also something that got me thinking about building a new shiny i7 based PC.

I am now back on a PC with Ubuntu Linux 9.04 and Windows 7. So far so god. One thing that i enjoy with Linux is that i am able to customize it to my needs. With Linux now being my primary OS (by choice) i had to fix some kind of backup for photos and all that other stuff on my PC that i would not like to loose in case of an accident. The first thing that came to my mind was rsync.

I used rsync to mirror my files on to an usb-disk. But after a few days i started to miss Time Machine which i was using when i had a Mac as my primary computer at home. Just mirroring files was not enough to give me that warm and cozy feeling. I needed to go back in time!

Continue reading

Shell Script Examples: case, count, for, if, while and User input

If you, like so many other people these days, switch to Linux you will come in contact with something called unux scripts, shell scripts or bash scripts. These scripts are text-files that execute commands just like bat-files in Windows. I prefer shell-scripts because i think they are more powerful then bat-files but that is just my opinion.

Some things you should know:
#!/bin/bash usually is the first line in a bash script. It is called shebang (also called a hashbang, hashpling, or pound bang) and specifies in which shell to execute the code that follows below.

Everything after a # is a comment and does not get executed.

Below you will find examples of a few things that you can do with shell scripts on Linux and other Unixes. If you have questions: have a look at the man page of the command or post a comment and I will try to explain.

Continue reading