| Author |
Message |
|
|
Post subject: patch: add language setting to kdmrc
Posted: Jul 15, 2008 - 12:39 AM
|
|

Joined: Jan 07, 2008
Posts: 298
Status: Offline
|
|
| Neither the sidux live initscripts nor the installer set any Language line in kdmrc. This leads to English defaults for KDM on the hd install disregarding the chosen language. This patch fixes this in fll-xdm. I am not sure, but probably this has to be fixed in the fix_locales_on_HD part of the installer, too. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: patch: add language setting to kdmrc
Posted: Jul 15, 2008 - 04:05 AM
|
|
Joined: Dec 19, 2006
Posts: 1030
Status: Offline
|
|
ModestUser, thanks alot, I'll check this out immediately.
Can I please suggest that you paste the patch file within a [code] box or do not compress it, that way the review and comment can be done as part of discussion more easily. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: patch: add language setting to kdmrc
Posted: Jul 15, 2008 - 11:59 AM
|
|

Joined: Jan 07, 2008
Posts: 298
Status: Offline
|
|
The forum does not accept simple plain text attachments. They have to be compressed. It is very annoying, I agree.
Code:
===================================================================
--- debian/fll-live-initscripts.fll-xdm.init (revision 19206)
+++ debian/fll-live-initscripts.fll-xdm.init (working copy)
@@ -53,11 +53,21 @@
. /lib/init/fll
###
+# source global language setting
+###
+. /etc/default/locale
+
+###
# debian's default-display-manager control file
###
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
###
+# KDM's configuration file
+###
+KDMRC=/etc/kde3/kdm/kdmrc
+
+###
# cheatcode handling
###
if [ -f /proc/cmdline ]; then
@@ -107,9 +117,17 @@
if [ "${CUSTOM_DPI}" ]; then
sed -i -e "s/\(ServerArgsLocal\=\-nolisten tcp\).*$/\1 \-dpi ${CUSTOM_DPI}/" \
- /etc/kde3/kdm/kdmrc
+ "${KDMRC}"
fi
-
+
+ # set language for KDM
+ if grep -q "Language=" "${KDMRC}"; then
+ sed -ri -e 's/^Language=.*/# &/' \
+ -e "0,/Language=/ s/.*Language=.*/Language=${LANG}/" "${KDMRC}"
+ else
+ echo "Language=${LANG}" >> "${KDMRC}"
+ fi
+
unset START STOP
eval $(get_init_seq_num kdm ${FLL_MOUNTPOINT} 2>/dev/null)
if [ "${START}" ] && [ "${STOP}" ]; then
|
|
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: patch: add language setting to kdmrc
Posted: Jul 16, 2008 - 01:02 AM
|
|
Joined: Dec 19, 2006
Posts: 1030
Status: Offline
|
|
|
Code:
===================================================================
--- debian/fll-live-initscripts.fll-xdm.init (revision 19206)
+++ debian/fll-live-initscripts.fll-xdm.init (working copy)
@@ -53,11 +53,21 @@
. /lib/init/fll
###
+# source global language setting
+###
+. /etc/default/locale
+
+###
# debian's default-display-manager control file
###
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
###
+# KDM's configuration file
+###
+KDMRC=/etc/kde3/kdm/kdmrc
+
We need think about KDM version 3 and 4 here. Need to handle it sooner or later...
Code:
+###
# cheatcode handling
###
if [ -f /proc/cmdline ]; then
@@ -107,9 +117,17 @@
if [ "${CUSTOM_DPI}" ]; then
sed -i -e "s/\(ServerArgsLocal\=\-nolisten tcp\).*$/\1 \-dpi ${CUSTOM_DPI}/" \
- /etc/kde3/kdm/kdmrc
+ "${KDMRC}"
fi
-
+
+ # set language for KDM
+ if grep -q "Language=" "${KDMRC}"; then
+ sed -ri -e 's/^Language=.*/# &/' \
+ -e "0,/Language=/ s/.*Language=.*/Language=${LANG}/" "${KDMRC}"
+ else
+ echo "Language=${LANG}" >> "${KDMRC}"
+ fi
+
unset START STOP
eval $(get_init_seq_num kdm ${FLL_MOUNTPOINT} 2>/dev/null)
if [ "${START}" ] && [ "${STOP}" ]; then
Looks okay. |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: patch: add language setting to kdmrc
Posted: Jul 16, 2008 - 06:50 AM
|
|

Joined: Jan 07, 2008
Posts: 298
Status: Offline
|
|
|
kelmo wrote:
We need think about KDM version 3 and 4 here. Need to handle it sooner or later...
My approach would be desktop=kde4 to keep KDE 3 and 4 separated from the beginning. desktop=kde bootcode could be changed to desktop=kde4 if KDE 4 is present. There will be/is some timeframe with builds in both KDE3 and 4. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: patch: add language setting to kdmrc
Posted: Jul 16, 2008 - 07:14 AM
|
|
Joined: Dec 19, 2006
Posts: 1030
Status: Offline
|
|
| There can be only one kdm, I think. |
|
|
| |
|
|
|
 |
|
|