Shell Person Help me keep the shell people alive.


The Trouble with the Framebuffer

The original plan

I've tried for a long time to have a usable, console-only, desktop linux system.  By console-only, I mean running without (a.k.a. X).  I thought the key to this would be using the framebuffer.  Here's wikipedia's definition of the framebuffer, but in short it allows displaying graphics without running X.  When the framebuffer is enabled (some systems enable it by default), the first thing you notice is that the console font is smaller and nicer.  This alone makes the console considerably more usable, as the screen doesn't scroll nearly as much, letting you see more at once.  However, that's not all you can do with the framebuffer.  You can also view PDFs, images, and video (using mplayer) with the framebuffer, and even compile complex programs to use the framebuffer instead of X (i.e. gimp, using GTK-DFB).

The main thing that stood in the way of my console-only desktop system is a modern browser.  Now supposedly Firefox has been compiled for the framebuffer, as has uzbl.  However, I've had no luck with either, and I've sunk a fair amount of time into the task.  And links-g just doesn't cut it for me.


Install SCMPC – Audioscrobbling MPD to in Ubuntu 9.10


I've been using SCMPC to scrobble my music played with MPD to for a couple of years now. I can't find a package for it in the repositories, but it's easy to install from source. The source hasn't changed in almost 3 years, but it still seems to be working fine.

Here's how I installed it in Ubuntu 9.10 Karmic Koala.

The SCMPC homepage is here. You can download the source at this link.

First install the dependencies you'll need:

sudo apt-get install libargtable2-dev libconfuse-dev libdaemon-dev

You may also need libcurl (I apparently already had it).

Then extract the source code (the file was scmpc-0.2.2.tar.bz2 in my case) by right-clicking and selecting "Extract here". In a terminal, cd into the directory you just extracted. Then just:

sudo make install

That should install it. Now create a directory for the config file in your home directory:

mkdir ~/.scmpc

You can copy a template for the config file:

cp /usr/local/share/scmpc/scmpc.conf ~/.scmpc/

And then fill in your own details.

Or you can just make your own. Here's copy of mine.

log_level = debug
log_file = "/home/james/.scmpc/scmpc.log"
pid_file = "/home/james/.scmpc/"
cache_file = "/home/james/.scmpc/scmpc.cache"
mpd {
	#host = "localhost"
	#port = 6600
	#timeout = 5
	#password =
audioscrobbler {
	username = "my_user_name"
	password_hash = "a_hash_of_my_password"

I keep all of SCMPC's operating files in ~/.scmpc

I use password_hash= instead of password= so I don't have to store my password in plain text. You can get a hash of your password like this:

echo -n your_password | md5sum

Don't include any spaces or the dash ( - ) symbol that follow the hash.

Now just start SCMPC and restart MPD. Add SCMPC to your startup programs (System -> Preferences -> Startup Applications) if you want it running at startup.

sudo /etc/init.d/mpd restart


Installing MPD & MPC in Ubuntu 9.10 Karmic Koala

more flowers by Abbie F (C) via Flickr

(The above photo is "more flowers", by Abbie F (C) via Flickr).

EDIT: After running the setup described herein for several days, I've uninstalled PulseAudio and use ALSA instead. While PulseAudio may be a theoretically better system, its implementation in 9.10 is perfectly awful. Not only was MPD/MPC constantly crashing, but sometimes I'd lose sound system-wide. Also once Pulse is gone, you can roll back to Adobe Flash 9 (with sound!), which is infinitely better on my machine than 9.10's implementation of Flash 10.

The installation wasn't as straight-forward as I'd hoped, so maybe these notes will help others. This is specifically for Ubuntu 9.10 Karmic Koala (I'm running the 32 bit / i386 desktop edition), running the default pulse audio.

Install from official sources:

sudo apt-get install mpd mpc

Symlink your music folders to MPD's default watch folder:

sudo ln -s /path/to/music /var/lib/mpd/music

Update your MPD database. The new version of MPD has changed some things about the "mpd --update-db" command, so you should use:

mpc update

At this point I could play music, I just couldn't change the volume. I got the following error:

error: ACK [52@0] {setvol} problems setting volume

The problem was that MPD was trying to use ALSA instead of pulse audio. Edit the MPD configuration file to enable pulse audio. Find the Audio Output section of the file and add or un-comment the following lines:

audio_output {
type "pulse"
name "My MPD PulseAudio Output"

I did follow the instructions at regarding the PulseAudio Preferences (paprefs), but I don't know if it's necessary.

Finally, add the user "mpd" to the PulseAudio groups in order to give it permission to use PulseAudio:

sudo usermod -aG pulse,pulse-access mpd

Restart MPD:

sudo /etc/init.d/mpd restart

That's what worked for me.


Moving from Ubuntu to Debian


I get the impression that most people are migrating the other direction, from Debian to Ubuntu.  Or actually, from lots of other Linux distributions to Ubuntu (but Debian is significant because it's Ubuntu's parent distribution).

I have only good things to say about Ubuntu -- it's the distribution that allowed me to switch to Linux.  It's the first distribution to correctly configure my wireless card during installation (a task that both Windows XP and Vista fail at), which allowed me to get my questions answered online.  I started using Ubuntu Dapper Drake, and have since installed each new release.  I even convinced my Mom to switch to Ubuntu from Windows.  However, since installing Debian Unstable (Sid) a few months ago, I've come to prefer Debian.

Ubuntu is still a relatively young distribution, which, combined with the aggressive new release schedule (every six months), means that it's changing very quickly.  In general, I think this is a good thing.  Each release becomes increasingly user friendly.  But, it turns out that I don't really need a distribution that is that user friendly.  I'm a pretty quick learner, and I've gotten used to editing configuration text files instead of clicking buttons in an Options menu.  I think I became acclimated to how a Linux system works, and Ubuntu in particular, around the Fiesty Fawn release (maybe it was Gutsy Gibbon).  Ubuntu does a fair amount of hand-holding for inexperienced Linux users, but once I got enough experience, I found that I could work more quickly and more precisely without many of the GUI tools.  As I installed newer releases, I found myself disabling many of the new features.  As I was setting up and customizing the new Hardy Heron release, I noticed that the xorg.conf configuration file was no longer in use, and I no longer knew how to set things up the way I liked them.  (The xorg.conf file may be an odd thing to miss, as it is often the first truly confusing thing a new user comes across).  So, hoping to find something more like I was used to (Fiesty Fawn), I tried Debian.

Debian was exactly what I was looking for.  It had the same underlying system I learned on (specifically the APT system, which is awesome), but in less-shiny packaging.  I would describe it as a more transparent distribution than Ubuntu.  Debian doesn't hide as many of the available options (which is often the root of complexity) as Ubuntu, and consequently it's probably not as user-friendly.  While maybe daunting to a new user, it was refreshing for me.

I first installed Debian Stable (Etch) (stable sounds good, right? at least it sounds better than unstable).  Debian Stable is just that.  The trade-off, though, is that the software is not very cutting-edge.  Since I was already spoiled by always having new releases of Ubuntu, I knew I would have to upgrade to Unstable or go back to Ubuntu.  During the upgrade process, I discovered that Ubuntu's popularity is very nice when it comes to finding answers online.  It's not quite as easy to find the answer to a Debian question, but I survived.  Unstable seems to run software that's just as new as the new Ubuntu release, if not newer.  And, despite its name, I have had no problems at all with instability -- everything's worked great.  So now I have a system that works in similar ways as my old Ubuntu system, with newer or just-as-new software, but that preserves a bit more of the classic linux structure.  I'm pleased.

Another benefit of Debian is that it seems easier to have a minimalist installation.  I felt like Ubuntu was getting slower with each new release, perhaps because it increasingly attempted to be everything to everyone.  That definitely has its place, and I can see how it's helpful for Windows converts, but it's not for me.  Also, although I'll miss the excitement of a new Ubuntu release every six months, I might actually get a bit more done if I'm not installing a new release twice a year.

Tagged as: , , 5 Comments