Archive for 2008

My First WordPress Theme

I finally decided to write my own theme from scratch for ornat’s new blog.


As you can see it’s fairly purple and black. I think it’s nice and simple, and the fading on the edges look great. I’ll get a tar up of it up soon.

Getting the multimedia keys to work

Today I decided to throw out my old dell keyboard and get a fancy new keyboard. I got a genius KKB-2050, which was fairly cheap. The keyboard has 12 multimedia keys along the top, which needless to say didn’t work. This is how I got them working.

Firstly, install lineakd, it’s in the fedora repo, so you can install it with yum. I tried to get some the graphical configuration working, but got nowhere. The config files looked easy enough to edit, so I quickly tried that approach.

Firstly, run lineakd -l to list the keyboards and find the one that matches yours closest. To generate the configuration file then run lineakd -c [keyboard-type] where keyboard type is the model number of the keyboard you chose from the lineak -l output.

That will generate a default blank config in (~/.lineak/lineakd.conf). I wanted a global configuration, so I moved this to /etc/lineak/lineakd.conf. (if you do this, make sure to chmod it 644 to make it world readable.

Run lineakd -vv from a terminal window, and check that your keys are correctly detected. If they were then proceed to editing the config file, if not try generate it again with a different keyboard type, or refer to the lineak website.

Open the lineakd.conf in a text editor, and you’ll see a list of actions that correspond to the keys on your keyboard. You can put any commands in there – you may want to refer to my config file at this time (read it here).

My keyboard also came with a sleep key, which by default was sleeping (and crashing my desktop). Needless to say, I wanted to disable this feature so my machine wouldn’t crash if someone accidentally hit the key. The solution was simple enough – telling the suspend button to do nothing in the gnome power configuration seemed to do it :)

Run lineakd from a terminal again (run it as you, not as root) and check that things are working. If they are all that’s left to do is run lineak when your x session starts (coming soon)

Xmms in Fedora 8

First things first, xmms isn’t installed in Fedora by default since, well, a while now (FC4 i think). So the first thing to do is install it, in a terminal run
sudo yum install xmms.

At this point, when you get it running you’ll realise you can’t actually play any of your favorite mp3 files as the mp3 support has been removed. To enable it you install xmms-mp3 from the livna repository (if you haven’t set that up, clicky here to do that now. You should note that mixing multiple third party repositories can cause conflicts).

So, it can now play mp3 files, pity it looks like something that should have been abandoned with Windows 3.1. There’s a package in the fedora repo called bluecurve-xmms-skin that will help you with that point. Alternatively, as XMMS is a winamp 2.x clone you can grap any classic skin from and put it in the ~/.xmms/Skins Directory (the ~ means your home directory. The files starting with . are hidden files – you’ll need to check that option in the View menu in nautlius, or use ls -A in a terminal)

So, it looks good, but you may have noticed after about 15 minutes that the volume controls don’t actually work. This isn’t actually xmms’ fault, but because Fedora now uses pulse audio. There’s a plugin available to fix this, but it’s not in repos at this time (as far as I know). Download it from here and save the file to your computer. Before you continue you’ll need to install the packages pulseaudio-libs-devel and xmms-devel.

Now that that file has downloaded it’s time to do something with it. Go back to your terminal and cd to the directory it downloaded to (it’s most likely just on the desktop)

cd ~/Desktop Change directory to your desktop.

tar -zxf xmms-pulse-0.9.4.tar.gz Untar the code (the version number of your plugin may differ).

cd xmms-pulse-0.9.4 Move into the directory.

./configure --disable-lynx configure the code to be compiled (if you get errors at this point, you most likely need to install gcc, or another complier tool).

make Compile the code.

sudo make install Install the plugin.

You can now enable the plugin in the xmms options (once you’ve restarted xmms).

You may notice that some of your song names come up as garbage. This is due to a lack of unicode support in ID3v2 tags. This should have been fixed in xmms 1.2.11 (which was not in the repos at the time of writing)

Disclaimer: This last section is only for nerds, or the criminally insane
If, like me, you like to sit on your laptop just out of reach of your desktop, but want to play music out of your nice desktop sound system however this is for you.

You can install a program called ncxmms which will give you a curses frontend for your xmms session that you can run in a terminal (or, more to the point, over SSH). Grab the soruce from here and compile it like the plugin. All the familiar xmms shortcut keys will work there too :)