summaryrefslogtreecommitdiffstats
path: root/starttde
diff options
context:
space:
mode:
Diffstat (limited to 'starttde')
-rwxr-xr-xstarttde25
1 files changed, 15 insertions, 10 deletions
diff --git a/starttde b/starttde
index 899bdfa9c..66360e228 100755
--- a/starttde
+++ b/starttde
@@ -364,6 +364,12 @@ if [ -d "$tdehome" ]; then
fi
fi
+# Get current font DPI configuration
+CUR_ForceFontDPI="`$TDEDIR/bin/kreadconfig --file kcmfonts --group General --key forceFontDPI --default 0`"
+CUR_ForceFontDPIEnable=false
+[ $CUR_ForceFontDPI -gt 0 ] && CUR_ForceFontDPIEnable=true
+unset CUR_ForceFontDPI
+
# Please see tdestartupconfig source for usage.
mkdir -m 700 -p "$tdehome/share"
mkdir -m 700 -p "$tdehome/share/config"
@@ -377,9 +383,11 @@ kcmrandrrc [Screen0]
kcmrandrrc [Screen1]
kcmrandrrc [Screen2]
kcmrandrrc [Screen3]
+kcmfonts General forceFontDPIEnable ${CUR_ForceFontDPIEnable}
kcmfonts General forceFontDPI 0
EOF
$TDEDIR/bin/tdestartupconfig
+unset CUR_ForceFontDPIEnable
if test $? -ne 0; then
xmessage -center -geometry 500x100 "Could not start tdestartupconfig. Check your installation."
fi
@@ -474,14 +482,12 @@ if test -z "$dl" && test "$kpersonalizerrc_general_firstlogin" != "true"; then
esac
fi
-if test "$kcmfonts_general_forcefontdpi" -eq 120; then
- xrdb -quiet -merge -nocpp <<EOF
-Xft.dpi: 120
-EOF
-elif test "$kcmfonts_general_forcefontdpi" -eq 96; then
- xrdb -quiet -merge -nocpp <<EOF
-Xft.dpi: 96
-EOF
+if test "$kcmfonts_general_forcefontdpienable" = "true"; then
+ echo "[starttde] Setting font DPI to $kcmfonts_general_forcefontdpi" 1>&2
+ tmpfile=$(mktemp /tmp/xft_dpi_settings.XXXXXX)
+ echo "Xft.dpi: $kcmfonts_general_forcefontdpi" > $tmpfile
+ xrdb -quiet -merge -nocpp $tmpfile
+ rm $tmpfile
fi
# Configuration of the gtk_qt_engine if not already set.
@@ -833,8 +839,7 @@ for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'`; do
done
done
-unset TDE_FULL_SESSION
xprop -root -remove TDE_FULL_SESSION
-unset TDE_SESSION_UID
+unset TDE_FULL_SESSION TDE_SESSION_UID
echo "[starttde] Trinity shutdown complete." 1>&2