George Carlin, Frisbeetarian, Rest on Roof…

June 23rd, 2008 by fuzzix

You were a funny fucker, George. We both know there’s no afterlife and I’m talking to nobody here but rest in peace… or in chaos, as may be your preference.

“Sit in confused silence cats”…

June 16th, 2008 by fuzzix

Because “lolcats” is a misnomer. I mentioned before my lack of affinity for this particular corner of predictable web culture – the cat, the poorly spelt caption – I’m not seeing the gag.

My good buddy Hr. Flemming and I have since put this down to the reduced novelty seeking associated with infection with the brain parasite toxoplasmosis, common among people owned by cats who demand they have a clean box to drop chud in.

If anybody has a competing theory I’m all ears.

Proxying Icecast through Apache2 – another mini-HOWTO

April 12th, 2008 by fuzzix

I thought I’d write this up as I didn’t find it all the required info written down in one place when I was trying to do this myself. I wrote earlier on configuring Icecast. One concern when setting up a streaming media service is opening additional ports on a server – you may be unwilling or unable to do so for various reasons. If you already have Apache running you can use its proxying functionality to create a VirtualHost making Icecast available as part of your existing web services. An advantage of this is it also makes your streams potentially more available to people who use web proxies.

There are a couple of methods of configuring proxying. One is to use mod_rewrite – according to my reading this led to as issue where connections to the Icecast server were never closed once opened so available slots would quickly fill up even after people had stopped listening. This makes the preferable method mod_proxy/mod_proxy_http (these will need to be enabled in your Apache2 installation. Add a VirtualHost as follows:

<VirtualHost *:80>
        ServerAdmin stream@example.org
        ServerName stream.example.org

        SetEnv downgrade-1.0 1
        SetEnv force-response-1.0 1

        ProxyRequests Off

        ProxyPass / http://localhost:8000/
        ProxyPassReverse / http://localhost:8000/

        <Location />
                Order allow,deny
                Allow from all
        </Location>
</VirtualHost>

Some notes: This config assumes your streaming server runs on port 8000 on the same host as Apache.

ProxyPass maps your subdomain name to your internal server. ProxyPassReverse adjusts URLs provided in HTTP redirects to prevent bypassing of the proxy.

Those SetEnv directives force the proxy to use HTTP 1.0 both ways rather than 1.1. Icecast uses HTTP 1.0 and there are known problems with proxying it over HTTP 1.1 such as track metadata being misinterpreted as part of the stream’s audio and causing interference.

The ProxyRequests Off line prevents your apache install being used as a standard forwarding proxy. This would probably be a bad thing if allowed.

The Location block sets access controls to the proxy. You can fine tune who gets to access the stream by domain or IP block. In its current state all are allowed.

A Guide to Building a Portable Cygwin

February 23rd, 2008 by fuzzix
A Unix box ;-)

I picked up one of those snazzy (ignoring reports of dodgy firmware bricking players) Creative Zen portable media players lately (more on that elsewhere) so that left the old 512MB iPod Shuffle without function… or so I thought. I’ve been playing around a bit lately with making a portable Cygwin install and the old shuffle might just be an ideal medium for it – a Unix-style shell in your pocket for when you’re given no choice but to use Windows. I’m writing this as I put it together so hopefully there’ll be enough detail in here to take you through from start to finish. Most of the information here was collected from around the web, hassling the folks on #linux and a little experience using Cygwin day to day – there’s nothing new here but I don’t think the info’s ever been gathered in one place before.

Windows CMD shell – click for larger version

Right, first things first, delete everything on your iPod (OK, you don’t need to do this but you’ll need about 70MB for a base install – I recommend at least 512MB. Remember, your home directory will be on the portable disk too and you’ll probably want to install more tools as you use Cygwin more, eg; ssh with rxvt is a nice alternative to PuTTY.)

Start by downloading the Cygwin installer (usually found here) to your portable disk. We’ll be able to use this to update Cygwin from any machine later on. For now we’ll use it to install the base system. Launch the installer (Note: You’ll need internet access for this part). Click next to move on from the about screen and select the following options on the next screens:

For “Choose A Download Source” select “Install From Internet” -> Next

For “Root Directory” enter “E:\cygwin” where E: is the drive letter your portable disk is mounted on. Select “Just Me” and “Unix / binary” (Unix format text files are better for configs – some apps might have issues with DOS format configs) -> Next

For “Local Package Directory” you might like to choose a directory on the portable disk – this is useful if you have no write access to other disks on the machine but uses a lot of space so is not ideal for a small disk. I chose to cache packages in “C:\pkg” but where they go isn’t that important. -> Next

For “Select Your Internet Connection” it might be best to select “Use IE5 Settings” if you’re unsure about your network parameters. If you know better, configure appropriately… -> Next

For “Available Download Sites” try to select a mirror geographically close to you. For Ireland that means something on esat.net or heanet.ie. Again, if you’re unsure of your network settings it’s probably safer to choose a http source rather than ftp. -> Next

For “Select Packages” the base install is already selected so just click Next here. Nothing to do now but wait for the install to complete.

When it’s done it’s probably best not to create icons on the start menu or desktop… -> Finish.

We now have a base Cygwin install. Time to make it portable. Create a plain text file named “cygwin.bat” in the root directory of your portable disk and insert the following into the file (notepad will do):

for /F %%A in ('cd') do set WD=%%A
set path=%WD%cygwin\bin;%WD%cygwin\usr\X11R6\bin;%path%
set SHELL=/bin/bash
set CYGWIN=codepage:437
set HOME=/home/fuzzix
cygwin\bin\mount -bfu %WD%cygwin/ /
cygwin\bin\mount -bfu %WD%cygwin\bin /usr/bin
cygwin\bin\mount -bfu %WD%cygwin\lib /usr/lib
cygwin\bin\bash --login -i

The first line in the file establishes the working directory so we can deal with whatever drive letter Windows assigns your portable disk. Then we set the path and some other environment variables, create a few mount points and finally run the shell. You should set “HOME” to whatever directory inside your Cygwin install you want to use as a home directory. You might notice some X11 elements in the path – we’ll talk about that a little later…

rxvt shell – click for larger version

By default Cygwin uses Windows’ own Command Prompt window. This has several shortcomings including lack of a full screen mode and limited character/ANSI support. There’s an alternative available in the form of rxvt. Cygwin provides a Win32 native build of this which is a breeze to set up. To begin run setup.exe again…

The installer should remember your selections from last time you ran it so you can proceed straight to the “Select Packages” screen. Click the “View” button once to get a full package view. Scroll down to rxvt in the Package column (it might be best to maximise the window for this). A few columns to the left of Package you should see the word “Skip”. Click this once to install the latest available version (“Skip” should change to something like “20050409-7″). Click “Next” to install rxvt. I wish the Cygwin installer would remember that I don’t want to create desktop/start menu icons but it doesn’t…

Before I paste the rxvt batch file I’ll explain a little something about its character support… it’s limited. Some apps (such as the Midnight Commander file manager) relying on “box drawing” characters . There’s a font called Lucida ConsoleP which, when installed on the host machine, can help mitigate this. The problem is, no way exists (that I know of – I’d love to hear different) to install a font from a batch file without requiring a reboot. Dragging the ttf file into the Windows fonts directory works… Following is the rxvt batch file (perhaps call this “cygwin_rxvt.bat” if you want to compare its function with the cmd version). It’s much the same as the previous one:

for /F %%A in ('cd') do set WD=%%A
set path=%WD%cygwin\bin;%WD%cygwin\usr\X11R6\bin;%path%
set SHELL=/bin/bash
set DISPLAY=:0
set HOME=/home/fuzzix
cygwin\bin\mount -bfu %WD%cygwin/ /
cygwin\bin\mount -bfu %WD%cygwin\bin /usr/bin
cygwin\bin\mount -bfu %WD%cygwin\lib /usr/lib
run rxvt -sl 1500 -bg black -fg gray -sr -fn 'Lucida ConsoleP-13' -tn rxvt-cygwin-native -e bash --login -i

This gives us a nice rxvt terminal with black background, grey foreground, scrollbar positioned on the right and 1500 lines of scrollback (I’m wacky for scrollback). If you can’t/don’t want to install the Lucida ConsoleP font change the last line to:

run rxvt -sl 1500 -bg black -fg gray -sr -tn rxvt-cygwin-native -e bash --login -i

mrxvt shell – click for larger version

rxvt isn’t the only option. Cygwin comes with its own X server which we can install by running setup, navigating to the “Select Packages” screen and Selecting X11 -> xorg-x11-base and xorg-x11-devel in much the same matter we used to install rxvt. Note: Installing X can take some time. For this step we’ll also need to install a compiler and build tools. You’ll need Devel -> gcc and make. We can use these packages to download and build the X terminal of our choice. In this example I’ll be installing mrxvt, essentially a tabbed version of rxvt (and my terminal of choice).

Download the mrxvt source tarball (tar.gz file) from the homepage to your Cygwin home directory and in your shell enter the following:

$ tar xzf mrxvt-0.4.2.tar.gz
$ cd mrxvt-0.4.2
$ ./configure --prefix=/usr && make && make install

…now create another familiar looking batch file (cygwin_mrxvt.bat?):

for /F %%A in ('cd') do set WD=%%A
set path=%WD%cygwin\bin;%WD%cygwin\usr\X11R6\bin;%path%
set SHELL=/bin/bash
set DISPLAY=127.0.0.1:0.0
set HOME=/home/fuzzix
cygwin\bin\mount -bfu %WD%cygwin/ /
cygwin\bin\mount -bfu %WD%cygwin\bin /usr/bin
cygwin\bin\mount -bfu %WD%cygwin\lib /usr/lib
run XWin -silent-dup-error -multiwindow -clipboard -xkblayout gb -xkbmodel pc105
run mrxvt -at -sl 1500 -bg black -fg gray -sr -tn rxvt -e /bin/bash --login -i

Note that mrxvt does not run natively in Windows but in Cygwin’s X server. This is essentially an entire separate window manger from the Windows Explorer with its own environment so you’ll need to pass parameters for keyboard layout etc. (-xkblayout gb is provided as an example). XWin’s -silent-dup-error parameter is supposed to (as I understand it) make XWin silently exit if another instance of X is running but this is not the case in my experience. I’d be keen to hear a solution for this.

Hopefully by now you’ll have a USB disk of some sort containing three easily launched Unix-like terminals for your comfort. You could create an autorun.inf which will launch your favourite terminal as you plug in your disk or you could add another few useful apps… My install at this stage weighs in at about 240MB – room for improvement!

A few essentials…

portableapps.com contains USB storage oriented versions of popular Free applications. While the likes of Firefox and PuTTY are most useful on a USB disk the PortableApps launcher is a little heavy. An alternative is Pegtop Pstart, a launcher which can exist as a tray icon. Portable installation should be obvious – remember to add an autorun file from the Setup menu. Now it’s simply a matter of dragging your Cygwin launchers (and anything else you installed) onto the Pstart window. It’s worth noting that the Cygwin setup.exe binary should work in your portable setup once you’ve run a shell and set up the environment – you may need to change drive letters depending on where the host mounts your disk but it should be simple enough to add/update things in the Cygwin environment.

During my endeavours to put together a comfortable environment on machines I’m not comfortable with I encountered a few brain farts… occasionally confused about whether I should be thinking in Windows or GNU/Linux or MagicalDoWhatIMeanOS… Here’s a good example:

10:23 < fuzzix> I'm trying to set up a cygwin install here. Anyone ever encounter ssh and some other apps ignoring http_proxy?
10:28 < elrond> fuzzix: WTF would ssh be doing even looking at http_proxy ?
10:28 < fuzzix> elrond: That is a fair point.

I blame lack of sleep. Anyway, in a fit of bloody mindedness I knocked together the ssh invocation which reads http_proxy…

ssh -p 443 user@host -o ProxyCommand="corkscrew `echo $http_proxy | sed -e 's/http:\/\///' -e 's/:.*//'` `echo $http_proxy | sed -e 's/.*://g' -e 's/\///'` %h %p"

…assuming your sshd is accessible on port 443 (which makes access through proxies trivial – the proxy considers it https traffic).

Still incredibly angry!

September 15th, 2007 by

I know! Those shoes with the lights in the heel…

“My shoes have lights in the heel!”

“Oh really? Well, my IQ* has high numbers in it!”

*89

Hmm… Haven’t posted in a while.

September 15th, 2007 by

Let’s see… What’s been pissing me off?

They banned Manhunt 2! Fucking mollycoddling bastards trying to… nah, I’ve done this. Besides, I’m just going to import it from The Netherlands. Hmmm…

Cocaine bust bullshit! How much coke? Nobody knows! They just kept pulling numbers out of their arses… then that fucking mouthpiece RTE wheels out that tired bullshit about traces of cocaine on 99 billion percent of banknotes… it’s a fine powder! The notes are stored in close prox… Hmm? Too late? Oh.

Those pictures of cats with captions underneath simply not funny! Oh, who cares…

Erm… XML shouldn’t be used for config files! They’re supposed to be human editable – I don’t want to have to parse a config! Erm… bit esoteric. Hrm…

Let’s see… teaching kids to scream for products? Ah sure, they scream anyway.

TV Dinners? ATM etiquette? Umbrellas again? Bah.

*edit* I know! Those free morning papers – they shove the most egregious of their propaganda into your head while it’s still soft and mushy from last night’s dreamyland… and so on in that fashion until paranoid conclusion reached…

Bertie vs Enda

May 17th, 2007 by

Well, it was a fierce oul’ debate and no mistake. For those who missed it I took the liberty of uploading a video of it for you:

*update* 18/09/2007 – killed by Fox. It wasn’t funny anyway.

Tintintintintin

March 31st, 2007 by

[Tintintintintin]

I think it might be time to uninstall the GIMP.

Idle hands…

March 13th, 2007 by

Sootspotting

So, what’s changed in two years?

February 17th, 2007 by

A couple of years ago I was rendered in portrait (by myself…) thusly

What’s changed since then? I don’t smoke so much, I shave even less and use a different background colour in my text editor. Turbulent times indeed.

Upgrading to Ubuntu Edgy Eft a “Nightmare”

October 29th, 2006 by

A Slashdot article indicates that upgrading to Ubuntu Edgy Eft is a nightmarish process fraught with danger at all sides.

I’d just like to take this opportunity to let you all know that the Slackware 11 upgrade I performed on my desktop during the week went so smoothly that I ended up wasting an hour looking for broken stuff (I did find something – I had to remove 5 characters from my Samba config).

Slackware – the distro for people who’ve been fucked by apt
</troll> ;)

ESA and the “Punks on Mars”

September 22nd, 2006 by

The latest photos of Cydonia, Mars from the European Space Agency seem to put those “Face on Mars” conspiracies to rest…

…or do they?

While browsing the pics I noticed this:

Punks on Mars!

That’s right, the skull symbol of classic punk outfit, Subhumans. The implications of this are chilling but at least it puts an end to those old “Where did punk begin?” debates… It clearly began on Mars.

Remake Fever

September 12th, 2006 by

The Hollywood machine has run out of ideas. Sure, most of the movies are bassy explosion-fests anyway but the threadbare plots which loosely tied together the series of booms, crashes and flashing lights were occasionally quite inventive. Some time in the past few years this well of talent dried up and producers started looking to the recent past for “new” films. The Wicker Man is a fantastic horror tale where Edward Woodward plays a puritannical police officer uncovering an insidious plot surrounding the disappearance of a young girl. I don’t care to see the Nicholas Cage version. For those who’ve seen the original check out the trailer and see if there’s something they DON’T give away… “Who’s the Wicker Man?!” “…believe nothing that you see or hear!” Christ, the kid on the poster even has evil eyes.

I digress… I recently caught a trailer for Children of Men which is based on a 1992 novel by PD James. I thought it was an interesting and original plot… Sure, its purpose is to string together a series of explosions and flashing lights but at least it’s not a remake! Or is it..? My brother reminded me of the 1983 Italian B Sci-Fi movie 2019 – Dopo la caduta di New York (2019: After the Fall of New York) he saw some years back. Here’s the plotline they used to tie together their particular series of explosions and flashing lights. Oh well, back to the scripting board.

Back to School Special!

August 31st, 2006 by

Culled from the local paper:
[Back to School Special!]

I’m getting the Back to School beard trim.

Spooky…

August 4th, 2006 by

[Separated at birth?]