Ubuntu

Can't shift that many

Had this annoying message popping up when running a script on Ubuntu 8.0.4 LTS. The message read:

shift: N: can't shift that many

On Debian it works fine. The reason for this is the use of different shells in Debian and Ubuntu. Debian is using bash and Ubuntu is using dash. Check the symlink /bin/sh on the different distributions.

To reproduce save the following to a file named test_shift.sh:

DLNA server for Sony NAS-Z200 IR

Last week I've ordered the multi-talented music system NAS-Z200IR, as Sony nicely named it. It's just one flat panel with loud speakers and remote control with 3.5 inch LCD screen. You can plug your Ipod to the system, an USB-stick, play internet radio, ordinary FM/AM-radio. It is actually that ancient that it still can play CD:s, if you recall what they look like.

Convert flv to mpg using ffmpeg

Assume that you have a movie in flash video but you want to convert it to another format, say mpg, to be able to play on more devices. On Ubuntu/Debian this is quite easy to achieve. Start with installing the necessary packages (two steps in order to decrease line length).

sudo aptitude install libavcodec-unstripped-52 libavdevice-unstripped-52 libavformat-unstripped-52 
sudo aptitude install libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg 

So to convert just run:

Setting file permissions for a team that uses SFTP

For production systems it's often best to deploy code automatically from a source code versioning system, like Subversion or CVS, using Ant, Nant or whatever. But sometimes it's handy for a group of users to be able to upload files straight to a server from their own machines. This story is about how one can setup the appropriate permissions for a team who wants to upload files to an Ubuntu/Debian server using SFTP. This is tested on Ubuntu 8.0.4 LTS and using WinSCP as SFTP-client from a Windows XP.

Save a copy of streaming media using rtmpdump

By using a program called rtmpdump it is possible to save a copy of streaming media that is using the rtmp protocol. rtmpdump was previously hosted at sourceforge, but after a removal request from Adobe it was removed. Instead you will find the source code at this place http://lkcl.net/rtmp/. This site contains the source code and links to mirror and torrent sites that host the code.

Download the latest version of rtmpdump, at this time of writing it is version 1.6 that is out.

Broadcom wireless on Ubuntu 9.04

I've got an old Dell Inspiron 1300 that is equipped with a Broadcom wifi that worked fine until I made an upgrade of the kernel recently. I believe it was when I switched to kernel 2.6.28-14 that something was messed up. The card worked alright but I could not authenticate against my wireless router anymore after the kernel upgrade. The thing is that all traffic between the client and the router is encrypted using WPA-PSK (Wi-Fi Protected Access Pre-Shared Key) and I suspect that it was here something failed, but I may be mistaken. Anyway this how I solved the problem. 

BankID för Linux

Äntligen så har ett program för hantering av BankID släppts för Linux! BankID används ju flitigt på flera sajter, inte minst för viktiga samhällstjänster som till exempel Försäkringskassan. Fram till nu så har Linuxanvändare varit förvisade till kylan och i praktiken varit tvungna att ha en alternativ Windows- eller Macinstallation för att kunna utföra sina ärenden. I denna genomgång så visar jag hur man går tillväga för att få det att fungera på Ubuntu 8.04 (den enda Linux-distributionen som i nuläget har officiell support).

Moving a dir to a new EXT3 disk on Ubuntu/Debian

This is the case: the Ubuntu/Debian installation is made with the root folder placed on one disk together with the swap disk. Unfortunately the disk is beginning to become a bit crowded and the amount of freespace is continually diminishing. So, with a new disk plugged in the machine it's time to move the directory /var to the new disk. Assuming that the disk is in place and recognized by the OS, lets get moving:

Create a partition using fdisk on the new disk, in this case /dev/sdb. In the text below I've choose the commands

Accessing MSSQL using Python on Ubuntu

I started using Python a while ago and one of the things I need to do is to be able to connect to Microsoft SQL server from Linux servers. I was a bit surpised that I could only find some relics from projects not alive any more or the commercial MxODBC from eGenix. Then I ran into pymssql and decided to give a try. It worked almost at once on my virtualized Ubuntu Gutsy test box.

First I installed the prerequisites: freetds and the python headers:

Linux and clustering of PS3

If you happen to have a PS3 lying around you might be interested in installing Ubuntu on the box. How this is achieved can be read at https://help.ubuntu.com/. Even better would be clustering a couple of PS3 in order to achieve extreme computational power. The single cell processor is great for computation compared to ordinary processors.

Syndicate content