script to fix screen resolution in KDE (Mandriva)
user=$(users | cut -d" " -f1) # nastavit ucet aktivniho uzivatele
width="800"
height="600"
DPI="96" # For my 1680x1050 resolution on 18.5 inches wide LCD I preffer DPI="180" - gives me nice great webpages (good visibility of all fonts). All fonts set to 9 - 10px
# nastaveni rozliseni pri startu kde4
clear
echo "Setting account of user $user - resolution $width x $height and DPI $DPI"
# ucet
cd /home/$user/.kde4/share/config
# kcmrandrrc
echo "
[Display]
ApplyOnStartup=true
[Screen0]
width=$width
height=$height
" > kcmrandrrc
# startupconfig
echo "
#! /bin/sh
# kcminputrc Mouse cursorTheme ''
kcminputrc_mouse_cursortheme=\"\"
# kcminputrc Mouse cursorSize ''
kcminputrc_mouse_cursorsize=\"\"
# ksplashrc KSplash Theme Default
ksplashrc_ksplash_theme=\"Free\"
# ksplashrc KSplash Engine KSplashX
ksplashrc_ksplash_engine=\"kde4-splash-mdv\"
kcmrandrrc Display ApplyOnStartup true
kcmrandrrc_display_applyonstartup=\"true\"
kcmrandrrc [Screen0]
# kcmrandrrc [Screen0]
# kcmrandrrc [Screen1]
# kcmrandrrc [Screen2]
# kcmrandrrc [Screen3]
# kcmfonts General forceFontDPI 0
kcmfonts_general_forcefontdpi=\"$DPI\"
# kdeglobals Locale Language '' # trigger requesting languages from KLocale
kdeglobals_locale_language=\"cs\"
# kdeglobals Locale Country ''
kdeglobals_locale_country=\"cz\"
klocale_languages=cs:en_US" > startupconfig
echo -e $'\E[1;32m10s to Reboot\E[1;0m'
set -x
sleep 10
reboot
width="800"
height="600"
DPI="96" # For my 1680x1050 resolution on 18.5 inches wide LCD I preffer DPI="180" - gives me nice great webpages (good visibility of all fonts). All fonts set to 9 - 10px
# nastaveni rozliseni pri startu kde4
clear
echo "Setting account of user $user - resolution $width x $height and DPI $DPI"
# ucet
cd /home/$user/.kde4/share/config
# kcmrandrrc
echo "
[Display]
ApplyOnStartup=true
[Screen0]
width=$width
height=$height
" > kcmrandrrc
# startupconfig
echo "
#! /bin/sh
# kcminputrc Mouse cursorTheme ''
kcminputrc_mouse_cursortheme=\"\"
# kcminputrc Mouse cursorSize ''
kcminputrc_mouse_cursorsize=\"\"
# ksplashrc KSplash Theme Default
ksplashrc_ksplash_theme=\"Free\"
# ksplashrc KSplash Engine KSplashX
ksplashrc_ksplash_engine=\"kde4-splash-mdv\"
kcmrandrrc Display ApplyOnStartup true
kcmrandrrc_display_applyonstartup=\"true\"
kcmrandrrc [Screen0]
# kcmrandrrc [Screen0]
# kcmrandrrc [Screen1]
# kcmrandrrc [Screen2]
# kcmrandrrc [Screen3]
# kcmfonts General forceFontDPI 0
kcmfonts_general_forcefontdpi=\"$DPI\"
# kdeglobals Locale Language '' # trigger requesting languages from KLocale
kdeglobals_locale_language=\"cs\"
# kdeglobals Locale Country ''
kdeglobals_locale_country=\"cz\"
klocale_languages=cs:en_US" > startupconfig
echo -e $'\E[1;32m10s to Reboot\E[1;0m'
set -x
sleep 10
reboot
Komentáře
Okomentovat