View source for Debian

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Templates used on this page:

Return to Debian.

Personal tools


There are "official" instructions on how to install Debian on FreeRunner or Debian on Neo1973 (see the original announcement).

Previous information (partly outdated, now) on how to install Debian manually has been moved to Manual Debian.

See also : to know more about Debian.



The default root password is blank. You should change that as soon as you can.

Speeding up booting

What's good for every linux booting is also good for our debian on the freerunner: booting in quiet mode. To do so by default just boot your Neo FreeRunner in NOR-Flash and execute this configure-script:

It changes default booting to quiet-mode and adds another boot-option to boot without quiet-mode for debugging purpose.


To make suspend available you have to install apmd:

apt-get install apmd

After that you can suspend your phone with:

apm -s

and make it wake up again with pressing the power button.


  • Wuth 06:28, 17 August 2008 (UTC): I found that apmd was already installed by using the official debian installation procedure, but that the kernel didn't support apm. I haven't yet resolved this issue.
  • Phyce 21:33, 20 August 2008 (UTC) installed apm without problems; apm -s shutdowns the freerunner but I couldn't wake it up with power button... I had to remove the battery to boot again. suspend/resume was working quite reliably with latest kernels on ASU.

To wake up successfully, the idle-clock of the SD card needs to be enabled right before suspend. It can be disabled again right after resume (this reduces GPS interference). Write into /etc/apm/suspend.d/00sd_idleclk

echo 1 > /sys/module/glamo_mci/parameters/sd_idleclk 
touch /home/root/.profile

and into /etc/apm/resume.d/00sd_idleclk

echo 0 > /sys/module/glamo_mci/parameters/sd_idleclk 

These are from -stacy on the community list.

And anotherone from Morlac: (more debianish i think ;)
etc/apm/scripts.d/sd_idleclk and corresponding link in /etc/apm/event.d
(don't forget to chmod +x /etc/apm/scripts.d/sd_idleclk)

[ -e "${SD_IDLECLK}" ] || exit 0

case "${1},${2}" in
    echo 1 > ${SD_IDLECLK}
    touch /etc
    echo 0 > ${SD_IDLECLK}

exit 0


The default time zone is UTC. Reconfigure it by running

# dpkg-reconfigure tzdata

To set the clock manually do something like

# date -s 00:33

If you have a network connection, do something like

# apt-get install ntpdate
# ntpdate-debian



Make sure the following packages are installed

# apt-get install wireless-tools wpasupplicant dhcp3-client

An example configuration

Assuming your wireless router uses WPA security and DHCP, edit /etc/network/interfaces to include a section like this:

auto eth0
iface eth0 inet dhcp
       wpa-driver wext
       wpa-ssid "MyWirelessName"
       wpa-psk "MyWirelessPassword"

Where, of course, you're using the name of your wireless network and it's password instead of MyWirelessName and MyWirelessPassword.

You can test by running

# ifup eth0

You can determine your IP address by running

# ifconfig eth0


  • only works if in presence of wireless network on boot, or when manually running ifup eth0
  • booting away from wireless network is slower because waits for DHCP to time out
  • does not reestablish connection when leaving wireless area and then returning
  • does not support multiple wireless networks or open hotspots that you may travel between

Configuration options

To use the all the possibilities of wpasupplicant like roaming and automatic connection to different networks, you should read /usr/share/doc/wpasupplicant/README.Debian.gz


The FreeRunner uses the standard Linux bluez stack, installed with

# apt-get install bluez-utils

There is also a module missing from /etc/modules, which is critical to getting your device recognized. (kudos to johnsu01 on for the find)

# echo ohci-hcd >> /etc/modules

The first time you try this, you can also

# modprobe ohci-hcd

The only atypical part of using bluetooth on the FreeRunner is turning it on, which can be done with

# echo 1 > /sys/bus/platform/devices/neo1973-pm-bt.0/power_on
# echo 0 > /sys/bus/platform/devices/neo1973-pm-bt.0/reset

Then the device should be visible using

# hcitool dev

Running X as normal user

First you need to create a user

# useradd -m -G audio,dialout,floppy,video username
# passwd username

Then you need to stop zhone-session and disable it on boot

# /etc/init.d/zhone-session stop
# update-rc.d -f zhone-session remove

Now you need to setup autologin and startup of X for the user you created. There are several ways of doing this, one method is using rungetty

# apt-get install rungetty
# cp /usr/bin/zhone-session ~username/.xinitrc
# chown username. ~username/.xinitrc /tmp/zhone.log

Then edit /etc/inittab and change

1:2345:respawn:/sbin/getty 38400 tty1


1:2345:respawn:/sbin/rungetty -u username -g username tty1 /usr/bin/xinit /etc/X11/Xsession /home/username/.xinitrc

To activate the change and start up X

# init q
# pkill getty



Main article: TangoGPS

e-book reader

Main article: FBReader


xfce is small and lightweight and so quite fast for the FreeRunner.

apt-get install xfce4
cp /etc/init.d/zhone-session /etc/init.d/xfce

Then you may hack /etc/init.d/xfce making


Customize the boot process :

update-rc.d -f zhone-session remove
update-rc.d -f xfce defaults

edit your /etc/hosts to have : localhost debian-gta02

Start XFCE !

/etc/init.d/zhone-session stop
/etc/init.d/xfce start

The desktop takes a while to start but once up was snappy as can be expected. I've not yet looked at the reason for the seemingly too slow start for the desktop.

zhone is available from the "Office" menu in xfce. The matchbox keyboard is available in "Accessories".


Making the cursor invisible

Using matchbox

Matchbox has an option, use_cursor, that can be used to control whether to show the cursor. For the default setup, edit /usr/bin/zhone-session and change the matchbox command to

matchbox-window-manager -use_titlebar no -use_cursor no

Using unclutter

Unclutter is a program that hides the cursor after a period of inactivity. To use unclutter, install it

#apt-get install unclutter

and choose Yes to the question Start unclutter automatically?. To change settings edit /etc/default/unclutter.

Changing the cursor

To make the cursor invisible create a file called empty.cursor with this content:

#define empty.cursor_width 16
#define empty.cursor_height 16
static unsigned char empty.cursor_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

Now you can execute:

xsetroot -cursor empty.cursor empty.cursor

and the cursor will be invisible. To make this permanent you have to invent something ;) It must be executed after zhone has finished starting up.

Using the mouse and keyboard from your desktop on the OM device

If you are running Linux (or a similar xorg capable operating system) on your Desktop, you can export your xsession to the openmoko device and use your mouse and keyboard on the Neo screen. A little program called x2x makes it even possible to do this simultaneously on the fly. When activated you just move your mouse to the edge of your monitor and then the mouse cursor continues on the screen of your openmoko device. If you select a window on the OM, the input of your keyboard is automatically entered in that window. You can even use the clipboard to copy data from tour desktop to OM and in the reverse direction.

Configure your desktop computer to export your xsession:

On your desktop (with root permissions):
Make sure that sshd is installed and in /etc/ssh/sshd_config you have set
X11Forwarding yes

In K/Ubuntu sshd is in the package openssh-server.

On your OM device install x2x (with root permissions)

apt-get install x2x

Now open a new X terminal on your desktop computer. You MUST be the same user that is running the xsession on your desktop (i.e. do not su to root or another user in your x terminal!). Use the same username that is running an xsession on your OM device. Assuming that you have a usb networking connection to OM (with standard configuration) on the user prompt of your desktop type:

user@desktop:~$ ssh -X openmoko@ "/usr/bin/x2x -east -to :0.0"

Hit return and enter your password. The xterm window will be unresponsive after that, but keep it open until you disconnect your OM device.

Now move your mouse cursor across the right edge of your monitor. It should enter the screen of your OM device from the left. Of course you can also use -west, -north or -south, depending on your preference where you place your OM.

If computer says:

sh: /usr/X11R6/bin/xauth: No such file or directory
X11 connection rejected because of wrong authentication.
x2x - error: can not open display localhost:11.0

It means you haven't istalled xauth on your OM. So on your OM (with root permissions)

apt-get install xauth