Next
Previous
Contents
11. Installing X11 Windowing
11.1 An X11 on PsiLinux Screenshot!
X11 windowing can now be installed on the 5MX. This involves three basic
steps: (1) install the relevant *.deb files (*.ipk files are as yet untested),
(2) get the Xipaq X server, and (3) configure a window manager. X11 is a
fairly large overgrown package; in the long run picoGUI may win out because
of its promised size and efficiency. However, the number of applications
designed to run under X11 is staggering.
11.2 Prerequisites
You will need to have a compactflash with something like 80 MB of free space
available for the linux distribution with X windows. After installation,
a great deal of disk space can be freed up by the deletion of extraneous
fonts, binaries, and other meta data. Without doing any of this clean up,
my 96MB linux partition was left with 12MB of free space.
Until the ipkg system gets sorted out,
you will also need a distribution based on dpkg.
11.3 Packages to Install
The following packages and binaries need to be installed: (The *.deb
packages can be obtained from
the distribution packages
site at debian.org. Be sure to use the "testing" or "Woody" distribution, and
get arm binaries, not i386 binaries.)
cpp_2.95.4-9_arm.deb
libncurses5_5.2.20020112a-5_arm.deb
libdps1_4.1.0-14_arm.deb
libfreetype6_2.0.9-1_arm.deb
libglib1.2_1.2.10-4_arm.deb
libutahglx1_0.0-cvs-20010702-3_arm.deb
libxaw7_4.1.0-14_arm.deb
xfree86-common_4.1.0-14_all.deb
xbase-clients_4.1.0-14_arm.deb
xlibs_4.1.0-14_arm.deb
zlib1g_1.1.4-1_arm.deb
xfs_4.1.0-14_arm.deb (optional)
xserver-common_4.1.0-14_arm.deb (optional)
The X fonts are slightly optional:
xutils_4.1.0-14_arm.deb
xfonts-base_4.1.0-14_all.deb
xfonts-scalable_4.1.0-14_all.deb
xfonts-75dpi_4.1.0-14_all.deb
Bearing in mind the severe memory constraints,
X terminal emulators to consider are:
xvt_2.1-14_arm.deb
rxvt_2.6.4-3_arm.deb
xterm_4.1.0-14_arm.deb (a memory hog)
Of these xvt is preferred, because it uses much less memory.
In addition, you will need to download the Xipaq X server from the
"Software, X11"
download site from PsiLinux. This tarball contains:
There are several approaches to using the mouse functions. See the section
below on Mouse Issues.
You will also need a Window manager for X. Here we will discuss the
Blackbox window manager, blackbox_0.62.1-1_arm.deb
. The
Windowmaker manager might be a little better (see screenshot below), and
there are other managers as well.
Install the above *.deb packages, and copy the Xipaq server to
/usr/X11R6/bin/X
.
Before starting X, first make sure you are in 4bpp
by fbset -a 4bpp
, and be sure the touch panel
device "/dev/tpanel" exists (mknod /dev/tpanel c 10 11
). Then
execute startx
! If you are not in 4bpp, you will get a
segmentation fault. You can start X more simply by just xinit
which will save a little memory (startx
is a script, so
it keeps a shell open while X is running.)
You can start X up with the screen rotated. Start the xserver with:
Xipaq -screen 640x240@$ROTATION
where for values of $ROTATION:
($ROTATION <45)||( $ROTATION>=315) screenrotation = 0°
($ROTATION <135)&&( $ROTATION>=45) screenrotation = 90°
($ROTATION <=225)&&( $ROTATION>=135) screenrotation = 180°
($ROTATION <=315)&&( $ROTATION>=225) screenrotation = 270°
A rotation of 90° can improve the useability of some applications
as long the required width is less than 240 pixels. [No, setting the
resolution to something bigger (like 640x480 or 1280x1024)
doesn't do virtual resolution (nor does it increases your screensize)]. You
can set up a small script called /usr/bin/X11/Xrot containing the lines:
  #!/bin/sh
  /usr/bin/X11/Xipaq -screen 640x240@90
(and chmod 755 Xrot). Then, the rotated X can be started with xinit -- /usr/bin/X11/Xrot
.
11.4 Configuring the Blackbox Window Manager
There are three main configuration files that need to be set up to
run the Blackbox Window Manager: (1) .xinitrc, (2) .blackboxrc, and (3)
~/.blackbox/menu. These are discussed in turn.
~/.xinitrc
/msdos/x11/XRmouse &
xrdb ~/.Xdefaults
#rclock -geometry 60x60-1-1 &
xvt -sb -geometry 60x12+5+20 -sl 200 &
/usr/bin/blackbox -rc /root/.blackboxrc
startx
, in the end, looks to this file to
start up the X applications. The above file ends with blackbox
until that process terminates (i.e. when you are done with your
X session.) The rclock application is commented out as an
example of things you can do to conserve memory. You may want to
start up X using the xinit
program directly - this will save a
little memory.
~/.blackboxrc
session.screen0.slit.placement: CenterRight
session.screen0.slit.direction: Vertical
session.screen0.slit.onTop: False
session.screen0.slit.autoHide: False
session.screen0.toolbar.onTop: False
session.screen0.toolbar.autoHide: False
session.screen0.toolbar.placement: TopRight
session.screen0.toolbar.widthPercent: 66
session.screen0.workspaces: 2
session.screen0.focusLastWindow: False
session.screen0.edgeSnapThreshold: 0
session.screen0.rowPlacementDirection: LeftToRight
session.screen0.focusNewWindows: False
session.screen0.windowPlacement: RowSmartPlacement
session.screen0.focusModel: SloppyFocus
session.screen0.workspaceNames: Workspace 1,Workspace 2
session.screen0.strftimeFormat: %I:%M %p
session.screen0.colPlacementDirection: TopToBottom
session.screen0.fullMaximization: False
session.cacheLife: 5
session.colorsPerChannel: 4
session.opaqueMove: False
session.imageDither: True
session.menuFile: /root/.blackbox/menu
session.styleFile: /usr/share/blackbox/styles/Minimal
session.autoRaiseDelay: 400
session.cacheMax: 200
session.doubleClickInterval: 250
The main elements here are the menu file (discussed next) and the styleFile.
The styleFile sets the colors and contrast - the "Mimimal" style seemed to
work well for the psion, but you can try other styles.
~/.blackbox/menu
#Blackbox menu file
[begin] (Blackbox 0.62.1pre0)
[exec] (xvt) {/usr/bin/xvt -sb -geometry 60x12-10-10 -sl 200}
[exec] (rxvt) {/usr/bin/rxvt -sb -geometry 60x14-10-10 -sr -sl 200}
[exec] (xedit) {xedit -geometry 500x200-5-5 }
[exec] (xcalc) {xcalc -geometry 200x200-15-15 }
[exec] (rclock) {rclock -geometry 60x60-1-1 }
[submenu] (Window Manager)
[exec] (Edit Menus) {xedit -geometry 500x200-5-5 ~/.blackbox/menu}
[config] (Config Options)
[reconfig] (Reconfigure)
[restart] (Restart)
[submenu] (Styles) {Which Style?}
[styles menu] (Blackbox Styles) {/usr/share/blackbox/styles}
[end]
[end]
[exit] (Exit)
[end]
[end]
#end of menu file
It is obvious how one would go about adding additional applications to the
menu. The "style"'s file gives a list of all of the styles that come
with the blackbox package (e.g., "Minimal").
Here is a screenshot of the Windowmaker Manager, an alternative manager.
Emacs21 is also shown running. This manager has a number of advantages
over Blackbox.
Here is a screenshot of the IceWM window manager, another lightweight manager.
11.5 Mouse Issues
The psion's touch screen has mouse button 1 pressed by
default when you touch the screen. If you hold down the Menu
key you can move a window by moving the mouse in the window. If mouse
button 3 is the default and you hold down the Menu key, the "mouse" can
be used to resize a window by moving the mouse anywhere in the window.
You can change the default mouse button manually using xmodmap:
xmodmap -e "pointer = 2 1 3"
will change the default button to 2, etc.
One tool that binds the mouse buttons to key strokes
is xbut
. It allows you to map key stroke
combinations to mouse buttons, using a .xbutrc
like:
# Xbut generates mouse clicks from the keyboard
#
# To see the keycodes, run xev
#
66,Shift,1 # Shift+Left
49,Shift,2 # Shift+Down
65,Shift,3 # Shift+Right
You can download a binary for xbut
HERE.
Also check out the keylaunch
package in the X windows
section at debian.org. It is possible to tie custom key strokes to
executing arbitrary commands such as those using xmodmap to change
the mouse buttons. Start keylaunch &
in your .xinitrc
file. Set up a file .keylaunchrc
that contains:
# Format:
# key=...KeyName: Command
#
# ... No modifier
# *.. Shift
# .*. Ctrl
# ..* Alt
key=..*Return: xvt
key=.*.1:xmodmap -e "pointer = 1 2 3"
key=.*.2:xmodmap -e "pointer = 2 3 1"
key=.*.3:xmodmap -e "pointer = 3 1 2"
So that <Ctrl><1> will set the default mouse button to 1,
<Ctrl><2> will set the default mouse button to 2,
<Ctrl><3> will set the default mouse button to 3, and
<Menu><Enter> will launch an xvt terminal.
It might be possible
to set up special key strokes to behave as the mouse buttons - the
accessX extensions to X apparently allow you to do that. This is
the MouseKeys feature. No luck as yet getting this to work. (If you
type "Cntrl""Shift""NumLock" on your desktop, you can then use the
number keypad to move the mouse around and execute mouse button clicks. The
Psion does not have such a number keypad...)
The mouse button functions can also be emulated with XRmouse. This
nifty tool uses up considerable RAM at the moment, alas. The XRmouse
application can be seen in the top left hand corner of the screenshot
at the top of this page. XRmouse takes a bit of getting used to, but
it works quite well after a time. The binary and source can be
downloaded from
http://projects.gnome.hu/xrmouse/index.en.html.
To use XRmouse you need the gtk libraries:
libgtk1.2-common_1.2.10-9_all.deb
libgtk1.2_1.2.10-9_arm.deb
11.6 Memory Issues
Use ash as your default shell (you may even be able to run xinit directly
when you login and so start up no initial shell at all - in /etc/passwd
change your shell from /bin/sh to /usr/X11R6/bin/xinit...this might
even work...). Use xvt as your terminal. Start X using xinit
directly rather than startx - this saves the memory of a shell, since
startx is a shell script. Don't start up applications, getty's,
daemons, or shells that are not needed. Use a simpler, bare
editor. Minimize, minimize, minimize, and conserve your memory!
My psion 5MX has the following memory usage for a typical X session:
TOTAL AVAILABLE MEMORY: 14500KB
PROCESS | MEMORY | SHARED |
init | 252KB | 188KB |
syslog | 288 | 180 |
inetd | 232 | 160 |
getty (ttyS1) | 192 | 128 |
getty (ttyAM1) | 192 | 128 |
sh | 492 | 412 |
xinit | 652 | 556 |
X | 2084 | 988 |
WindowMaker | 2192 | 1505 |
keylaunch | 684 | 596 |
rclock | 712 | 628 |
xvt | 1196 | 988 |
sh | 392 | 316 |
TOTAL | XKB-unique shared | - |
The memory reported here is the value for RSS from top - much of
this memory is shared among the other applications, particularly
in X. Free memory available for other applications? Probably
around 6-8MB.
Not all these processes are required. Of the processes listed
here, syslog is probably optional, and the getty on ttyS1 is
probably as well (it offers an escape from X). inetd and the
getty on ttyAM1 might be started up only when one wanted to make
a connection. All of which would save a little memory.
So, to be sure, one can't go beserk with the applications,
while running Netscape, but many things will work fine.
11.7 Keyboard Issues
The .Xmodmap file that works for me is:
keycode 71 = Shift_L
keycode 63 = Shift_R
keycode 47 = Control_L
keycode 55 = Mode_switch
keycode 39 = Alt_L
clear Lock
add Shift = Shift_L
add Shift = Shift_R
add Control = Control_L
add Mod1 = Alt_L
add Mod5 = Mode_switch
11.8 Useful X applications
While all X applications are technically supposed to work on the
psion running X, there are three limitations (1) screen size, (2)
memory, and (3) disk space. You must choose your applications
carefully, given these constraints.
- Window Managers As a window manager, Blackbox works well, as does
IceWM and WindowMaker.
- Terminal Emulators Given the memory limitation, xvt is the probably best terminal emulator, rxvt is a second.
- Editors While xedit will work, axe may be a better editor that uses
about the same resources, but it is a little buggy. gvim also works, which may
be one's best bet. Or a slimmed down version of vi such as nvi. Slim versions
of emacs, or emacs clones, are also available.
- Web Browser As a browser, try dillo - set the geometry (try 630x220) and
other features in the ~/.dillo/dillorc file (a template for which
can be copied from /usr/share/doc/dillo).
- Calculators xcalc is a fine calculator that comes by default. Calcoo
is another calculator that might work. Other calculators seemed problematic. You can
now also install octave and gnuplot. (Just install the *.deb file for octave/arm from
Debian "testing" packages.) Octave is a matlab-compatable (mostly)
package. Put "gnuplot*geometry: 400x200+0+0" in your .Xdefaults file to have the
figure size work for the Psion. Here is a screenshot for amusement:
- Clocks rclock is a slightly better clock than xclock. It has a
interesting options in its .rclock file - see the man pages.
- Games xbill is the best game, but it won't fit entirely on the screen,
alas. ace_penguin has a nice set of card games of the solitaire variety that
work well.
- Agenda The "plan" package, under Miscelleneous at the Debian Packages
site, is a nice replacement for Psion's Agenda that works well. You can use it
to set alarms.
- PDF viewers xpdf is probably your best bet, although it requires
a few MB of space to install the various packages and their dependencies (e.g.,
the ghostscript fonts).
- E-Book readers There seems to be a dearth of e-book readers for linux,
and an even greater dearth of e-book readers for psilinux. Possible options are
gutenbrowser available from the Software/X11 download at psilinux.org. Also take
a look at OpieReader, which might
also work. There's a fltk version which
should work fine with X installed (plus the fltk library which is nice and small)
and is reasonably light-weight. There is also a heavier weight version for QT which works
with QPE/Qtopia but the fltk version is probably a better bet for the Psion. The source
code for the fltk version is at
http://www.timwentford.uklinux.net along with makefiles which will require a
bit of work as they currently create a flpda (the pda software on the agenda) as
well as a fltk version, plus they use the Agenda cross compiler. The target for
the pure fltk version is (IIRC) fltkreader. Someday someone might even compile one
of these for psilinux...
- Screen shots "xwd > screenshot" will make a file
"screenshot" of the window or screen (depending on the options). Xwd is an X
Window System window dumping utility. Xwd allows X users to store window
images in a specially formatted dump file. This file can then be read by various
other X utilities for redisplay, printing, editing, formatting, archiving, image
processing, etc. The utility "xwdtopnm" can convert the screenshot to a *.pnm file
for editing or viewing "xwdtopnm screenshot > test.pnm".
This list is new - input welcome on what things work or don't work.
Next
Previous
Contents