sidux.com
Menu

News

Give back
Last 3 Contributions
30-11-2008 20.00
25-11-2008 100.00
25-11-2008 20.00

Donate


Sponsor
hetzner.de

Languages
Preferred language:



This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ModestUser
Post subject: patch: add language setting to kdmrc  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
kelmo
Post subject: RE: patch: add language setting to kdmrc  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
ModestUser
Post subject: RE: patch: add language setting to kdmrc  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
kelmo
Post subject: Re: RE: patch: add language setting to kdmrc  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
ModestUser
Post subject: Re: RE: patch: add language setting to kdmrc  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
kelmo
Post subject: RE: Re: RE: patch: add language setting to kdmrc  PostPosted: Jul 16, 2008 - 07:14 AM



Joined: Dec 19, 2006
Posts: 1030

Status: Offline
There can be only one kdm, I think.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2006-2008 by sidux e.V., 10407 Berlin, Kniprodestr. 104. sidux e.V. is a Berlin, Germany based non-profit foundation. Consult Impressum and Legal Terms for details. sidux™ is Free Software released under the GNU/GPL license and other compatible licenses.
powered by Zikula & Zafenio