Easy Debian

This package, when installed, will give you OpenOffice.org, Gimp, the LXDE Desktop Environment, Firefox (called Iceweasel in Debian) with Java and Flash support, printing support, and access to thousands of applications that can be easily browsed and downloaded.

This package will give you all of these applications without any need for installing dependencies or other applications, and it should work on all of the tablets.

Contents

What you need:

  • You need 2.5 GB free on one of your memory cards, although after installing, you will only need 2 GB.
  • You need to keep your expectations reasonable. Big desktop applications like OpenOffice and Firefox run slowly on the tablet. They are power-hungry and designed for big, powerful CPUs. The N8x0's processor is comparable to a Pentium II processor. Just imagine running these apps on your computer from the mid-90s (remember Windows 95?), and you'll get the idea. But sometimes, you really need something on the tablet that only these apps can provide, like MS Word compatibility or Java applets. On the N900, almost all applications run reasonably fast once loaded, but they often take somewhat long to launch.

Install instructions:

  • You need to install the easy-deb-chroot package. It can be found in the Extras repository. There may be a newer version in the "Extras-devel" repository. (Enabling Extras-devel is a dangerous area and you should disable it as soon as you are done installing Easy Debian, but Easy Debian is rather safe and it is optified.)
  • Once installed several new shortcut icons will be available on the applications menu. You will need to first run the one called "Debian Image Installer". A terminal program will open and ask you where to place the image file (after decompression it will be a 2 GB file), either on the N900's built in storage (under MyDocs), or on an external MicroSD card (if available). That will start the download of the compressed image (about 300 MB) and eventual extraction of the image file. It will take more than a half hour to download if you have fast Internet connection, and another 30 minutes to extract it on your tablet.
  • This step is an alternate way to do the previous step: You can manually download the image file from here. Afterward you will have to copy it into /home/user/MyDocs/ or into /media/mmc1/ depending on whether you want it installed on the internal storage or on a removable storage. Then, when you run "Debian Image Installer" it will detect that you already have the file and proceed to extract it and set it up for you. If you have a faster computer with programs to unpack lzma-compressed files, you may also skip the Debian Image Installer by installing the uncompressed file by USB.
  • If you have more than one image file, you should edit /home/user/.chroot to select the one you want to load. Default is first in /home/user/MyDocs/debian*.img*, /media/mmc1/debian*.img*
  • Finally, when you get the "Congratulations!" message, REBOOT.

Using the LXDE Environment:

  • To launch a session of LXDE (a light weight desktop environment) whith several applications already installed in it, including OpenOffice.org, simply click on the "Debian LXDE" icon shortcut on the application menu.
  • LXDE's application menu is found at the top left corner of the screen.
  • To momentarily go back into the Maemo environment, simply press Ctrl Backspace.
  • Exiting LXDE: Log out, don't just close the window.

Window is too big for the screen

Press Ctrl and the period key simultaneously. This will make the "Move Window" cursor appear (a cross with four arrows). Use the stylus to drag the window to expose the parts that are not visible.

LXDE Top Menu Disappears

The newest version of the Easy Debian image (m5-v3b) has a new LXDE version.

If you upgrade Easy Debian and your LXDE top menu disappears, you can do one of two things:

  • Install the newest version (m5-v3b). Close Easy Debian (use the icon with the red arrow and box), delete the old image (use the File Manager to do this), and then use the "Deb Img Install" icon to download and extract the new image.
  • Keep your old image, and fix the top menu manually. Start LXDE. Tap and hold on a blank area of the left-side bar. Choose "Create New Panel". Choose "Top" and "OK". Tap and hold on new top panel. In the General tab, set the following things: Alignment: Left, Width: 25, Height: 32, Properties: Uncheck "Reserve Space..." In the Panel Applets tab, Add "Menu", "Digital Clock", "System Tray" (check "Stretch" column), "Net status monitor" (use edit button and change eth0 to wlan0, then tap on icon and set to wlan0 there too), and "CPU Usage Monitor".

If after the upgrade some menu entries (e.g. Gimp) are missing, you can manually install them from the Debian chroot terminal by

xdg-desktop-menu install --novendor /usr/share/applications/gimp.desktop

In order to have the document viewer Evince show up in the LXDE menu, you would have to first set "NoDisplay=false" in /usr/share/applications/evince.desktop and then run xdg-desktop-menu similar to above.

Keyboard issues and tips

It may happen that the hardware keyboard stops working in LXDE. It can be restored by hitting the power button and then tapping outside the menu or also by using the "Fix LXDE keyboard" application icon.

Localization

The keyboard is by default US. To get a different keyboard layout for the LXDE window manager, you have to modify the Debian image which requires root privileges. For this, launch the "Debian chroot" app (icon with red swirl symbol), which opens a terminal with root access to the Debian image (as well as to your home directory). The following instructions assume that you are working from that terminal and not from within the LXDE window manager.

For the task of configuring a special keyboard layout for LXDE (German in the following example), start an editor of your choice in the Debian chroot terminal (e.g., leafpad), and insert the appropriate keymap label in the following line of /etc/xdg/lxsession/LXDE/autostart according to:

 @setxkbmap de

Available keymaps are: ch (Swiss), cz and cz_qwerty (Czech), dano (Danish/Norwegian), fise (Finnish/Swedish), nordic (Danish/Norwegian/Finnish/Swedish), de (German), fr (French), it (Italian), pl (Polish), ptes (Portuguese/Spanish), ru (Russian).

You may also wish to set the language environment under Debian to a non-US one so that system messages come in your native language. This can be done by issuing the command (again from within the Debian chroot terminal)

dpkg-reconfigure locales

and selecting from the list that is then displayed the UTF variant of the desired language, for example for German, de_DE.UTF-8.

However in languages other than da, de, en, fr, and sv, this breaks the script that starts LXDE, because in the current Debian images (up to v3b) $CHROOT/usr/bin/xephwm5 has a line

export TWOWIN=`wmctrl -l | grep -i Information | awk '{print $1}'`

and "Information" does not translate to "Information". If in your language "Information" begins with "Info...", you can fix this by shortening "Information" to "Info" in the above line of /usr/bin/xephwm5. If not, you should modify the script to match the string that appears as title of the window saying "Welcome to Easy Debian LXDE..." (Without the above fix, clicking on the OK button will hang the program. You should instead get to the task manager and kill LXDE from there.)

Set Deb HW Keys app and xbindkeys

The newest version of Easy Debian provides also a "Set Deb HW Keys" application which runs xbindkeys, mapping Shift+Fn+(upper row keys) of the hardware keyboard to function keys F1-F12. Moreover, Ctrl+Up and Ctrl+Space provide full screen toggles.

Under LXDE, the Enter key is actually KP_Enter, while some application only accept ordinary "Return". For this eventuality, "Set Deb HW Keys" maps Shift+Enter to Return.

You can edit /home/user/.xbindkeysrc to include more key mappings that you might find desirable in the absence of the virtual keyboard (which on the N900 in Debian chroot is only accessible in the XTerminal). For example

"xvkbd -xsendevent -text '\e'"
   Shift + BackSpace

maps Shift+BackSpace to Escape. (See e.g. http://linux.die.net/man/1/xbindkeys and http://linux.die.net/man/1/xvkbd for more possibilities.)

You can have xbindkeys started also automatically by including

@xbindkeys -f /home/user/.xbindkeysrc

in /etc/xdg/lxsession/LXDE/autostart.

Another work-around for getting additional special characters is to remap your hardware keyboard.

A known issue is that in national keyboards where Up and Down arrows are composed as Fn+Left/Right arrows, Up and Down do not work under LXDE. If applications cannot be used without Up and Down keys, those should better be started outside of LXDE with debbie.

sticky keys hack

In the v3b image, /etc/xdg/lxsession/LXDE/autostart includes a hack to have sticky Shift and Fn keys also in LXDE. You can activate this behavior also outside of LXDE by running "debbie stickykeys" (or "debbie stickykeys xx" where xx is a language code different from us). Note however that this also affects XTerminal applications in Maemo.

The sticky keys hack also makes Ctrl sticky and may have other unexpected effects with non-US keyboards. To disable this feature in LXDE, comment out (include #'s in the beginning of) the following two lines in /etc/xdg/lxsession/LXDE/autostart according to

#xkbset exp 60 =sticky =twokey =latchlock
#xkbset sticky -twokey latchlock

Using debbie

From XTerminal the following scripts are available:

debbie 
starts debian chroot shell as user (doesn't evaluate /home/user/.profile)
debbie command 
runs debian command as user (if command includes file names, those need to be given with absolute path)
sudo debian 
starts debian chroot shell as root (this is the command issued by the "Debian chroot" app)
sudo debian command 
runs debian command as root

The above scripts run with environment variables determined largely by those set in Maemo and with working directory / . Another option is to enforce login shell behavior as follows:

sudo debian su - user 
starts debian chroot shell as user with $CHROOT/etc/profile and /home/user/.profile evaluated and with working directory /home/user
sudo debian su - user -c command 
runs debian command as user with $CHROOT/etc/profile and /home/user/.profile evaluated and with working directory /home/user

In all of the above, command can be simple command-line commands with standard output or GUI programs to be run under a window manager, such as ooffice.

Creating desktop shortcuts in Maemo

The above scripts are particularly useful for creating shortcuts. For example, a file oowriter.desktop with content

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=oowriter
Icon=ooo-writer
Exec=debbie oowriter
Type=Application

that is put into /usr/share/applications/hildon or (since fw 2009.51) /home/user/.local/share/applications/hildon allows one to start the OpenOffice writer directly from the Maemo Applications Menu without having to launch LXDE first.

Startup scripts

If they exist, the following scripts (which need to be executable) serve as startup scripts as follows

$CHROOT/var/run/onfirstchroot-ext.rc 
This script will run commands as root in maemo the first time you "open" a chroot. So this is where you could force the processor to "performance mode" or some such thing.
$CHROOT/var/run/onfirstchroot.rc 
This script will run commands as root in the chroot the first time you "open" a chroot. For example, if you have installed cups within Easy Debian, this script should contain "/etc/init.d/cups restart".
$CHROOT/var/run/onchroot-ext.rc 
This script will run commands as root in maemo every time you run a chroot command.
$CHROOT/var/run/onchroot.rc 
This script will run commands as root in the chroot every time you run a chroot command.

Here $CHROOT is the mount point of the Debian system (to be omitted when aleady in chroot).

In order to run a command in one of these scripts as "user", preface the command with su user -c


Installing Applications

Applications can be installed using apt-get or Synaptic. The image does not have an up-to-date package list, however. It is important that you perform an apt-get update or use Edit -> Reload Package Information within Synaptic.

In the current image (v3b), only the stable Debian Lenny repository is activated, although the Easy Debian image also involves a number of packages from the newer Debian Squeeze repository. If you want to install additional packages specifically from Squeeze, you should uncomment the corresponding line in /etc/apt/sources.list by launching an editor in the Debian chroot terminal (app with red swirl icon), i.e., remove "#" in the beginning of the lines

#deb http://http.us.debian.org/debian squeeze main contrib non-free
#deb http://www.debian-multimedia.org squeeze main

After updating the package information, you can then install from this newer repository. Howerver, heed the following warning:


Warning: Those of you familiar with Debian or other similar Linux distributions know that it is very easy to keep the distro up to date by means of the apt-get command. However, there is currently a problem with some of the central Easy Debian apps in the Debian Squeeze repositories. Therefore, it is recommended that for the moment you simply use the image as is. Do not perform an upgrade (apt-get update is safe, though). This warning will be removed when this issue is resolved.



CUPS Installation Instructions

If you have a network printer that can be accessed by CUPS, the Common Unix Printing System, this is straightforward under Easy Debian. In the Debian Chroot terminal (red swirl icon in the application manager) do:

apt-get update
apt-get install cups-client
apt-get clean

You can then check for available printers by

lpstat -a

and print out files from your device by

lp -d printername filename

This will allow you to use access only one cups server at a time, which can be specified alternatively by

  • the option -h hostname[:port]
  • the file client.conf in /etc/cups or ~/.cups (see "man client.conf")
  • the environment variable CUPS_SERVER

If a full cups installation is desired (which allows to schedule jobs to more than one cups server in the network and also to install cups-pdf, a PDF writer backend):

apt-get install cups
apt-get clean
echo "/etc/init.d/cups restart" >> /var/run/onfirstchroot.rc
chmod a+x /var/run/onfirstchroot.rc

The last two lines ensure that the cups server is started when Easy Debian is launched.

Other useful applications to install in addition

The following packages are also not part of the current image (v3b) but may be of wider interest:

vpnc 
The VPN client for accessing Cisco concentrators works well when started under Debian, while under Maemo vpnc is not yet available as a stable application. Install by "apt-get install vpnc" and configure through /etc/vpnc.conf .
This works particularly well in WLAN connections. There even microB connects via vpn. With GPRS connections, however, a browser in Debian has to be used.
openssh-client 
To access the Debian system by ssh, one can of course use the ssh server under Maemo (which presumably every power user will have installed), for a login followed by "debian" or "debian su user". To initiate ssh connection from within the Debian system, installation of openssh-client is sufficient and does not conflict with ssh installations in Maemo.
gv 
Renders postscript files. After installing this package, also "evince", which is installed in the current Debian image (v3b) is able to display postscript files. [Included in Debian image v3c.]
djview4 
Provides a reader for djvu files
gnumeric 
A leaner alternative to OpenOffice Calc. Works well when started outside of LXDE by "debbie gnumeric".
zim 
zim is a desktop wiki application that is well suited for the N900 device (a Maemo version is under development, too). To get the newest version install this package from squeeze (but don't upgrade the rest of the packages). Start from XTerminal (or a self-made application icon, see above) by
sudo debian su - user -c zim 
The theme provided by the v3b image does not work well with this application, but can be changed by creating the file /home/user/.gtkrc-2.0.mine with content e.g.
gtk-theme-name="Raleigh"
encfs 
a user-space encrypted file system, which allows to encrypt entire folders, see http://www.arg0.net/encfs. Encfs requires the fuse kernel module, which is already available in the Maemo system, although normally not yet loaded. Because there is no group "fuse" under Maemo, it's best to change the group ownership of /dev/fuse to users, and have all that automated through the startup script $CHROOT/var/run/onfirstchroot-ext.rc (needs to be executable). Add the following lines to this script:
modprobe fuse
sleep 1
chown root.users /dev/fuse
Install by running the following commands in the Debian chroot terminal:
apt-get update
apt-get install encfs
adduser user fuse
apt-get clean
After that user (and not only root) can create and use encrypted file systems in Easy Debian. See http://www.arg0.net/encfs for how to use it.

FAQ

Q: I chose Iceweasel, but nothing happened!
A: Be patient. Iceweasel has no splash screen and a very long startup time. Use Epiphany for faster startup while retaining the ability to use Java and Flash plugins.

Q: How do I get to the OK button in the huge dialog box that just popped up?
A: DIABLO/N8x0: If you choose the "Toggle Movable Windows" icon in the menu, you will switch to a patched version of the Matchbox Window Manager that lets you move the big dialog boxes used by some Debian apps so you can get to the OK button. When you want to go back to "Normal" OS2008 window behavior, select this menu item again.
A: FREMANTLE/N900: You'll need to use LXDE to access the entire dialog. Use the Ctrl-. key combination to move windows with the stylus.

Q: How do I get the virtual keyboard to pop up in Debian Apps?
A: DIABLO/N8x0: Select the "Set Debian HW Keys" menu item; wait a bit, then you can press the minus (-) hardware key followed by the menu hardware key to toggle the Matchbox Keyboard. Press the (-) key then the (+) key to toggle between normal and mini (one-line) keyboards.
A: FREMANTLE/N900: There is no virtual keyboard in Maemo for Debian apps.

Q: How do I make Debian apps fullscreen?
A: Select the "Set Debian HW Keys" menu item; wait a bit, then you can press (DIABLO/N8x0) the minus (-) hardware key followed by the "fullscreen" hardware key or (FREMANTLE/N900) Ctrl-Uparrow or Ctrl-Space to toggle fullscreen for any app.

Q: DIABLO/N8x0: How do I get the best turbo speed from OpenOffice, Firefox and other big apps?
A: Make sure you have the maximum amount of virtual memory enabled in your Control Panel / Memory dialog. Then select the "Set CPU to Performance mode" menu item and launch your app. Remember to set the CPU to On-Demand mode when you're done using the big app, because Performance mode sucks your battery faster. But it still isn't as bad as the battery life of your average laptop...

Q: English isn't my first language. How do I change this to my language?
A: Please click on the "Debian chroot" icon and type the following command:

dpkg-reconfigure locales
Choose your language(s).
DIABLO/N8x0: Note that you should choose the language with no period between the language and the iso code (eg. "en_CA ISO-8859-1"), and optionally, the utf-8 version, too (eg. "en_CA.UTF-8").
FREMANTLE/N900: Choose the UTF-8 version.

Q: Under Debian the time zone is not the same as under Maemo.
A: In the Debian chroot terminal run

dpkg-reconfigure tzdata

and select the time zone of your choice.

Q: How do I find the amount of space left for applications?
A: From the prompt in Debian Chroot menu item:

df -h /

Look under AVAIL.

Q: I want to install more applications! How do I do that?
A: First, you have to update the repository lists. From the prompt in Debian Chroot menu item:

apt-get update
The image for the N900 has quite some free space for installing additional Debian packages.
For DIABLO/N8x0, you must get some space back! There's almost no extra room in the image file.
apt-get install localepurge; localepurge
This will get you at least 80MB back. You should probably do this first, before starting to install. Running out of space during an install in Debian is ugly.
Also, when downloading packages, remember to frequently use "apt-get clean" to clear out old downloaded packages. That will help with free space.
If you're comfortable with the command line, you can use the technique listed in this post to double your install space.
Even with all of these tricks, you'll still run out of room fairly quickly. You'll probably have to uninstall packages in order to add new ones.
More advanced users can put a minimal system into an empty image and build a custom set of apps using this post. The most advanced and best way: partition your SD card and put your Debian fs there.

Q: What's this "Iceweasel"?
A: Iceweasel is the Debian name for Firefox. It's a long story, but in short, Mozilla and Debian had a philosophical disagreement that ended in Debian renaming Firefox to Iceweasel.

Q: I would like to have a separate /home/user directory under Debian than under Maemo. Is that possible?
A: /sbin/qchroot script does mountings; one option is to not mount /home/user at all by commenting out the corresponding line in that script, which is

mount /dev/mmcblk0p2 "$CHROOT/home"

for FREMANTLE/N900. Then /home/user/MyDocs will still get mounted, but you can keep a Debian home directory separately, in the chroot.

Q: How is this different than the Deblet project?
A: Easy Debian uses a fully installed Debian system to run applications inside of Maemo. The Deblet project helps you install a bootable Debian system from scratch; Deblet is mainly designed for booting to an alternate OS.

Q: I already have Debian in a partition, or I'm running Deblet. How can I use your package with my Debian?
A: Edit the /home/user/.chroot file to point to your Debian partition or image file. Easy Debian will do the rest.

NOTE: If you are using Deblet, delete the /home/user/.synchroot file before running Easy Debian for the first time, so your Deblet config files don't get overwritten. Remember that you'll need to make a user called "user" in Deblet (with the proper ID) for things to work correctly. Also note that your maemo home directory will be used by default. This can also be changed in the .chroot file.

Donations

If you feel overwhelmed by gratitude towards qole for bringing a full-fledged Debian OS to your device, consider donating at qole.org. [DISCLAIMER: This entry was inserted by a grateful user, not qole himself.]