Created an attachment (id=2511)
Helper program for creating global cache files
This tool creates a cache file for a given locale and compose file.
Unfortunately, due to the way XIM is integrated into libX11, a Xserver
has to be running in order to create a cache. If somebody sees a clearer
way to deal with this you're very welcome to change it.
For distributors I also add an example script below that shows how global cache
files for the three UTF8 compose tables can created using Xvfb. This is only a
skeleton, though.
Currently paths are hardcoded. Also note that compose tables for non-UTF8
locales currently shouldn't be cached globaly, as the encoding may differ
with different locales. This is something to be addressed.
------> CUT <-------
#!/bin/sh
if [ $# -gt 1 ]; then
echo "$0 [x11-root]"
exit 0
fi
Created an attachment (id=2511)
Helper program for creating global cache files
This tool creates a cache file for a given locale and compose file.
Unfortunately, due to the way XIM is integrated into libX11, a Xserver
has to be running in order to create a cache. If somebody sees a clearer
way to deal with this you're very welcome to change it.
For distributors I also add an example script below that shows how global cache
files for the three UTF8 compose tables can created using Xvfb. This is only a
skeleton, though.
Currently paths are hardcoded. Also note that compose tables for non-UTF8
locales currently shouldn't be cached globaly, as the encoding may differ
with different locales. This is something to be addressed.
------> CUT <-------
#!/bin/sh
if [ $# -gt 1 ]; then
echo "$0 [x11-root]"
exit 0
fi
if [ $# -eq 1 ]; then
ROOT=$1
fi
mkdir -p $ROOT/var/ X11R6/compose- cache
tmpfile=$(mktemp /tmp/Xvfb. log.XXXXXXXXXX) X11R6/bin/ Xvfb \ X11R6/lib/ X11/fonts/ misc/ \ X11/xserver/ SecurityPolicy \ X11R6/lib/ X11/rgb \
$ROOT/usr/
-fp $ROOT/usr/
-sp $ROOT/etc/
-co $ROOT/usr/
:99 &> $tmpfile &
trap "kill $!; rm $tmpfile || true" EXIT
export DISPLAY=:99 PATH=$ROOT/ usr/X11R6/ lib64:$ ROOT/usr/ X11R6/lib $ROOT/usr/ X11R6/lib/ X11/locale/ X11R6/bin/ xbiff &> /dev/null &
export LD_LIBRARY_
export XLOCALEDIR=
sleep 5
$ROOT/usr/
pushd $ROOT/
usr/X11R6/ bin/mkcomposeca che "en_US.UTF-8" lib/X11/ locale/ en_US.UTF- 8/Compose" "var/X11R6/ compose- cache" lib/X11/ locale/ en_US.UTF- 8/Compose" bin/mkcomposeca che "pt_BR.UTF-8" lib/X11/ locale/ pt_BR.UTF- 8/Compose" "var/X11R6/ compose- cache" lib/X11/ locale/ pt_BR.UTF- 8/Compose" bin/mkcomposeca che "el_GR.UTF-8" lib/X11/ locale/ el_GR.UTF- 8/Compose" "var/X11R6/ compose- cache" lib/X11/ locale/ el_GR.UTF- 8/Compose"
"usr/X11R6/
"/usr/X11R6/
usr/X11R6/
"usr/X11R6/
"/usr/X11R6/
usr/X11R6/
"usr/X11R6/
"/usr/X11R6/
popd
chmod 444 $ROOT/var/ X11R6/compose- cache/*