Monday, November 29, 2010

A sister site :

I/we have just launched a sister site to this blog, namely the site, which will be featuring the same articles and snippets as this blog, albeit maybe in a more structured form. Please visit the site and support it. And... share with friends.

Saturday, November 20, 2010

Mediaportal: How to install mediaportal

If you (like i did) have an old PC which you do not use and at the same time need a mediacentre, why dont you give mediaportal a shot? It is open source, free and for windows.
Here goes:
  1. Download the latest version here .
  2. Launch the installer file.
  3. Choose your country.
  4. Choose "Start installation now".
  5. If there is ANY chance that you will be using mediaportal to either watch or record TV, answer yes to the question of whether you are going to use mediaportal to watch TV.
  6. Unless you know very well what you are doing (and if you are, you not reading this), choose install all in one click.
  7. If you are installing under Windows Vista or Windows 7, you will be asked which network the TV-server may communicate on. I have chosen only private networks and would recommend this setting.
  8. The setup is now done installing and you will be shown the MediaPortal Manual Documentation .
  9. You are now done installing MediaPortal - Have fun! (I will continue posting articles on how to setup things and features on this blog...)

Mediaportal: Choosing and setting up a remote control

I found and ordered a nice looking (and very cheap) remote control from the Hong Kong based store : .

Conclusion: It works just fine! However there are quite a few keys that don't have the function that was intended (some take mediaportal out of full screen mode, some launch other applications, etc.) and some keys do nothing at all.
However the volume, channel, number, arrow, PC off, close program and mouse keys work fine, which is the most important.
In mediaportal you also have to make some customization in setup. Lauch "MediaPortal Configuration", and go to "Remote" and choose "Microsoft MCE" and "Use Microsoft MCE remote or keyboard".

Conclusion: This remote is so cheap that you can not afford to buy if you are missing a remote for your mediaportal PC. It's only approximately $10.

Hint: You probably can remap some of the key strokes from the remote using the program AutoHotkey.

Friday, November 19, 2010

Firefox: Unblock a nonstandard port in Firefox3

If you try to browse a non-standard (a non-port-80 port) using Firefox 3, you will get he common Firefox can't-do-this-Try-Again error.
This is because Firtefox tries to protect you from evil-men-on-the-net, or yourself by blocking all ports but port 80. You need to unblock using a nonstandard port such as 81, 28 8888, 8971in Firefox3 by following the directions on this page: [ ]
I've test this and it works just fine!

Debian NSLU2: Installing packages 1

Initial setup

After the installation of the Debian OS is finished it is time to start installing the packages containing the services/servers/programs/utiliies that you need on the nslu2. It is of course the packages that was the initial reason that we started this installation adventure.

Furthermore some packages need to be removed.

Some have been tested and the removed again.

Installed packages

  • thttpd
  • vsftpd
  • samba
  • emacs
  • mc
  • screen
  • ddclient
  • rsync

Removed packages

I have removed the following packages which were installed by defaul. I must confess that the net"-something" is a package that a friend of mine removed and which he neglected to tell me the full name of.
  • nfs
  • net"-something"

Installed and removed packages

  • sg3-utils
  • atop
  • gdb
atop is quite usefull for discovering what is going on on the slug regarding network, hdd, memory usage etc.

How to install the packages
How to install the packages?  Start by logging in as root:
$ su
and supply the password that you set during the Debian OS install procedure. Then install sudo and emacs:
$ apt-get update; apt-get install sudo emacs

Add yourself to the sudoers group
Now you need to add yourself to the sudoers group. Run

$ visudo

and find the line
root     ALL=(ALL) ALL

and add the line 
"username"     ALL=(ALL) ALL
replacing "username" with your own chosen username. Then hit Ctrl+X to exit and answer Yes to the question of whether you want to save the file.

Remaining packages

Now it is time to install the remaining packages

$ sudo apt-get update; sudo apt-get install ntpdate vsftpd samba mc screen ddclient rsync sudo

How to continue
In the following blog-articles I will show how these packages are configured.

Friday, October 22, 2010

Debian NSLU2: How to install Debian on the NSLU2

Before we proceed with the installation of debian on the slug there is one point we bring in order:
We need a hard drive to install debian on.

My two slugs are installed in two different configurations:
Slug 1 (my home slug): A "WD Elements Desktop WDBAAU0010HBK 1 TB" (image) [Link 1, Link 2]

Slug 2 (my remote slug): A 4GB USB flash drive holding the operating system and a 300GB Maxtor hard drive  to hold the data.

I recommend to install the OS on a single exteramnal harddrive. And make sure you choose one which is silent and energy efficient. I can recommend the above (WD Elements Desktop WDBAAU0010HBK 1 TB), which has served me faithfully 24 hours a day, 7 days a week for a year now, but any other will do just fine.

Second thing which is important to do:
  • Connect the slug to power and your home switch and turn it on.
  • Set up the IP of the slug, the subnet mask and default gateway and the DNS server, in the native (the one the NSLU2 comes with) interface such that it is accessible from the local network and such that it has internet access. The reason for this is that the debian installation will inherit the network settings from the native setup and will use these during the setup.
  • Download and install Putty if you are running from Windows. If running from linux, just the use the built-in ssh which is sufficient.
  • A screendump of Putty connecting to the default IP address is attached. The username is blanked out for security reasons.

  • Find and download the Debian install firmware. Doublecheck 3 times that you have the right firmware. You will find the latest Debian firmware here (on the 25th of Oct. 2010). Here I have linked to the unofficial image, which is the one I highly recommend. It is also the one I used for both of my slugs.
  • There is a great guide on how to install Debian on NSLU2 here on cyrius' page. It is the guide/page that I used myself. It is also the one containing the link to the Debian firmware.
  • Flash the slug with the downloaded firmware through the native Linksys NSLU2 interface.
  • Turn off the slug
  • Connect the harddrive.
  • Turn on/reboot the slug.
  • In Windows Connect to the slug through Putty (don't use other ways of connecting such as Cygwin, they will fail during the process). Or in Linux run the command below. In any case the username is "installer" and password is "install".
$ ssh installer@ 

  • Continue as described in Cyrius' guide.
  • Choose to install to entire hard drive.
  • Just use the Next, Next, Next approach whenever presented with a choice.
  • While the installer is downloading and installing the packages it would be a good time for you to think about what name your server should have. In case you want to make it available online and are sitting behind a dynamic public IP address, it would be a good time to check whether this name is available at dynamic DNS services such as The thing is, that there exists a dns-updater for Debian which I use, recommend and will introduce later. Therefore I recommend
    Therefore: If you want to make the server available online, go to, find a available hostname which suits you (but choose with care as you might get unwanted visitors if you choose a domain name which is too common - Use your common sense!).
    Create an account (might as well be with the same username as you intend to use as domain name), "buy" the domain name (for 0.00$), active it etc.
  • Let the installer finish.
  • As any guide online will tell you: "it is recommended that you install the ntpdate (or ntp) package to make sure the clock is always up-to-date. "
$ sudo apt-get update; sudo apt-get install ntpdate 
    $ sudo apt-get update; sudo apt-get install ntp 

    • There, we have installed a full Debian server on your slug. You now have a full server consuming 2W+whatever your hard drive consumes. In the next few articles I will describe how to install and configure services you might need/want.

      Thursday, October 21, 2010

      Introducing the Linksys NSLU2

      The first series in this blog will be on my implementation of Debian Linux on the Linksys NSLU2 (Wikipedia link).The Linksys NSLU2 is a quite old piece of hardware, and has gone out of production. However, I was only introduced to it a couple of years ago. Since then I have bought two of them, placed them in different locations and set them both up to run Debian and to sync data to each other.
      One of them is located in my own basement, and the other in the basement of my brother. The advantage is obvious, considering that the one in my home is acting as my backup server. If I were to have a break-in or a fire, or a flood or a number of things, the other one will be a backup to my backup.
      Furthermore the NSLU2 (aka the Slug) acts as file server, media server, iTunes server, running ftp server, http server and ssh server.

      However, you will not get all of this for free... Which is reason I am writing this blog series. The slug comes with a native operating system (based on some Linux distribution). However, the posibilities with this version is highly limited.
      A number of different alternative operating systems can be installed, as desribed on the website

      However I chose Debian. The reason? That I then would get a full Linux server with the entire repository available on my NSLU2.

      How I did it will follow... stay updated:-)