[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PaiPix feedback on /etc/X11/Xsession.d/45xsession



Dear colleagues,

In the /etc/X11/Xsession.d/45xsession file that is responsible for tunning the xsession at boot we have:
1 - Included Portuguese support by adding:
pt)
echo 'user_pref("general.useragent.contentlocale", "PT");' >>"$f"
echo 'user_pref("general.useragent.locale", "pt-PT");' >>"$f" ;;

2 - Setup the kde dictionary language by adding bellow line 200:

# Setup kde dictionary
case "$LANGUAGE" in
 de)
   DICT="ogerman" ;;
 fr)ispell
   DICT="french" ;;
 it)
   DICT="italian" ;;
 es)
   DICT="castellano" ;;
 pt)
   DICT="portugues" ;;
 *)
   DICT="american" ;;
esac

and bellow line 2007 we have added an argument to sed:
   -e 's/^KSpell_Dictionary=.*$/KSpell_Dictionary='"$DICT"'/' \

this, to be usefull, requires the package ispell and the dictionary packages. It is quite nice to enable the konqueror spelling tool while filling forms on the web.

This patch is in attachment.  All patches are available from one single
Debian package:
http://aamorimsrv.fis.fc.ul.pt/mirrors/paipix/PAIPIX/i386/paipix-patches_3.7-7_all.deb
See also http://aamorimsrv.fis.fc.ul.pt/

All the best,
Antonio Amorim

--- /mnt/hda5/knx/source/KNOPPIX/etc/X11/Xsession.d/45xsession	2004-11-05 02:10:35.000000000 +0000
+++ /mnt/hda5/knx/fixes/etc/X11/Xsession.d/45xsession	2004-12-18 13:26:38.000000000 +0000
@@ -90,6 +90,9 @@
 de|at|ch)
 echo 'user_pref("general.useragent.contentlocale", "AT");' >>"$f"
 echo 'user_pref("general.useragent.locale", "de-AT");' >>"$f" ;;
+pt)
+echo 'user_pref("general.useragent.contentlocale", "PT");' >>"$f"
+echo 'user_pref("general.useragent.locale", "pt-PT");' >>"$f" ;;
 esac
 # Else leave default language
 done
@@ -165,16 +143,16 @@
 fi
 
 if [ -e "$INDEXFILE" ]; then
-cat >> $HOME/Desktop/KNOPPIX.desktop <<EOF
+cat >> $HOME/Desktop/PAIPIX.desktop <<EOF
 [Desktop Entry]
-Name=KNOPPIX
+Name=PAIPIX
 # Exec=kfmclient openProfile webbrowsing $INDEXFILE
-Exec=konqueror --geometry 850x600+85+70 file:$INDEXFILE
+Exec=konqueror --geometry 800x650+110+40 file:$INDEXFILE
 Type=Application
 Icon=html
 Terminal=0
 EOF
-ln $HOME/Desktop/KNOPPIX.desktop $HOME/.kde/Autostart/showindex.desktop
+ln $HOME/Desktop/PAIPIX.desktop $HOME/.kde/Autostart/showindex.desktop
 fi
 
 # OpenWebSchool
@@ -196,6 +174,22 @@
 ln -sf /cdrom/LinuxTag "$HOME/Desktop/"
 fi
 
+# Setup kde dictionary
+case "$LANGUAGE" in
+ de)
+   DICT="ogerman" ;;
+ fr)
+   DICT="french" ;;
+ it)
+   DICT="italian" ;;
+ es)
+   DICT="castellano" ;;
+ pt)
+   DICT="portugues" ;;
+ *)
+   DICT="american" ;;
+esac
+
 # Setup language/keyboard
 [ -d $HOME/.kde/share/config ] || mkdir -p $HOME/.kde/share/config
 if [ -z "$DONTCHANGE" ]; then
@@ -204,6 +198,7 @@
 sed -e 's/^Charset=.*$/Charset='"$CHARSET"'/' \
     -e 's/^Country=.*$/Country='"$COUNTRY"'/' \
     -e 's/^Language=.*$/Language='"$LANGUAGE"'/' \
+    -e 's/^KSpell_Dictionary=.*$/KSpell_Dictionary='"$DICT"'/' \
     $HOME/.kde/share/config/kdeglobals > $HOME/.kde/share/config/kdeglobals.tmp
 \mv -f $HOME/.kde/share/config/kdeglobals.tmp $HOME/.kde/share/config/kdeglobals
 if [ -z "$BACKGROUND" -o ! -e "$BACKGROUND" ]; then

Reply to: