Configuring ALSA On Debian Sarge

I needed to configure ALSA on Sarge because I wanted to use Ekiga Softphone and although it supports OSS but the support is not good. It was fairly straight forward process to do that:

ajitabhp@fimbles:~$ sudo apt-get install libesd-alsa0 \ 
gstreamer0.8-alsa esound-clients alsa-base alsa-oss
ajitabhp@fimbles:~$ sudo alsaconf

In the alsaconf screens I answered all the defaults. And once I was done, under the menu item

Applications→Desktop Preferences→Advanced→Multimedia Systems Selector

I changed the default sink and default source to ALSA and Pipeline to alsasink and alsasrc respectively.

Posted in FLOSS | Tagged , , , | Leave a comment

Backporting Ekiga Softphone

Since I use apt-pinning it was quite easy for me to install Ekiga from the backports. The first thing which I needed to do was to configure ALSA on sarge.

Next I just installed Ekiga as:

ajitabhp@fimbles:~$ sudo apt-get install ekiga
ajitabhp@fimbles:~$ sudo apt-get install libpt-plugins-alsa

Next when I ran Ekiga I got an error saying “No usable audio plugin detected”. This was really annoying specially as I have all the required dependencies. Googling around helped me here and I found that the libpt-plugins-alsa needs to be installed from the backports repository and according to my pinning preferences it was installed from the sarge repository. So I had to do:

ajitabhp@fimbles:~$ sudo apt-get -t sarge-backports install \
libpt-plugins-alsa
ajitabhp@fimbles:~$ sudo apt-get -t sarge-backports install \
libpt-plugins-v4l2

This uninstalled the installed libpt-plugins-alsa and install it from the sarge-backports repository.

Posted in FLOSS | Tagged , | Leave a comment

Filesystem in User Space

Setting up sshfs

In order to setup sshfs on a debian system, I needed to install the sshfs packages:

sudo apt-get install sshfs fuse-source module-assistant kernel-headers-2.6
sudo module-assistant build fuse
sudo module-assistant install fuse

While building the fuse module I was asked whether I need a seperate group to be able to use the fusermount command and whether I want this group to be removed when the package is removed and so on. I answered all the defaults. Finally I put myself in the group which I created while building the fuse module.

That’s it, then logout and log back in so that the group permissions can take effect. Or use the newgrp command.

To mount the remote filesystem I first created a main directory to hold all my remote mount-points.

mkdir remote_dirs
cd remote_dirs
mkdir server_1 server_2
sshfs user01@server_1:. server_1/
sshfs user01@server_2:. server_2/

If ssh keys are already setup for a password less login then you wont be asked a password otherwise a password prompt will be displayed where you need to enter the remote servers password.

Posted in FLOSS | Tagged , , | Leave a comment

Apt Pinning

I normally stick with Debian Stable on my laptop. But atleast there was one package which I needed out of testing or unstable, git. So I thought of using the Debian backports repository. I followed the instructions to use the backports repository and came through this very good APT Pinning document. This is how I installed git on my laptop.

I added the following line to my /etc/apt/source.list file

# Debian backports
deb http://www.backports.org/debian/ sarge-backports main contrib non-free

and the following to my /etc/apt/preferences file. I needed to create this file as I was not using multiple repositories before, so I had to make all the entries. However, only the middle entry which pins the priority of the sarge-backports repository is required. If most of the time stable is preferred then the priority of stable has to be higher than that of sarge-backports. The last pinning which specifies the priority of -10 to other Debian releases is just a proactive measure to make sure that if I add a new Debian repository to the /etc/apt/sources.list file then I need to specify a pinning preference explicitly in this file, else it will have the priority of -10 which is lowest or no priority at all.

# Debian stable has a higher priority than the
# backports repository
Package: *
Pin: release o=Debian,a=stable
Pin-Priority: 900
Package: *
Pin: release a=sarge-backports
Pin-Priority: 200
Package: *
Pin: release o=Debian
Pin-Priority: -10

 

Posted in FLOSS | Tagged , | 1 Comment

Streaming with mod_musicindex

Introduction

mod_musicindex is an Apache modules which allows nice displaying of directories containing MP3, FLAC, Ogg Vorbis or MP4/AAC files. This includes sorting them on various fields, streaming and or downloading them. It can also construct playlists and search them.

mod_musicindex started as a C implementation of the perl module Apache::MP3.

It features a cache system, currently based on mirroring the tree structure handled by the module, storing files data using a flat text file backend. The project plans to support MySQL, PostgreSQL and SQLite backends in future.

If a picture of CD cover is also added in a directory, it will be displayed in the upper left corner of the web page and as a thumbnail in the parent directory. The file name of the picture must match the following scheme:

"(.){cover,folder}.{jpg,png,gif}"

eg: “cover.png” or “.folder.jpg” are valid names.

The musicindex directory (usually found in /var/www/, atleast on Debian and Ubuntu) contains a sample musicindex.css file which can be tailored as per requirement.

Setting up mod_musicindex on Debian

Since Debian provides a package for it, yes in Sarge too, its extremely simple to install:

apt-get install libapache2-mod-musicindex
ln -s /etc/apache2/mods-available/musicindex.load musicindex.load

Next comes the configuration. The location of music files in the web-root is a personal choice. If you are running a dedicated music server then perhaps you have a complete document root and a virtual server in place. I setup this on my laptop which is also my development machine. UserDir is configured on my machine so I did the following:

vi /etc/apache2/mods-enabled/userdir.conf
        Alias /songs /home/*/www/songs/

        Options Indexes MultiViews FollowSymlinks
        AllowOverride       Indexes
        MusicLister         On
        MusicSortOrder      album disc track artist title length bitrate freq filet$
        MusicFields            title artist length bitrate
        MusicAllowDownload  Off
        MusicAllowStream    On
        MusicAllowSearch    On
#       MusicRssItems       Off
        MusicPageTitle      home
        MusicCssDefault     musicindex.css
        MusicCachePath      /tmp/musicindex
#       MusicIceServer     [ice.domain.my]:8000
#       MusicCookieLife    300

The advantage of this setup is that the module becomes available to all users in the system if they place all audio files in a directory called songs in their web-roots.

Screenshots

Here are some screenshots from my server:

Posted in FLOSS | Tagged , | Leave a comment