Vanish and mkpasswd on CentOS & RHEL 5

Just because I couldn’t find any information anywhere, if you’re trying to install the latest versions of the varnish caching server on RHEL5 or CentOS5 and its telling you that it wants /usr/bin/mkpasswd (and it’ll only do that to you if you like me, were trying to install using rpm instead of yum), you can find mkpasswd in the package expect

mythtv and screen blanking

So I’ve had my mythtv box running nicely for quite a while now but one annoying thing I couldn’t figure out was how to stop the annoying screen blanking. I’d set various dpms parameters in xorg.conf, turned off the screensaver. But it kept blanking. The most annoying part was that it hadn’t always happened.

Anyhow, I finally found the one command to stop it; xset -dpms.

Rhythmbox from the command line

So I was playing around with my conky config and I thought it’d be cool to be able to see my “now playing” song from it. Conky has some built in bits for that kind of thing in mpd but that’s no use to me since I use rhythmbox to listen to my music. A bit of googling around came up with some hits on using dbus-send to find the info [1,2] but the output was a little more raw than I was hoping for. While I was have a brief look through the rhythmbox manpage I noticed down the bottom of the page:


SEE ALSO
rhythmbox-client(1).

Aaah, how handy 😀 So issuing a rhythmbox-client --print-playing gives me this (the last line of the screenshot):

rhythmbox-client and conky now playing screenshot

rhythmbox-client can also handly play/pause, stop, next, previous, skip, add songs to the queue and other stuff to rhythmbox, all from the command line. In my .conkyrc I put the following line to give the “Now Playing” output:

${color #5b6dad}Now Playing: ${color}${exec /usr/bin/rhythmbox-client --print-playing}

Recent Acquisitions Part 2 – Samsung YP-U2 MP3 Flash Player

Samsung YP-U2XSo after umming and ahhing over getting an MP3 for absolutely ages, I took the plunge and bought one last week. I guess I took my time trying to find an MP3 player mainly because I don’t really get the oppurtunity to use one often (I drive to work) and also I had to be sure that it worked easily with Linux. I didn’t want to get stuck with some MP3 player (*cough* ipod) that only worked with special software (yeah, I know they work with Linux now, but I really didn’t want any fussing around at all).

So quite a while ago, I identified that Samsung’s players were compatible with Linux. They basically just plug into a computer, it comes up as a USB flash disk and you just drag and drop the MP3 files (or OGG or WMA which this player supports) onto the disk.

The model that I ended up with was the Samsung YP-U2X which has a 1Gb capacity. It should be enough to keep me going as I have more interest in listening to podcasts from Triple J and ABC Radio National more than storing stacks of music files on it.

I guess what ended up being the catalyst for getting one was wanting to listen to something while I went for runs. Running was also the reason why I went for a flash player and not a hard disk based player. Another nice thing about this MP3 player also was that it has an FM tuner in it, which I didn’t even realise it had when I bought it. Bonus!

All in all, its a really nice player and a good buy at AU$179.

Kernel Panic!

A hand dryer that had kernel panicked

So in the picture above is a linux machine that has had a kernel panic. No big deal. Looks like there’s some problem mounting a filesystem on a hard drive or some sort of IDE device.

The interesting part is that this is actually a hand dryer at the movies at George St Cinemas in Sydney. Its probably a 8.4″ LCD display, which I assuming usually runs ads on it. It was a tad chunky even by standard hand dryer standards though. Pretty funny to see it sitting there, all sad and crashed.

Split vim & gnu screen sessions

darkenergy running split vim and screen sessions

Nicholas was hassling me upload this screenshot, so here it is. On my IBM ThinkPad T41 at work, I’m running the OpenBox window manager in Ubuntu 5.10 Breezy Badger. In this session, gnome-terminal (with decorations removed) is ssh’ed into a server, with a split gnu screen session (my current .screenrc), with one of the screen sessions running vim with three split windows. I’m working on a php script which creates dynamic kickstart files for Redhat Enterprise Linux installs.

To split a screen in screen, its ctrl+a S, then ctrl+a tab to jump between the screens. In vim, its ctrl+w s to split the screen horizontally, ctrl+w v to split the screen vertically and then ctrl+w w to jump between the screens in vim.

MythTV Torture – Part 1

So since last Friday I’ve been attempting to get my new PC up and running with MythTV. I’ve built a HTPC using some the following components:

  • AMD Athlon64 3000+
  • 1 gigabyte of Kingmax RAM
  • DVICO FusionHDTV Plus
  • 250Gb Seagate SATA HDD

I used the apparently simpler KnoppMyth boot cd to install MythTV. Its a sort of live CD based on Debian. Its been bloody annoying so far.

KnoppMyth’s default kernel (2.6.11.7-chw-4) appears to detect the digital TV tuner card. But I can’t get any signal from this fucking thing. According to some people, I needed to patch the kernel using this patch. No dice. Now the system can’t even tell that there’s a card there at all.

Then to get the bloody remote controller working, you have to patch lirc. Unfortunately the patch only patches against an older version of lirc (0.7.0) than what is included in debian (0.7.1pre2). SO, I have to uninstall all the lirc debs, but when I do that, due to dependancies, it goes to remove xawtv, xmame-common, xmame-gl, xmame-sdl and xmame-x.Get fucked. I don’t think so. This is pathetic.

Then due to some wacky reason that I can’t figure out, networking attempts to start up before any kernel modules have been loaded. No network card module, no networking starting… what the hell!?!

OK, so its not all bad. Downloading of the TV schedule works as it should, MAME, SNES and NES emulation all works nicely. It’ll play my mp3s, although the interface for browsing songs is completely retarded. Programs like iTunes and Rhythmbox can provide some inspiration here surely.

It’ll play most of my videos (although, as I expected, it barfs on realmedia and quicktime movies).

Most of the documentation that I’ve seen for this project has been pretty appauling. Its been a while, but the documentation is that bad that I actually want to contribute to this darn project.And I think I will. I don’t think I can sleep at night knowing that other people are stumbling round, experiencing the same level of pain and agony that I’m currently going through. There are some MythTV wikis, but even though appear to be pretty sparse.

I’ve also started looking into the MythGame modules. The current NES configuration module doesn’t support passing any switches to the emulator (FCE Ultra). So far I’ve put the switches I need into a script, then I get the module to use that instead of the fceu binary. Looking through the other MythGame modules, it shouldn’t be too difficult to write a complete configuration module for this emulator.

If that all works, I’ll probably look at some other emulators like perhaps Hu-Go! (PC Engine) and DGen/Gens (Sega Genesis/Megadrive) if someone else hasn’t already.

So far going to work at 3am on Sunday morning to attend to a network outage on a production server was actually less annoying than this experience has been. I feel like I’ve gone back a decade when I first started messing around with linux, spending way too long on am XF86config file or attempting to get a working ppp or slip chat script. I can’t say I’d recommend mythtv at all at this point in time. Hopefully I’ll get around all these hurdles (there’s really only two large ones right now) I’ll be less pissed off about, but for now, arrrgh…

Update: It should probably be noted that most of my problems with this setup come down to my choice in digital tv tuner card. There are other choices out there which are supposed to work better. The only problem I found when selecting a card was that either the ones that worked were analogue or were EOL’ed. Or if I could find ones that worked in Australia, they didn’t support linux at all.

In regards to the remote controller, KnoppMyth works with Hauppage controllers out of the box (why lirc doesn’t have support for more than one controller without having to recompile is beyond me… I’m sure there’s some reason for it). Right now a bluetooth, RF or IR keyboard is looking a lot more tempting (and less painful).

Xscreensaver Annoyance

My work laptop, when I’m at work is usually connected to an external CRT monitor which runs at 1280×1024. Due to some really annoying bug in XFree86, it wouldn’t display any screensavers at the full screensize. Instead it would run the screensaver at the resolution of the LCD panel in the laptop (which in the case of my laptop was 1024×768). So today at lunchtime I finally had enough, and after a bit of googling I found the solution on JWZ‘s website (the author of Xscreensaver). To fix the problem, edit ~/.xscreensaver and put in the rather appropriate GetViewPortIsFullOfLies:True at the bottom of the file (or just set GetViewPortIsFullOfLies to True if its already there).

Frontier First Encounters under Linux

Dopplereffekt running Frontier First Encounters
Running in the window (it can run in fullscreen mode as well) is the JJFFE version of David Braben’s Frontier First Encounters (Elite 3). The desktop is GNOME 2.8 under Ubuntu Linux 4.10 “The Warty Warthog”. Getting FFE to compile is a snap, but you’ll need to download the rest of the game files from the Elite Club.

Also worth checking out (if you can grab it) is Elite: The New Kind. Its a reverse engineered version of the BBC version of Elite. Unfortunately due to copyright issues, I probably shouldn’t link to anywhere the source is. If you manage to track it down, you can use my Makefile to compile it under Linux. One thing I’d love to be able to do (and can’t figure out if it can) is whether it can run in windowed mode. I fear that the now unavailable EliteGL source code might be the key to getting it going.

Audioscrobbler and Rhythmbox

rbscrobbler queue

With Ubuntu, the default media player is iTunes-alike rhythmbox. One thing it was missing was an Audioscrobbler plugin. Luckily there are two plugins available for it. Neither is offically available on the Audioscrobbler site. The first one rhythmlet, requires rhythmbox 0.8.6 or higher and gdesktlets, which personally I’ve never been a huge fan of. Luckily there is another plugin called rbscrobbler which is a lot more sane. It only requires a recent version of python and gnome python. The latest version is can be downloaded from here and the forum post for it on Audioscrobbler is over here

Ubuntu and Java update

Previously I documented how to get Java installed and running under Ubuntu Linux. That seemed to work OK for most Java applications, but the Mozilla plugins didn’t work. Apparently it had something to do with the gcc version that the packages were compiled with.

Luckily there is an alternate repository with java packages that do work with Mozilla. Add this into your /etc/apt/sources.list as per usual:

deb http://jrfonseca.dyndns.org/debian ./

And then its apt-get install j2re1.4 to install

Ubuntu and Java

Update: This post is a bit redundant now. Please read this post for more information.

I’ve been installing Ubuntu Linux on most of my computers (one to go). One thing that gives the shits about Debian-based distros is Java support (or the lack thereof). To get a java runtime installed, add this line to your /etc/apt/sources.list:

deb http://mirror.aarnet.edu.au/pub/java-linux/debian unstable main non-free

Other mirrors can be found here.

And then apt-get install j2re1.4. Too easy! This gives you Blackdown Java for Linux.

Remote syslogging

Today I was setting up centralised syslogging at work to some plain old syslogd server. I’ve only really setup up centralised syslogging with syslog-ng before.

Anyway, in the syslogd man page, is said to send the syslogs of a server to both the central syslog server and locally, with entries like this in /etc/syslog.conf:

*.info;mail.none;authpriv.none;cron.none /var/log/messages,@hostname

For some reason that didn’t work at all. Depending on how I did it, it either only went to the central syslog server, or it just wouldn’t log at all. I ended up having to do it like this:

*.info;mail.none;authpriv.none;cron.none /var/log/messages
*.info;mail.none;authpriv.none;cron.none @hostname

I managed to find that piece of information on the LinuxSA mailing list.

Stateless Linux

This sounds interesting, Stateless Linux.

the goal: a uniform framework to cover all common ways of instantiating a centralized OS install read-only on multiple physical or virtual computers

This could be great for some of the server environments we have here at work. The IBM blade servers come to mind immediately for me, but I guess it doesn’t need to be just for that. Anyway, here’s the fedora-devel-list announcement, a proposal PDF document, a How To and some rpm packages.

RPM Packaging

I’ve been occasionally making RPM packages, but I’ve only really followed the method of packaging stuff that came from a tar-ball that needed compiling. Yesterday at work I needed to package a static-binary for some hardware infomation gathering program we use here, and for the life of me I couldn’t find any documentation on how to do it easily for such files. All the howto’s (and even the bloody book I spent all my cash on) didn’t seem to be dispensing much wisdom on it.

After digging through some of Dag Wieers .spec files, I managed to find that using install to install the files from $RPM_BUILD_DIR to $RPM_BUILD_ROOT in the %install stanza of the spec file seems to be the goods (well atleast on my laptop running FC1).

Hylafax

I finally got around to setting up Hylafax on my server at home the other day so that we don’t keep wasting paper with all these darn fax mailing lists that Dad’s fax number seems to be stuck on. I couldn’t figure out why the bloody thing wasn’t answering, so I decided to RTFM. Looks like faxgetty wasn’t running. Once I spawned that, I needed to add it in /etc/inittab like this:

t2:23:respawn:/usr/local/sbin/faxgetty ttyS1

ttyS1 is the second serial port.

GNOME 2.7.x

Dopplereffekt running GNOME 2.7.x
I updated to GNOME 2.7.x last night from Nyquist’s RPM repository, prompted by PhotoMatt’s post on GNOME 2.8. I’m also using jdub’s Indubstrial theme, which has been “suggested” to be the standard theme for GNOME 2.8. Also running is RealPlayer 10 streaming C-B-S. So far it seems to be very stable. Actually the most stable I’ve ever seen GNOME (not to say that it hasn’t been stable for a while). But considering that the PC that its running on has a PIII 733Mhz CPU, I’m pretty impressed.