BxLUG groupe des utilisateurs de GNU/Linux de Bruxelles

Espace membres

Remove the user's OpenOffice.org configuration

Sometimes, the user's OOo configuration get corrupted. It should be possible to delete it by removing a single file, but it is not that simple: you have to delete two files and a folder. On next OOo's startup, the /usr/bin/openoffice from the Debian packaging will recreate the suited configuration, minus his personal modifications, of course.

To do this, delete from the user's home folder:

And that's all.

Here is a small script that will take care of it, smartly:
#! /bin/sh
# This script will "cleanup" OOo user's configuration in argument
 
if [ -z "$1" ]; then
        echo "Usage: $0 username"
else
        HOMEDIR=`grep ^$1 /etc/passwd | cut -d : -f6`
        if [ ! -d "$HOMEDIR" ]; then
                echo "Home directory $HOMEDIR does not exist"
        else
                if [ -d "$HOMEDIR/.openoffice/" ]; then
                        rm -rf $HOMEDIR/.openoffice
                fi
                if [ -f "$HOMEDIR/.sversionrc" ]; then
                        rm -f $HOMEDIR/.sversionrc
                fi
                if [ -f "$HOMEDIR/.user60.rdb" ]; then
                        rm -f $HOMEDIR/.user60.rdb
                fi
        fi
        echo $HOMEDIR
fi

Bienvenue dans le monde du libre