Before Reading this page
Below, you'll see an email about how to install/configure and activate openbox instead of matchbox-window-manager. It was initiated to be able to simply use AUX and Power buttons and isn't considerate actually safe to use.
Steps to install openbox 'should be done in a SDCard' (I don't know if it is possible to do it in NAND) and through a SSH connection to be able to reboot nodm after changes (and potentially to desactivate it to have enough memory for apt-get).
Avantages and bugs with Openbox
Known bugs
- desktop shortcuts are sometimes displayed below top panel (it's just the first line of application which have icons a bit hidden). The workaround "pkill desktop" should work.
- "Alt" button of keyboard is misfunctionning : when you click on it, you cann't desactivate it.
- "display desktop" button of the bottom panel hide desktop shortcuts. So when you click on it, you can't see any more shortcurts (but pkill is also a workaround)
Advantages
- an always in development window manager
- you can easily add key bindings (for AUX and Power buttons) as shown below.
- windows are really maximized and are in this state (which is usefull for dates e.g.)
- you can make special rules for each applications
Installation and configuration
Installation
- Connect to your Neo with SSH, log in as root and set up Internet connection
- Stop nodm to save memory for installation : service nodm stop
- Install openbox with Debian packages : apt-get install openbox
Configuration of DeforaOS
To ask nodm to use Openbox instead of matchbox to display windows, change your ~/.xsession file as this :
Basic configuration for Openbox
Now, if you start nodm, you'll see DeforaOS with Openbox, but Openbox will not be well configured to be used with your phone.
To configure Openbox, you should do this steps :
- Add Openbox configuration directory : mkdir ~/.config/openbox -p
- Copy openbox example (which is well documented in comments) : cp /etc/xdg/openbox ~/.config/openbox
Now, you'll be able to configure openbox modifying this file. Be carefull to uncomment your changes : by default all configurations in this file are commented !
- And modify it to have only one desktop (see the comments in the xml files).
- If you want to always maximize applications when they are opened and to don't display decorations simply add into <applications> section :
<application class="*"> <decor>no</decor> <maximized>yes</maximized> </application>
As you can see in comments, you'll also be able to manage window for every applications as you want.
Keybinding example
First, you have to know how key are bound. You can use xev to know key information about physical buttons.
We did it and we've found that AUX button is "XF86Phone" and POWER button is "ISO_Level3_Shift". Below, you'll see an example of binding Openbox events with these keys. In this example we've choosed to associate AUX button with toggle window action (usually alt-tab) and we use POWER button to show/hide keyboard with a little (may be ugly) script.
To configure AUX button, you only need to look for section below and replace key alt-tab for XF86Phone :
<!-- Keybindings for window switching --> <keybind key="XF86Phone"> <action name="NextWindow"/> </keybind>
To Configure POWER button, add this section in your xml configuration file :
<!-- Keybindings for running keyboard -->
<keybind key="ISO_Level3_Shift">
<action name="Execute">
<command>/home/hackable1/.config/openbox/chkbd.sh</command>
</action>
</keybind>
and copy this sh script in the above defined file (in command section) :
#!/bin/sh
NB_PROCESS="`ps -A | grep -o "keyboard" -c`"
if [ $NB_PROCESS -gt '0' ]; then
ITER=0
while [ $ITER -lt $NB_PROCESS ]
do
kill -9 `ps -A | grep keyboard -m 1 -s | cut -f2 -d " "`
ITER=$(( ITER+1 ))
done
else
keyboard &
fi
