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

Saving KDE settings



I know of the homedir persistence option but that
is not quite what I wanted. I simply want some way
to save my default KDE desktop settings (modified
kicker etc) and be able to restore it EASILY the
next time I install or boot up a liveCD KDE desktop,
and to be able to do so from a network connection
rather than from a USB device.

This almost works and hopefully it might be useful
to someone else if they Google this lists archives.
To be useful with Knoppix some thought would have
to go into how to wedge it in the boot sequence just
before X/KDE starts up... and some error checking.

$FILE is approx 150k so it's suitable for dialup users.

FWIW...

#!/bin/sh
#
# bkp v0.1.0 20060306 markc@renta.net
#
# A lightweight method of saving and restoring user desktop
# settings to a remote host using a simple ftp client.
# License: http://www.gnu.org/licenses/gpl.txt

[ "x$3" = "x" ] && echo "Usage: bkp get|put login pw" && exit 1

FILE=".ht_bkp.tbz"
HOST="myserver.com"

if [ "x$1" == "xget" ];then

    ftp -n $HOST <<SCRIPT
user $2 $3
binary
get $FILE
quit
SCRIPT
    tar xjf $FILE
    echo "Homedir settings restored from $HOST"

elif [ "x$1" == "xput" ];then

    echo $(date "+%Y%m%d") > ~/.kde/.backup_date

    tar cjf $FILE \
     --exclude=*.png \
     --exclude=.kde/share/apps/akregator/Archive \
     --exclude=.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp \
     --exclude=.kde/share/apps/kmail/{imap,mail} \
     --exclude=.kde/{cache-*,socket-*,tmp-*} \
     --exclude=.bash_history \
     .bash* .gtkrc* .kde

    ftp -n $HOST <<SCRIPT
user $2 $3
binary
put $FILE
quit
SCRIPT
    echo "Homedir settings saved to $HOST"

else
    echo "Usage: kdebkp get|put login pw"
fi


--markc



Reply to: