Monthly Archives: June 2006

Interesting office observations

After two and a half week at the new job, I have observed a few funny things:

Since I work at the sales department, everybody has contact with customers or prospective customers at least daily, and many of my colleagues do nothing but talk on the phone. Now, people who talk a lot on the phone invest in a hands-free that allows them to work on the computer while talking. They also use cell phones for portability, which means that they wear their hands-free:s all day long.
Now, what’s funny is that they talk while walking around in the office, meaning that you can meet them and it will look like they are talking to themselves. The funniest thing, though, happened yesterday.

I walked through the office and saw two of my colleagues sitting at a desk facing each other and talking. I overheard a little of their conversation, and it sounded so silly that I had to stop and look again. I then realized that each of them talked to a customer with their hands-free via the cell phones in their pockets. Even though they were sitting next to each other and even though it seemed they had some kind of meeting, they had nothing to do with each other.

One thing not so funny is the constant phone ringing. Several times an hour, you hear the specific phonecall of a specific colleague, and they never respond immediately, but prefer to wait a few seconds and check who’s calling. Add this to the fact that most of them have new phones with polyphonic/mp3 ringing tones and that everyone seems to choose the strangest signal they can, it makes the noises in the office quite singular.

This is the reason why I wrote my MPD/Icecast howto and implemented it as quickly as I could, so I could listen to music and not have to be disturbed by the phones no more.

(currently listening to Earth, Wind & Fire)

Internet Explorer background-position bug

I have now totally given up all hope of fixing a specifig bug in the image gallery that occurs in Internet Explorer 6. Click the following image to get to see the bug:

22028

The image gallery uses floating next/prev buttons over the images to allow for fast navigation. In Firefox (and all other correct browsers) the “Next Image” and “Previous Image” links appear and disappear in a logical fashion. Now look at it in Internet Explorer. The images do not disappear when the mouse is un-hovered from the photo. They are stuck until some kind of refresh event occurs, like minimizing and maximizing the window.
I have decided to keep it the way it is, since it actually is a non-critical bug and easy to live with.

For more technical information, see this webpage.

The conclusion? Avoid Internet Explorer and switch to Firefox!

CSS tweaks, slight updates

As you blogreaders probably already noticed, I have made some tweaks to the blog’s appearance. I tweaked the category pages, they are now even readable, and the blog posts have been more visually attractive. IE still bugs me, so the layout is really messy there, but hang in and I will improve it as soon as I find what’s wrong.
I have also installed awstats for my virtual hosts to see the usage statistics for all the webpages. Using this guide, setting up awstats for virtual hosts was a breeze. I can finally see how many visitors I get for my site in a detailed way.

Also, my father has finally released his website for the sailing yacht Nordisk Familjebåt that we own. Running Plone, it is one of the most advanced homepages for a boat in Sweden.

What’s yellow and flies around the earth?

http://moon.google.com/ (zoom all the way in anywhere on the map to see a funny thing)

Lots of Ubuntu love

To upgrade to Plone 2.5, I needed to upgrade broach to ubuntu dapper. I was a bit concerned that our main production server would be at risk of this upgrade, but it only required the execution of three commands and a wait of 20 minutes, and voila!

First, change all occurences of “breezy” to “dapper” in /etc/apt/sources.list

apt-get update

apt-get dist-upgrade

(20 minutes of waiting)

Now I could install Zope 2.9, which was only available in Dapper. All ubuntu users wanting to use Plone 2.5, switch to dapper!

Longing for the sea…

As the summer has started and the job is going into a daily routine, I begin looking forward to the autumn. As I have written before, I will work next year on the Performance Megayacht Elida V. Yet I don’t know when the ship is to be launched, new delays seem to come all the time. Since the homepage is updated very seldom now it might be a sign that they are working hard to get everything done.
Still, everything feels good and I hope to be able to board the ship in August

Server upgrades

Since the rest of the family is away during midsummer, I have taken this occasion as a chance to do some upgrades to the server park.

I have replaced the router/webserver/dns box with a brand new Ubuntu installation, which will be easier to manage than the old gentoo system. That system had been running for about two years, but had become almost unmanagable as time went on. Ubuntu is a lot easier to upgrade, thanks to apt-get and binary packages.

So if you have seen this site as offline the last days, this was the reason why.

“Avast ye scurvy file sharers!”

Wikinews interviews Pirate Party founder Rick Falkvinge:

Do you feel that the music industry in its current form will still be needed in a world where non-commercial copying is permitted?

It’s not so much if they are needed where non-commercial copying is permitted, rather if they are needed when they’re not necessary any more to be the middle man between consumer and artist.

The music industry will lose its current chokepoint, because they don’t add any value to the end product any longer. They will probably survive as a service bureau for artists, but they will not be able to control distribution.

It’s actually quite simple: if they get their act together and provide a service that people want to buy, they will remain. If not, they will vanish. Today, they have legislated that people must buy their service regardless of whether it adds value or not, and that’s not gonna hold in the long term. (emphasis added)

One of the most clear-cut definitions of what this party wants to do that I ever have seen. Lots of other good stuff, and perfect for those who want to see what is happening on the Swedish pirate scene right now.
Read the full interview here

Your own internet radio station with MPD/Icecast

This is a short, un-detailed howto of how to create your own internet station using the MPD music player daemon and icecast. There are some drawbacks with this solution, but since I have been an avid MPD user for a long time, this solution integrates nicely with what I am used to. Read on for complete instructions
Advantages:

  • Integrates directly with MPD
  • Quite customizable and very nice to control via an SSH shell.

Drawbacks:

  • Ogg Vorbis is the only audio format supported as of now
  • There is a bug when resuming playback that has been paused for a long time

Prerequisites

  • Your favorite Linux distribution. On this current server I have gentoo, while my favorite is Ubuntu. Your choice!
  • A good internet connection. Streaming music over a slow internet connection will probably halt your other traffic.

Software used:

  • mpd, at least version 0.12.0
  • icecast, I use version 2.3.1
  • your favorite MPD client, I favour “ncmpc”
  • a listener client, on Windows I use foobar2000 (you need ogg support for your player)

Let’s get started. Install all the above software on your computers, see the howto on the wiki for this.

Configure icecast. This can be a bit tricky and ther are many ways to fail in this step. You should:

  • Set hostname (mine is stream.broach.se)
  • Set the source password (the password that mpd will have to specify to be able to stream to the icecast server)
  • Set the admin password.

Icecast can be a bit tricky to configure, especially since it uses an XML file. The configuration is probably located at /etc/icecast/icecast.xml.
You also need to choose whether to use burst-on-connect. I have turned burst-on-connect on to reduce latency between MPD and the listener client, and I have no problems with lag. Remember that I mostly sit on high-speed internet connections and therefore your situation and configuration might vary.

Now configure mpd. See the howto on the wiki again. I use quality 4.00, which gives a bitrate of a bit lower than 128, which is OK for web-radio. If you are an audiophile you should use 5.00 or more. Also set the correct password needed to connect to the icecast server. This is the source password you have typed in the icecast xml file. If everything seems OK, fire up icecast and then MPD.

My mpd.conf:
[sourcecode language="css"]music_directory “/var/music”
playlist_directory “/var/lib/mpd/playlists”
db_file “/var/lib/mpd/database”
log_file “/var/log/mpd.log”
error_file “/var/log/mpd.error.log”
pid_file “/var/run/mpd/mpd.pid”

audio_output {
type “shout”
name “Music stream”
host “localhost”
port “8000″
mount “/stream.ogg”
password “password”
quality “2″

user “source”
description “All kinds of music”
genre “Everything”
} # end of audio_output[/sourcecode]
Replace “user” and “password” with the information you specified in your icecast configuration.
Start icecast, then mpd, and then your mpd client to play some music. Now mpd streams music encoded as an Ogg Vorbis stream to icecast, which is now waiting for listeners. Goto another computer and start to listen to “http://your-server-adress:8000/stream.ogg.m3u”, which will be the name of the audio stream.

Everything should work now. If it doesn’t, you probably have a configuration issue. If the playback is skippy and it seems that MPD plays the file at wrong speed (ie. the timer seems to go very fast and jump a few seconds now and then), you have encountered the skipper bug. Restart MPD and resume playback. I don’t have another solution to this bug yet, but luckily it only occurs when you haven’t played any music for a few minutes. Prevent it to happen by always have a song in your MPD playlist. This bug was solved by upgrading libshout from 2.0 to 2.1. Thanks to the guys in the #mpd IRC channel for this!

Wishlist:

  1. A configuration option for MPD that sends a silent audio stream when the music is offline or paused. This prevents the skipper bug, and allows all clients to be connected even though you pause the music. You won’t have to reconnect again when starting to play, because there always has been a connection
  2. Reverse proxy support for icecast. I have the icecast server located behind my router, and the generated URL is invalid because port 80 on the webserver is routed to the icecast server for the domain “stream.broach.se”, but not “etnoy.broach.se” and “www.broach.se”. Therefore I need to manually change the source code to make this work. I resolved this problem by manually adding a stream.ogg.m3u file to the web directory containing the correct URL for the strem. Hackish, but it works well.

Report any problems by commenting on this blog entry, or ask me a question by e-mail.

Updated 06/07 2006
Updated 11/01 2006
Updated 11/03 2006
Updated 07/01 2007

New DSL modem, should fix connectivity issues

Yesterday I bought a new DSL modem, a cheap D-Link modem with no fancy functions, to replace an old, faulty speedtech modem. The old modem had a tendency to fail silently for several hours and then come back online again. This did of course cause that this blog got unavailable for long periods of time, and that Google’s pagerank system voted down my site from being the #1 result when searching for “Etnoy”, my pseudonym.

The new modem was a breeze to install. The manual said that I needed to configure IP addresses, DNS servers and everything, and I was prepared to edit a lot of settings on the router/webserver machine. I unplugged the old modem, and a couple of seconds later the new modem was installed instead of the old one. Immediately the traffic indicator started to flash, showing that internet traffic was coming through. I was surprised to see that it seemed to work, and couldn’t really believe it.
I logged in to one of our computers and went surfing. To my great surprise, the modem actually worked! It is now located in the cellar and chugging all the internet traffic very happily. For the first time I am actually impressed by D-link, but let’s see during the next couple of weeks if it will work.

Recently I bought my computer I have been using at school, a Compaq Evo with a Celeron 1,6 GHz processor, to use as my primary desktop machine, “lysboj”. Even though it was equipped with 512 MB of SDRAM memory, it did only cost 500 SEK (that’s about 55€). Now this machine is located under my desk and works just the way it should. It is a bit loud, though, but I think that I can replace a fan or two to hush it down.
The purchase of this machine enables me to start replacing the webserver with a new computer. I have had the gentoo distribution on it for a long time, and as a router/webserver I have not felt this as being the optimal solution. Gentoo is still too much bleeding-edge to be used as a mission-critical server, and I have for a long time needed to reinstall the software bottom up using Ubuntu. My old desktop machine, a Dell Optiplex with 1 GHz, is the same type of machine that broach is now, and I can therefore install an identical system on that box to later on transfer the hard disk when the install is completed. I cannot risk having the server go down more than 24 hours, so I must do some paralell testing of the machines before I continue.

I feel that I need to give a presentation of all the servers we have at home, that is on its way.