October 25, 2006

Installing Gentoo on a Sun Blade 100

Posted in Gentoo at 17:49 by theBlackDragon

I managed to get my hands on a Sun Blade 100, specifications being:

  • UltraSPARC IIe 500Mhz processor
  • 256MB RAM
  • IDE harddisk
  • USB keyboard and mouse
  • Mach 64GR graphics card and an additional PCI graphics card that lspci identified as “Intergraph Corporation Sun Expert3D-Lite Graphics Accelerator” although on the card it says “Xilinx Spartan XCS10XL”, either way, it’s unsupported.

At first I tried getting Debian or Ubuntu on it, but neither the Debian or Ubuntu installation disc wanted to boot, so I reverted to Gentoo. The reason that I didn’t use Gentoo in the first place is that this is my first experience with an UltraSPARC based machine and I didn’t really have any idea on how fast it would be, compiling Gentoo in my P2 266 was a bit of a nightmare… But the Blade proved why the UltraSPARCs have such a good reputation, keeping up relatively well with my desktop system (a homebuilt Athlon XP 2000+ with 512MB RAM), but I’m getting ahead of things.

Upon turning on the machine I was greeted by the OpenBoot prompt, just type

boot cdrom

to boot from the CD-ROM drive, a lot of people have trouble at this stage, but my relatively old OpenBoot (it has version 4.0, the latest version is 4.17, though it’s recommended to not use that version but use 4.16 if you need to upgrade because of netboot trouble with 4.17) booted the Gentoo livecd just fine. I had to disable the ati framebuffer to be able to boot but that might have been due to the unsupported PCI graphics card I had my monitor plugged into.

2617 video=atyfb:off

it then booted fine and I could just install Gentoo as if it were a regular x86 box. I then set a root password and started the livecd’s ssh daemon so I could continue the install from another box as the Blade’s console was extremely slow, so you’ll either have to disable output as much as possible (eg. when extracting a stage tarball don’t use the ‘verbose’ option) or do the install over ssh, I opted for the latter approach.

I had to get the Gentoo sources from ~sparc64 though as the 2.6 kernel series is still dorky on UltraSPARC machines. After some trying it became clear I had to stick with the 2.6.16 kernel because of problems with drivers in both the 2.6.17 (broken support for ATI Mach64) and 2.6.18 (hang on boot, don’t know the exact problem) kernel versions.

You can get my kernel configuration file here.

Once I got past this stage I found out I didn’t get any output on the display altough the box booted just fine (I could ssh to it just fine), as I said the PCI graphics board was unsupported in Linux so I had now attached my screen to the built in graphics card for which the output was being redirected to the serial console as I found out after some searching. So I reattached the screen to the PCI card, booted into the OpenBoot prompt and executed the following to get the box to display it’s output on the screen and accept input from the keyboard:

ok setenv input-device keyboard
ok setenv output-device screen
ok reset-all

After this it booted fine. Getting X to work is another hurdle though, right now I get some strange artifacts when dragging windows around in FVWM, but I’m unsure as to whether that’s because I misconfigured something or because of the Mach 64 graphics card.

Given the X trouble I think I’m going to turn this box into a home server as it’s pretty quiet, after I’ve toyed with it some more of course 😉 I would like to thank the people on the Gentoo forums for their support in getting everything up and running.

September 19, 2006

Yes, I’m still here…

Posted in FVWM, Life, the Universe and Everything, Techie stuff at 21:05 by theBlackDragon

People who have played Baldur’s Gate 2 might recognize the quote, but anyway, I’m still around and I thought I had some interesting things to tell, and a little explanation for some weird/pathetic behaviour over the past months…

I’ve bought myself three new IT related books:

  • Aspect-Oriented Software development by Ivar Jacobson and Pan-Wei NG (Addison Wesley)
  • Ruby Cookbook by Lucas Carlson and Leonard Richardson (O’Reilly)
  • The Art of SQL by Stephane Faroult with Peter Robson (O’Reilly)

So I’ve got quite some extra reading to do 😉

It’s been some time since I last really used Ruby and I must say that the language’s documentation has improved a lot over the last few years.

While we’re on the subject of Ruby, Thomas has announced that FvwmRuby is as good as finished, I’ve been looking forward to this ever since he announced he was working on it about a year ago, now I might finally get around to coding FvwmMpd as an FVWM module, yay 🙂

On a personal level I’m still struggling with what started nearly three months ago. I still can’t really grasp what happened and I’m still struggling with it on a daily basis. It’s really hard to understand how somebody you think actually cares about you, for which you think you mean something, can just replace you when the next best guy comes along. And then I haven’t even mentioned the amount of lies, half truths and whatsnot…

For some reason I always have to think about this song by The Crüxshadows (Even Angels Fall):

Sorrow sings
her kisses in silence
and adjusts the blinds to keep the light
from mocking everything I feel
She dances slowly
a silhouette upon the curtains
but her eyes seem to cry
only empty tears
I beg for comfort with inadequate verse
it meant so much to me.... and so little to her
and I am sinking into a mountain of self pity
why can't I simply disregard all the things I feel?

"where is my angel,"
"where is my angel,"
"where is my angel, when I need him most?"
"where is my angel,"
"where is my angel,"
"where is my angel, tell me now where did he go?"

Oh well, it makes me think of a good number of other songs as well, but anyway… It makes you wonder who you can still trust if even the person you trust most on this planet treats you like … I dunno… like you’re disposable? Like you’re nothing or nobody?

Good thing I still have friends to support me and community work and projects to immerse myself in, keeps a man going through hard times. So thank you all, you know who you are!

September 3, 2006

Antialiased Emacs (using XFT)

Posted in Emacs at 16:57 by theBlackDragon

There are a couple of resources describing how to get Emacs 23 (aka “the unicode branch”) display antialiased fonts (see here for starters).

So building on my previous post on installing Emacs 23 from CVS you need to use this configure command:

./configure --prefix=/home/theBlackDragon/local --program-suffix=.emacs-23 --with-gtk --enable-font-backend --with-xft --with-freetype

You’ll need to start it like this for example:

emacs-23 --enable-font-backend --font "Bitstream Vera Sans Mono-12"

You can use an Xresource for the font if you like, but the –enable-font-backend switch is mandatory.

August 2, 2006

Using MPD and Icecast to stream audio

Posted in Techie stuff at 21:33 by theBlackDragon

So what prompted me to do this in the first place? I tend to switch back and forth between my laptop and my desktop quite often and since both are in different rooms I like to have the same music playing on both…

Since I already used mpd to play my music from a remote Samba share I decided I might as well use that box to play it too and use a webinterface to control mpd and just stream the audio so I could listen to it from basically anywhere.

To make this work you’ll need a couple of things that you can probably install in a distribution specific way:

  • MPD from SVN (the release version won’t work at the time of writing)
  • Icecast, I used version 2.3.1
  • the Apache webserver with a working PHP configuration for phpMp
  • phpMp itself

Let’s start by setting up Icecast, after you have installed it you’ll have to edit the configuration file, which is an XML file that by default resides in /etc/icecast2/icecast.xml. In this file you’ll want to replace all occurences of ‘hackme’ with decent passwords. You’ll also want to set hostname to the hostname of the box icecast is running on. You can also change the port icecast uses here if you want to, though the default should be just fine. So much for setting up Icecast, let’s move on to MPD.

First you’ll have to do the default configuring of MPD, set up your music directory etc. once that’s done we are going to configure MPD to send it’s output to our Icecast server.

audio_output {
type            "shout"
name            "DragonStream"
host            "localhost"
port            "8000"
mount           "/stream.ogg"
password        "hackme"
quality         "5.0"
#       bitrate         "128"
format          "44100:16:1"
# Optional Parameters
user            "source"
#       description     "here's my long description"
#       genre           "jazz"
} # end of audio_output

Most of the options here are fairly self explanatory, name can be anything you want to call your stream and is what most clients will show you, the port is the port your Icecast server runs on. Mount defines the URL you can find your stream on, being icecast_hostname:icecast_port/mount. The quality option sets the quality of your stream, 5 is CD quality, alternatively you could set the bitrate option, but since this version of icecast only streams in Ogg Vorbis format it might be handy to just leave it as I suppose it’ll stream variable bitrate then (though I’m just wildly guessing here). There should be no need to change the format. Description and genre are optional and do what it looks they do: define the genre and description of your stream for clients that display use information.

I won’t go into the details of installing or configuring Apache and/or PHP as that’s such a huge and distro specific topic that I won’t even start to bother, so I assume you have a working Apache + PHP setup. So download phpMp, extract it somewhere in your webroot and open the config.php file, there are only two things of interest here: host and port, check if those are correct and close the file.

You should now be able to start playing songs from your phpMp interface and listen to them using some streaming client that supports Ogg Vorbis, like Winamp or XMMS, be aware that you can’t start listening to the stream if you’re not playing something, that’ll just give you an error.

You’re also not constrained to using phpMp, you can use any MPD client to connect to your MPD server, you just have to make sure you secure your server enough if you allow external connections. You can do this by disabling bind_to_address (just comment it out) and use the password directive to set a password.

All in all I like the flexibility this setup gives me, the only real issue is that pausing MPD disconnects Icecast clients.

August 1, 2006

FVWM & Last.fm

Posted in FVWM, Life, the Universe and Everything at 10:51 by theBlackDragon

For some reason I couldn’t resist creating a last.fm FVWM group.

It’s kind of empty right now so all FVWM-using Last.fm-ers join me there! 😉

June 29, 2006


Posted in Life, the Universe and Everything at 23:13 by theBlackDragon

As some of you have no doubt noticed I’ve been pretty much inactive in all community efforts I’m normally active in, there are in fact multiple reasons for this.

Firstly, this was my final year, I’ve now graduated (couldn’t have happened soon enough either), but after my intership I had sort of a minor burnout (I hope it was minor), resulting in me not doing anything.

Well, that’s not to mention the things that happened during my internship (but not at my internship).
To ‘improve’ upon the situation my entire life kind of collapsed around me taking with it all my plans for the future and every shred of motivation I had been getting out of these.

So currently I’m just trying to grasp what has been happening, trying to get out of this bottomless pit and figuring where I will, should or could go from here.

May 12, 2006

Portable Emacs

Posted in Emacs at 13:07 by theBlackDragon

While reading gmane.emacs.help I came accross this post where somebody asked how he could make a portable app out of Emacs' Windows version.

So since I'm still at my internship (where they use Windows) and just recently obtained an iAudio X5L portable media player which behaves like an USB2 harddisk to the OS I wondered if I could manage to make Emacs portable.

Short version: I could, the "hardest" part was in fact not even Emacs related, but my sheer lack of knowledge about Windows batch script.

I started by creating a "SOFT" folder on my external drive (named E: by Windows on this box) and extracted the altest Emacs build from the ntemacs project in this directory, thus creating "E:\SOFT\emacs" with all the usual subfolders.

Next I created a site-lisp/site-start.el file and added the following as suggested on usenet:

(let ((home (concat (substring (car command-line-args) 0 2) "/SOFT")))
  (setq user-init-file (concat home "/config/.emacs"))
  (setq auto-save-list-file-prefix (concat home "/config/.emacs.d/auto-save-list/.saves-")))

You'll need to adapt this to your particular environment of course.

This makes Emacs load my user-init-file (aka ".emacs") from "E:/SOFT/config/.emacs" and moves the auto-save-list to the external device as well, this should be superfluous though as I change the location of HOME as described later, but it accounts for the cases that you don't want to change your HOME.

This is in fact the entire Emacs side of the story, though you will probably have some work making your elisp packages work with relative paths if you didn't take that into account before.

Now you need to redefine HOME in Windows (well, you don't need to but I find it useful), you can either do that globally with the System Properties or autoexec.bat in DOS based Windows versions, but I preferred to make it dynamic by writing a wrapper batfile that sets this variable and then launches Emacs. I named it runemacs.bat (how appropriate;)) and put it in Emacs' bin directory, the content looks like this:

set HOME=%CD%\..\..\config

That's it! You can now run Emacs entirely from your external drive!

May 11, 2006

Emacs tips #2 : linenumbers

Posted in Emacs at 11:25 by theBlackDragon

A question that pops up pretty often is how you can add line numbers in the margin of your files the way most other editors do.

There are actually two ways of doing this:

  • adding the numbers in the margin
  • adding the numbers to your files, so that they get saved with your file, might be useful in certain cases (COBOL source?)

Unfortunately Emacs doesn't support either out of the box, but fortunately people have written modes that do exactly this. Modes for both the former as the latter can be found on the EmacsWiki.

Personally I (occasionaly) use setnu.el which works extremely well for my purposes.

May 4, 2006

Emacs tips #1

Posted in Emacs at 14:57 by theBlackDragon

I've been using Emacs for some time now but have only recently started to heavily customize it. With this I've also started tracking (or more actively tracking) various Emacs related resources, picking up useful bits of information along the way. I'll try to share the most useful ones here with you on a (hopefully somewhat) regular basis.

I'll kick off with a very short one, the next line enables "focus follows mouse" on Emacs windows (not frames, frames are handled by the window manager).

(setq mouse-autoselect-window t)

So what is "focus follows mouse" anyway? Basically it means that the window your mouse pointer is over receives focus (input) so you don't need to click on it to give it focus (as you have to in, say, Windows). Some people find this confusing, most people can't live without it once they get used to it.

For more information on "focus follows mouse" see here.

May 2, 2006

Self-referential story

Posted in Life, the Universe and Everything at 16:28 by theBlackDragon

I came accross this post on Lambda the Ultimate, which made for quite an interesting read, and a fun one too!

Previous page · Next page