PDA

View Full Version : Editing kdmrc?



Fredh
Jan 23rd 2008, 12:52 PM
As I mentioned in a previous post:

I could set the background on the log in screen to a nicer one but now the user manager (whatever it is called) is an ugly gray with a huge logo on the right hand sideand not the nice transparent one after the update. Nothing I do in the log in manager changes anything :(

Now I am looking at editing the kdmrc by hand and need some help.

Hre is the now status at least the relevant parts:


[X-*-Greeter]
AntiAliasing=true
ColorScheme=
EchoMode=OneStar
FaceSource=AdminOnly
FailFont=Sans Serif,10,-1,5,75,0,0,0,0,0
GUIStyle=
GreetFont=Sans Serif,22,-1,5,50,0,0,0,0,0
GreetString=Welcome to Kubuntu at %n
GreeterPos=50,50
HiddenUsers=
Language=de
LogoArea=Logo
LogoPixmap=/usr/share/apps/kdm/pics/kdelogo.png
MaxShowUID=29999
MinShowUID=1000
NumLock=On
Preloader=/usr/bin/preloadkde
SelectedUsers=
ShowUsers=NotHidden
SortUsers=true
StdFont=Sans Serif,10,-1,5,50,0,0,0,0,0
Theme=@@@ToBeReplacedByDesktopBase@@@
UseBackground=true
UserCompletion=false
UserList=false

[X-:*-Core]
AllowNullPasswd=true
AllowShutdown=All
NoPassEnable=false
NoPassUsers=
ServerArgsLocal=-nolisten tcp
ServerCmd=/usr/bin/X -br

[X-:*-Greeter]
AllowClose=true
DefaultUser=fred1
FocusPasswd=true
LoginMode=DefaultLocal
PreselectUser=Previous

I would like to have the transparent user manager as after yesterdays update.

Thank you so much for any help.

ElZorro
Jan 27th 2008, 11:42 AM
just start Kate in terminal
sudo kate
passwd
and away you go
Best
El Zorro

txHarleyMan
Jan 27th 2008, 12:53 PM
Look at /etc/init.d/kdm

Find "# we use an alternative kdm master configuration file"
ARG="$ARG -config $KDMCFG"

I commented this line out because I like the gray login box. Is it commented out?

Fredh
Jan 27th 2008, 04:18 PM
@elzoro:

just start Kate in terminal
sudo kate
passwd
and away you go
Best
El Zorro


Away you go with what??

Fredh
Jan 27th 2008, 04:24 PM
Look at /etc/init.d/kdm

Find "# we use an alternative kdm master configuration file"
ARG="$ARG -config $KDMCFG"
I commented this line out because I like the gray login box. Is it commented out?
Wonderful,l I hate the grey. But would you be so kind as to tell me how you accessed that file to edit in (HH)?

txHarleyMan
Jan 27th 2008, 06:41 PM
Wonderful,l I hate the grey. But would you be so kind as to tell me how you accessed that file to edit in (HH)?


You have to edit the file as root.
Open konsole
cd /etc/init.d
sudo kate kdm
enter your passwd when prompted

Fredh
Jan 27th 2008, 10:24 PM
OKay thank you this is a copy of that file:


#!/bin/sh
### BEGIN INIT INFO
# Provides: x-display-manager kdm
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: console-screen
# Should-Stop: console-screen
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: X display manager for KDE
# Description: KDM manages a collection of X servers, which may be on the local host or remote machines.
### END INIT INFO
# /etc/init.d/kdm: start or stop the X display manager
# Script originally stolen from the xdm package
#
# description: K Display Manager
#
set -e

# To start kdm even if it is not the default display manager, change
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/bin/kdm
PIDFILE=/var/run/kdm.pid
UPGRADEFILE=/var/run/kdm.upgrade

# parameters to support kdm customization
KDMRC=/etc/kde3/kdm/kdmrc
BACKGROUNDRC=/etc/kde3/kdm/backgroundrc

#if configuration is changed by kdmtheme or other tools, don't do magick
if grep -q "Theme=@@@ToBeReplacedByDesktopBase@@@" ${KDMRC} && grep -q "Wallpaper=default_blue.jpg" ${BACKGROUNDRC}
then



KDMOVERRIDEDIR=/etc/default/kdm.d
KDMCFGDIR=/var/run/kdm
KDMCFG=$KDMCFGDIR/kdmrc
BACKGROUNDCFG=$KDMCFGDIR/backgroundrc

test -x $DAEMON || exit 0

# uncomment, if you want auto-logon to be runlevel-dependant
#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; }
#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog

# uncomment, if you want tons of debug info in your syslog
#ARG="$ARG -debug 255"

# we use an alternative kdm master configuration file
ARG="$ARG -config $KDMCFG"

# we source overrides. run-parts sorts the list in a predictable order
if [ -d "$KDMOVERRIDEDIR" ]; then
for part in $(run-parts --list "$KDMOVERRIDEDIR" 2>/dev/null || true); do
. "$part"
done
fi

# we generate kdm configuration files
genkdmconf --in $KDMCFGDIR 1> /dev/null

# we update kdm configuration files (only overridden values)
[ -n "$USEBACKGROUND" ] && sed -i "s|^#\?UseBackground=.*|UseBackground=$USEBACKGROUN D|" $KDMCFG
[ -n "$BACKGROUNDCFG" ] && sed -i "s|^#\?BackgroundCfg=.*|BackgroundCfg=$BACKGROUNDCF G|" $KDMCFG
[ -n "$USETHEME" ] && sed -i "s|^#\?UseTheme=.*|UseTheme=$USETHEME|" $KDMCFG
[ -n "$THEME" ] && sed -i "s|^#\?Theme=.*|Theme=$THEME|" $KDMCFG
[ -n "$FACESOURCE" ] && sed -i "s|^#\?FaceSource=.*|FaceSource=$FACESOURCE|" $KDMCFG
[ -n "$WALLPAPER" ] && sed -i "s|^#\?Wallpaper=.*|Wallpaper=`readlink -f $WALLPAPER`|" $BACKGROUNDCFG

# we get the system default locale if USESYSTEMLOCALE is set to true
$USESYSTEMLOCALE && sed -i "s|^#\?Language=.*|Language=`grep -re "LANG=" /etc/default/locale | awk 'BEGIN { FS = "[\\"|.]" } { print $2 }'`|" $KDMCFG

fi
# autologin overrides are useful for live debian environment
if [ -n "$AUTOLOGINUSER" ]; then
sed -i "s|^#\?AutoLoginEnable=.*|AutoLoginEnable=true|" $KDMCFG
sed -i "s|^#\?AutoLoginUser=.*|AutoLoginUser=$AUTOLOGINUSE R|" $KDMCFG
fi
[ -n "$AUTOLOGINDELAY" ] && sed -i "s|^#\?AutoLoginDelay=.*|AutoLoginDelay=$AUTOLOGIND ELAY|" $KDMCFG
[ -n "$AUTOLOGINAGAIN" ] && sed -i "s|^#\?AutoLoginAgain=.*|AutoLoginAgain=$AUTOLOGINA GAIN|" $KDMCFG
[ -n "$AUTOLOGINLOCKED" ] && sed -i "s|^#\?AutoLoginLocked=.*|AutoLoginLocked=$AUTOLOGI NLOCKED|" $KDMCFG

# If we upgraded the daemon, we can't use the --exec argument to
# start-stop-daemon since the inode will have changed. The risk here is that
# in a situation where the daemon died, its pidfile was not cleaned up, and
# some other process is now running under that pid, start-stop-daemon will send
# signals to an innocent process. However, this seems like a corner case.
# C'est la vie!
if [ -e $UPGRADEFILE ]; then
SSD_ARGS="--pidfile $PIDFILE --startas $DAEMON"
else
SSD_ARGS="--pidfile $PIDFILE --exec $DAEMON"
fi

stillrunning () {
if expr "$(cat /proc/$DAEMONPID/cmdline 2> /dev/null)" : "$DAEMON" > /dev/null 2>&1; then
true
else
# if the daemon does not remove its own pidfile, we will
rm -f $PIDFILE $UPGRADEFILE
false
fi;
}

case "$1" in
start)
if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
[ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
[ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
echo "Not starting K Display Manager (kdm); it is not the default display manager."
else
# if usplash is runing, make sure to stop it now, yes "start" kills it.
if pidof usplash > /dev/null; then
DO_NOT_SWITCH_VT=yes /etc/init.d/usplash start
fi

echo -n "Starting K Display Manager: kdm"
start-stop-daemon --start --quiet $SSD_ARGS -- $ARG || echo -n " already running"
echo "."
fi
;;

restart)
/etc/init.d/kdm stop
if [ -f $PIDFILE ]; then
if stillrunning; then
exit 1
fi
fi
/etc/init.d/kdm start
;;

reload)
echo -n "Reloading K Display Manager configuration..."
if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then
echo "done."
else
echo "kdm not running."
fi
;;

force-reload)
/etc/init.d/kdm reload
;;

stop)
echo -n "Stopping K Display Manager: kdm"
if [ ! -f $PIDFILE ]; then
echo " not running ($PIDFILE not found)."
exit 0
else
DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
KILLCOUNT=1
if [ ! -e $UPGRADEFILE ]; then
if start-stop-daemon --stop --quiet $SSD_ARGS; then
# give kdm's signal handler a second to catch its breath
sleep 1
else
echo -n " not running"
fi
fi
while [ $KILLCOUNT -le 5 ]; do
if stillrunning; then
kill $DAEMONPID
else
break
fi
sleep 1
KILLCOUNT=$(( $KILLCOUNT + 1 ))
done
if stillrunning; then
echo -n " not responding to TERM signal (pid $DAEMONPID)"
else
rm -f $UPGRADEFILE
fi
fi
echo "."

# Launches usplash on shutdown
if ( `grep -q '\( \|^\)splash\( \|$\)' /proc/cmdline` && `which usplash_down >/dev/null` ) ; then
usplash_down
fi
;;

*)
echo "Usage: /etc/init.d/kdm {start|stop|restart|reload|force-reload}"
exit 1
;;
esac

exit 0


No, that line is active ???

bmccosar
Jan 28th 2008, 12:55 AM
I'm relatively new here, and I hate to ring in on something over my depth, but I think kate needs kdesu to work properly. There's a better explanation here:

http://www.psychocats.net/ubuntu/graphicalsudo

So you'd actually start off the above with


kdesu kate

(The article uses gksudo, but, you know... :D )

The first time you run kate under kdesu, you may see a bit of weirdness on the command line . . .


passprompt


DCOPClient::attachInternal. Attach failed Could not open network socket

/usr/bin/iceauth: creating new authority file /root/.ICEauthority

kbuildsycoca running...

Invalid entry (missing '=') at /tmp/kde-root/kconf_updateV4Szhc.tmp:1

Invalid entry (missing '=') at /tmp/kde-root/kconf_updateNsZXxb.tmp:1

kdecore (KProcess): WARNING: _attachPty() 11


Well, face it, kate is in an unfamiliar situation. But it works fine.

Snowhog
Jan 28th 2008, 01:06 AM
Starting kate with kdesu from the command line is correct when one wants/needs to use the graphical editor 'as root' in order to edit files owned by root.

Assuming that the function within Konqueror in HH is the same as in GG, you can also navigate to the file with Konqueror and right-click on the file and select Actions | Edit as Root. This works only with files having extentions that are recognized (registered) as text files.

bmccosar
Jan 28th 2008, 01:17 AM
Assuming that the function within Konqueror in HH is the same as in GG, you can also navigate to the file with Konqueror and right-click on the file and select Actions | Edit as Root. This works only with files having extentions that are recognized (registered) as text files.


Hey, now THAT was helpful! Thanks!

I guess it's true if you give, you receive. ;D

Fintan
Jan 28th 2008, 01:35 AM
Assuming that the function within Konqueror in HH is the same as in GG, you can also navigate to the file with Konqueror and right-click on the file and select Actions | Edit as Root. This works only with files having extentions that are recognized (registered) as text files.

That is correct because
sudo kate tends to do strange things with the permissions in /home/username. You can also do alt+F2+ kdesudo kate.

Fredh
Jan 28th 2008, 01:40 AM
Thankx guys.

sudo kate
corrupted a few of my permission (gave ICEauthhority root and turned off DCOP) which I had to reset. So I did it the konqueror+actions->edit as root way after I could log in again.

Now how do I change the background without getting that (ugly?) grey user manager?