Running X apps from within Qtopia/Opie
From OESF
How to use X from within Qtopia
People seem to keep asking questions about this, so here is my definitive guide.
Contents |
Required Packages:
Obtain the following packages
- Qtopia-X http://www.killefiz.de/zaurus/showdetail.php?app=187 (Creates a VNC server, serving the X Windows desktop and windows, etc.)
- Keypebble a VNC viewer http://sgp.zaurii.net/howtos/opie-keypebble_0.9.1-20020703_arm.ipk (opie-keypebble_0.9.1-20020703_arm.ipk works)
- IceWM http://prdownloads.sourceforge.net/zaurus/icewm_1.0.9-5_arm.ipk (a Window Manager)
- XFree86 package http://prdownloads.sourceforge.net/zaurus/x11zaurus_0.8_arm.ipk (X Windows)
If any of the links don't work then these files can also be found on http://www.killefiz.de/zaurus/.
Installation:
Install XFree86 as per the instructions in the tar.gz file. You must patch the installation before turning the Z off, otherwise you'll need to perform a reset just to turn it back on - not good.
Basically you need to install as usual then delete (or move) the following files:
\etc\rc.d\rc4.d\S98x11mkfifos \etc\rc.d\rc4.d\S99zapmd \etc\rc.d\rc4.d\S99ztsd
\etc\rc.d\rc5.d\S98x11mkfifos \etc\rc.d\rc5.d\S99zapmd \etc\rc.d\rc5.d\S99ztsd
Install IceWM as per its instructions. Install Qtopia-X as per its instructions. Install Keypebble.
Note that only one icon will be produced after installing the 4 packages above (and that icon's for keypebble).
Make sure you have a terminal program installed (available on your CD for Sharp ROM users, or built in for OZ)
Create a script to start up X and XVnc:
#! /bin/sh export DISPLAY=:0.0 vncserver & wm &
Create a script to stop X etc.
#! /bin/sh export DISPLAY=:0.0 killall -9 XVnc killall -9 icewm
Save the above in 2 files called something like startxfree.sh and stopxfree.sh, make sure this file is in somewhere in your PATH (for example in /usr/bin or /usr/local/bin)
Explanation:
The vncserver program runs Qtopia-X, which starts up a VNC server and X Windows. Note that 'vncserver' is a script and you can edit this script to change the size of the X Windows desktop which is created (alter the -geometry part). wm starts IceWM.
Use:=
Open a terminal, then:
# startxfree.sh
then start any X related programs. Note that if you don't start the X related programs in this terminal (or you close the terminal and then reopen it to start a program) you may need to do the following to make sure that the program works before trying to start it (this sets an environmental variable which tells X programs which display to use):
# export DISPLAY=:0.0
Then start Keypebble and you can view and click on the X Windows desktop and use your application(s). To stop X and it's associated parts do the following:

