Tutorials/Modify KDE Software Defaults

From KDE UserBase Wiki
Revision as of 12:38, 15 March 2009 by OpenIDUser53 (talk | contribs) (New page: If you are a system administrator providing a KDE based terminal service to dozens of users, you may want to set your own KDE defaults for every newly created system user. This page gives ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If you are a system administrator providing a KDE based terminal service to dozens of users, you may want to set your own KDE defaults for every newly created system user. This page gives some hints how.

/etc/skel

When a new user is created, the content from /etc/skel is copied to his home directory. If you want to change the settings for all future users, just change the files in /etc/skel.

examples

To change the default browser, use the program systemsettings. However, if you want to change the setting for a non-existant user (e.g. in /etc/skel), you cannot call systemsettings. In this case you can use the following script. It changes the default browser to firefox:

#!/bin/bash
# This file sets up a computer as tstaerk likes it. Call it after you have performed the OS installation.

# 1. set default browser for KDE to firefox
# 1.1. for SUSE Linux, where we have to look in .kde4 instead of .kde
# The key for default browser is BrowserApplication.
cd /etc/skel
cd .kde4/share/config
# first delete all the old entries for BrowserApplication
sed -i 's/BrowserApplication\[\$e\]=.*//g' kdeglobals
# add BrowserApplication to the General section if a General section exists
sed -i 's/\[General\]/\[General\]\nBrowserApplication\[\$e\]=!firefox/g' kdeglobals
# add a General section and the key BrowerserApplication if no General section exists
grep "\[General\]" kdeglobals || echo -e "\n[General]\nBrowserApplication[\$e]=!firefox" >> kdeglobals