有3種基本情況時,您需要修改預設值:
不管怎樣,你都是要改 ~/.kde 或 ~/.kde4 或 /usr/local/share 或 /usr/share的設定檔案。
當創建一個新的用戶時複製 /etc/skel目錄的內容到他的家目錄。如果今後您要想修改所有用戶的設定,只需要修改/etc/skel目錄中的檔案。
想要更改預設的瀏覽器,可以使用系統設定程式。但是,在有些情況下你不能調用系統設定。在這種情況下你可以使用下面的腳本。它更改預設的瀏覽器為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 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 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