-
Notifications
You must be signed in to change notification settings - Fork 0
/
set-gdm-hidpi.sh
30 lines (28 loc) · 1.08 KB
/
set-gdm-hidpi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
FILE=$(basename ${BASH_SOURCE})
while test $# -gt 0; do
case ${1} in
-h|--help)
echo "${FILE} - set HI-DPI scaling factor for GDM"
echo " "
echo "${FILE} [options] application [arguments]"
echo " "
echo "options:"
echo "-h, --help show brief help"
echo "-s, --scale-factor floating point value eg. 1, 1.0, 1.5, 1.75, 2, 2.0 etc"
exit 0
;;
-s|--scale-factor)
SCALE_FACTOR=${2}
echo "-----------------------------------------------"
echo "This configuration must be run as the ROOT user"
echo "Please enter the password for the ROOT user "
echo "when prompted. "
echo "-----------------------------------------------"
su - root -c 'echo "[org.gnome.desktop.interface]" > /usr/share/glib-2.0/schemas/93_hidpi.gschema.override;
echo "scaling-factor='${SCALE_FACTOR}'" >> /usr/share/glib-2.0/schemas/93_hidpi.gschema.override;
glib-compile-schemas /usr/share/glib-2.0/schemas'
exit 0
;;
esac
done