Archive for July, 2012

Debian on Android/Atrix with Debootstrap (Part III)

July 22, 2012 1 comment

As an extension to my previous post I will now explain how to make all the stuff persistent. You then do not need to retype the whole stuff to start the VNCServer every time you restart your phone. Just put the following script into the folder /etc/init.d/ of your chroot:


export HOME=”/root”
export USER=”/root”

STARTCMD=”vncserver -geometry 960×540″
STOPCMD=”vncserver -kill :1″

case $1 in
        if [ -e /tmp/.X1-lock ]; then
            echo “VNCServer already running”
        echo “$0 start|stop|restart”
        exit 1

exit 0

Afterwards you are able to start and stop the VNCServer, with the commands

service vncserver start


service vncserver stop

This allows starting, stopping and restarting the server.
To actually start the server when you switch into your chroot, you have to autostart it. The following way is not best practice (don’t let a Linux guru know ;-)). But for us it is working:

echo “service vncserver start” >> /root/.bashrc

or (when you don’t want to get the “VNCServer started…” message everytime you log into your chroot)

echo “service vncserver start > /dev/null 2>&1” >> /root/.bashrc

When you call “bootdebian” in your shell, the VNCServer will automatically start and you can connect to it via your favorite VNCClient.
Have fun!


Debian on Android/Atrix with Debootstrap (Part II)

July 16, 2012 7 comments

When running Debian on Android in a chroot, you are bind to a Shell, but if you want a graphical user-interface to have a more comfortable usage experience you can also install a VNC server in the chroot and connect to it from the Android host system. This tutorial is an extension to my already published tutorial because someone asked me if I can write a little bit more on how to get the VNC Server to run. Here it is:

  • Follow my first tutorial (here)
  • Start the chroot environment
  • Before you execute the commands below keep the following things in mind,
    • You need around 38MBytes of free storage in your chroot
    • When first starting the vncserver you need to specify a password (Remember it!)
  • Now execute the commands to install the vnc server and a lightweight X-Window setup

    aptitude install –without-recommends lxde tightvncserver xfonts-base
    export USER=root
    vncserver -geometry 960×540

  • Switch back to Android and install the android-vnc-viewer
  • Start the app and put in the following settings:

    Nickname: *Whatever*
    Password: -the-vncserver-password-you-defined-before-
    Address: localhost
    Port: 5901
    Username: -empty-
    Color Format: 24-bit color (4bpp)

  • Make sure you set the port to 5901 not the default (5900).
  • You are done. With these steps you should be able to connect to the running VNC server inside the chroot.

Finally, here is a photo of my Atrix running LXDE:

Thank you, and have fun.