#!/bin/bash
if [ $(id -u) != 0 ]; then
 echo Error: You must be root to run this script!
 exit 1
fi
DPI=100
[ "$1" ] && DPI=$1
[ -e /etc/kde3/kdm/Xservers ] && perl -pi -e "s|(/usr/X11R6/bin/X -nolisten tcp).*|\1 -dpi $DPI -br|" /etc/kde3/kdm/Xservers
[ -e /etc/kde3/kdm/kdmrc ] && perl -pi -e "s|(ServerArgsLocal=-nolisten tcp).*|\1 -dpi $DPI -br|" /etc/kde3/kdm/kdmrc
echo KDM setting was changed to $DPI. You can use another value like:
echo $0 75
echo "Now restart X (Ctrl-Alt-Backspace)"
