Vejledning/Modificer KDE softwarestandarder

    From KDE UserBase Wiki
    Revision as of 17:42, 12 October 2010 by Claus chr (talk | contribs) (Importing a new version from external source)

    Der er tre grundlæggende scenarier når man vil modificere standard instillinger:

    • du er systemadministrator og får dusinvis a nye brugere hver dag. Du ønsker, at de nye brugere alle skal have nogle indstillinger, som ikke er standard for KDE's Plasma-skrivebord
    • du er systemadministrator og ønsker at ændre skrivebords- eller systemindstillingerne for alle dine brugere. Det kommer ikke på tale at logge ind som hver enkelt bruger og lave indstillingerne i Systemindstillinger.
    • du har flere maskiner, som kører med KDE's Plasma-skrivebord, måske en computer på din arbejdsplads, som arbejder bag en proxyserver, din hjemmecomputer og nogle virtuelle maskiner, som du bruger til at prøve ting af. Du genstarter computere tit og ønsker, at dine ændringer skal rulles ud når maskinerne startes op. \

    In any case you will have to make changes to the setting files in ~/.kde or ~/.kde4 or /usr/local/share or /usr/share.

    /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 System Settings. However, there are situations where 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 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