Crunchbang media center - Part 2

So a few immediate post-installation things I discovered about Crunchbang:

Ejecting an optical disc

First challenge with the new distro, how do I get the install disc out? I haven't actually used OpenBox as a window manager before, and have gotten way to used to Ubuntu / Lubuntu.

Inserting a disc auto-mounts, but doesn't display an icon on the desktop a-la Ubuntu. The capacitive touch eject button on the front of the Studio Hybrid didn't want to play nice (presumably until the drive was unmounted.) It turns out that the answer is pretty basic - OpenBox veers away from keeping icons on the desktop, so all I need to do is open up the File Manager and click Eject. Easy.

Resolution setting

Crunchbang helpfully detected my LCD TV as a 1920x1080 screen - the only problem being that my TV is only 720p. Changing the resolution in the provided ARandAR utility works for the session, but the settings don't save between restarts.

I followed someone else's hints from (the Crunchbang forum)[], but then had a similar DPI problem: All my fonts were TINY. So into DPI setting I delved - it got a little confusing because when I manually use ARandAR to change the resolution the DPI gets set sensibly, so one possible solution would have been to figure out which DPI it was using and configure it to match.

After a little trial-and-error I ended up with:

xrandr -s 1280x720 --dpi 96 &

Crunchbang (and I believe OpenBox distros in general) have an auto-run script which kicks off after user login. So I popped that line up the top of the file and... it did nothing.

The problem was that passing two commands at once to xrandr makes it not play so nice, so they need to be split up like:

xrandr -s 1280x720 &
xrandr --dpi 120 &

Which gives the big chunky text I need when I'm doing something on the desktop from the other side of the room.

I did get a weird instance where after a reboot it didn't work and left the desktop at 80dpi when rebooting - but another reboot later and it's working constantly. Not clear at all on what was going on after that first boot...

Auto Login

This is a media PC after all, so it should log in automatically (and fire up the required media applications, but I got to that later.)

That's actually an easy get, auto-login is an option available under System | User Settings

Installing wifi

Crunchbang has a startup script which runs a bunch of updates and guides you through a whole lot of configuration choices - but it really needs a network connection to run properly. Lucky for me I've got a USB WiFi adapter ready to roll, a TP Link TL-WN821N

TP Link USB WiFi

So I plug it in and... nothing happens. At this point, I'm wishing for the Windows style pop-up hardware manager where it inevitably fails - but at least gives you some sort of feedback that you've plugged in a device. Yeah yeah, Crunchbang is supposed to be light, but Windows 98 had that sorted out...

So I need to figure out what is running under the hood, then I can run


Which tells me that my TP Link adaptor is actually a Atheros AR7010+AR9287. A bit of googling later said that I needed to install a package 'firmware-atheros' to get it up and running. And that package isn't on the installation DVD... so I need some network.


Yep, I had to give up and plug in some hard-wired internet to install it. I ran through Crunchbang's welcome script 'cb-welcome' first; it goes through updating my apt repos. Once I finished with that I could finally run:

sudo apt-get install firmware-atheros

I plugged in the USB WiFi again, and sure enough the little wireless manager sprung to life. Woo! Disconnect that cable, connect to the wireless network and away we go!

WiFi worries

I started doing some more software installs with apt-get, but one of them stalled halfway through. All of a sudden a bunch of things wouldn't work, I opened up a terminal window and tried to run


But it just hung... So with a hung terminal window I opened a new terminal and tried to see what was going on in the system log with

cat /var/log/syslog

and now I have two hung terminal windows...

Something is broken here, time to hit up the reboot menu option... which takes me back to a tty login screen where nothing was responding:

This is not

Fine then! Time for the last resort.

Mash that power

Yep, hard reset.

Fortunately after the system came back up everything looked fine, but I wasn't able to figure out what exactly went wrong (this is becoming a theme.)

Next time

I'll go through installing XBMC and getting audio working on the Studio Hybrid.