Create an OpenSUSE chroot inside Debian/Ubuntu

Creating a chroot in OpenSUSE is not that simple like in Debian based systems. So I decided to list in this post the steps needed to create one.

mkdir /opt/chroot/zypper -p
cd /opt/chroot/zypper
rpm2cpio zypper-1.8.11-1.1.1.x86_64.rpm | cpio -idmv
rpm2cpio /tmp/libzypp-12.9.0-1.1.1.x86_64.rpm | cpio -idmv
rpm2cpio /tmp/libaugeas0-0.10.0-7.1.1.x86_64.rpm | cpio -idmv

Now zypper can be run

sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper

sudo mkdir /opt/chroot/opensuse-12.3/

sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper –root /opt/chroot/opensuse-12.3/ ar repo-oss
sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper –root /opt/chroot/opensuse-12.3/ ar repo-update
sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper –root /opt/chroot/opensuse-12.3/ ar security

sudo mkdir /opt/chroot/opensuse-12.3/dev
sudo mount -o bind /dev /opt/chroot/opensuse-12.3/dev

sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper –root /opt/chroot/opensuse-12.3/ refresh

Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): a

sudo LD_LIBRARY_PATH=~/zypper/usr/lib64/ ~/zypper/usr/bin/zypper –root /opt/chroot/opensuse-12.3/ install rpm zypper wget vim

If you get the following error, the problem is probably /etc/resolv.conf
Media source ‘[URL]’ does not contain the desired medium, works after Retry

You will see lots of the message below, but don’t worry.
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing…

sudo cp /etc/resolv.conf /opt/chroot/opensuse-12.3/etc

chroot /opt/chroot/opensuse-12.3/
sudo mount -t proc proc /proc
sudo mount -t sysfs sysfs /sys

based on

Using your android device as webcam on Ubuntu

These days I looking to buy a webcam, then I called some computer stores. I got scared. The prices were extremely high for a medium quality webcam. In Brazil everything related to computers, electronics and cars has absurd prices.

I’m a happy Galaxy Nexus owner, that I won in a google contest @ UDS-Q, and I thought that maybe It would be possible to use it as a webcam. After googling for a while I found an application called DroidCam[1][2], It was exactly I was looking for. For your info I bought the PRO version, since it saved me some hundred reais.

Here go some instructions to install, configure and run.


First create a dot dir for DroidCam

mkdir ~/.droidcam

Follow the instructions on the DroidCam Linux website

sudo chown <your username>:<your username> -R ~/.droidcam


Add your username to the group video

sudo addgroup <your username> video

Give to your user instantly group permissions

newgrp video


Warning! Run adb as a regular user. If you don’t know how I will make another blog post about setting up your environment in a proper way.

Start your adb server and list your android devices connected to your computer

adb devices

Forward the streamed video from DroidCam to your localhost, otherwise it will not work.

adb forward tcp:4747 tcp:4747

Start DoidCam on your android device.

Start DroidCam client.


Now you can configure your google hangout, google talk, skype or whatever you want a webcam for. Enjoy!

Maemo 5.0 SDK without scratchbox

After years of fighting with scratchbox I decided to ditch it in favour of a simple chroot. These are the steps to set yourself free.
Ping me if you want to add something to this tutorial


  • Automate this
  • Try to use schroot instead of chroot directly
  • ??? Another idea?

P.S.: For the armel arch replace i386 by armel in the following steps 😛

Download the rootstrap

$ wget

Unpack the rootstrap

$ sudo mkdir -p /opt/devel/chroots/maemo/fremantle/i386
$ cd /opt/devel/chroots/maemo/fremantle/i386
$ sudo tar -xvzf /path/to/maemo-sdk-rootstrap_5.0_i386.tgz


$ sudo apt-get install qemu-arm-static
$ sudo cp /usr/bin/qemu-arm-static /opt/devel/chroots/maemo/fremantle/armel/usr/bin

Identify your chroot target

$ sudo -s
$ echo fremantle-i386 > /opt/devel/chroots/maemo/fremantle/i386/etc/debian_chroot

Copy the essential files

$ sudo cp /etc/resolv.conf /opt/devel/chroots/maemo/fremantle/i386/etc
$ sudo cp -a /etc/* /opt/devel/chroots/maemo/fremantle/i386/etc

Get rid of the dpkg-preconfigure warnings

Edit the /opt/devel/chroots/maemo/fremantle/i386/etc/apt/apt.conf.d/70debconf file and
comment the line as follows.
// DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};

Get nokia binaries repository access.
Go to
Do what you have to do there.
And get the resulting repository. It is something like this

deb fremantle/00000000000000000000000000000000 nokia-binaries

The sources.list should look something like

deb fremantle/sdk free non-free
deb-src fremantle/sdk free
deb fremantle/tools free non-free
deb-src fremantle/tools free
deb fremantle/00000000000000000000000000000000 nokia-binaries

deb fremantle free non-free
deb-src fremantle free

deb fremantle free non-free
deb-src fremantle free

Mount the filesystems

$ sudo mount -t proc proc /opt/devel/chroots/maemo/fremantle/i386/proc
$ sudo mount -t sysfs sysfs /opt/devel/chroots/maemo/fremantle/i386/sys
$ sudo mkdir /opt/devel/chroots/maemo/fremantle/i386/dev
$ sudo mount -o bind /dev /opt/devel/chroots/maemo/fremantle/i386/dev
$ sudo mount -t devpts devpts /opt/devel/chroots/maemo/fremantle/i386/dev/pts
$ sudo mkdir -p /opt/devel/chroots/maemo/fremantle/i386/var/lib/dbus
$ sudo mount -o bind /var/lib/dbus /opt/devel/chroots/maemo/fremantle/i386/var/lib/dbus

Enter the chroot

$ sudo LC_ALL=C chroot /opt/devel/chroots/maemo/fremantle/i386
# apt-get update
# apt-get -y --force-yes dist-upgrade

Create the dir where scratchbox devel tool will be located (later on we will add a symbolic link)

# mkdir /scratchbox/tools/bin

Install the development tools

# apt-get install libc6-dev g++ make dpkg-dev autoconf automake

# ln -s /usr/bin/perl /scratchbox/tools/bin
l# n -s /usr/bin/m4 /scratchbox/tools/bin

If you use https repositories

# apt-get source apt
# apt-get build-dep apt
# cd apt-<version>
# dpkg-buildpackage
# dpkg -i apt-transport-https....deb

Install nokia desktop packages

# apt-get install nokia-binaries nokia-apps

During the installation alarmd and mce will fail.
Edit /etc/init.d/alarmd from alarmd package and comment the lines with start_alarmd and stop_alarmd. After that repeat the previous step. Do the same for the mce package.

Create some scratchbox compatibilities.

# mkdir -p /scratchbox/tools/bin
# ln -s /bin/kill /scratchbox/tools/bin/

Run the following command to start dbus and others daemons.

# start

Continue with the installation

# apt-get install nokia-binaries nokia-apps

Stop dbus and other daemons

# stop