LibreOffice - Sæt indstillinger

Source: Download script

Last Updated: 4. December 2024 by Agnete Moos (agms@sonderborg.dk)

Parameters:

Navn Type Standardværdi Påkrævet
Click to see the source code
#!/usr/bin/env bash

# Overwrite the Libreoffice registrymodifications.xcu config with our own version.
# Takes two checkboxes as input. The first disables Tip of the day and displaying the changelog when you start the app.
# The second changes the default fileformats to Microsoft's (.docx, .pptx, .xlsx).

if get_os2borgerpc_config os2_product | grep --quiet kiosk; then
  echo "Dette script er ikke designet til at blive anvendt på en kiosk-maskine."
  exit 1
fi

REMOVE_TIP_OF_THE_DAY=$1
SET_FORMATS_TO_MICROSOFTS=$2

CONFIG_DIR="/home/.skjult/.config/libreoffice/4/user/"
FILE_PATH=$CONFIG_DIR"registrymodifications.xcu"

mkdir -p $CONFIG_DIR

rm -f $FILE_PATH

cat << EOF >> $FILE_PATH


EOF

if [ "$REMOVE_TIP_OF_THE_DAY" == "True" ]; then
cat << EOF >> $FILE_PATH
    false
    30.0
EOF
fi

if [ "$SET_FORMATS_TO_MICROSOFTS" == "True" ]; then
cat << EOF >> $FILE_PATH
    MS Word 2007 XML
    Calc MS Excel 2007 XML
    Impress MS PowerPoint 2007 XML
EOF
fi

printf ""  >> $FILE_PATH 

Beskrivelse

Script der overskriver LibreOffices config med vores egen.

Kræver at brugeren logger ud og ind igen før indstillingerne træder i kraft.

Dette script er blevet testet og virker på Ubuntu 22.04.

Parametre

  1. Sæt kryds for at slå “Tip of the Day” og frigivelsesnoter fra. Lad stå tom for at slå dem til.
  2. Sæt kryds for at bruge Microsofts filformater (.docx, .xlsx, .pptx) frem for LibreOffices standard ODF formater. Lad stå tom for at bruge standard-formaterne.