Tutorials/Modify KDE Software Defaults/ja: Difference between revisions

    From KDE UserBase Wiki
    (Created page with "KDE ソフトウェアのデフォルト設定から変更する")
     
    (Updating to match new version of source page)
     
    (9 intermediate revisions by 3 users not shown)
    Line 1: Line 1:
    <languages />
    <languages />


    There are 3 basic scenarios when you want to modify default settings:
    デフォルトの設定を変更したい状況としては、基本的には以下の3つがあるでしょう:
    * You are system administrator and get a dozen new users every day. You want the new users to have certain settings that are not default for a KDE Plasma Desktop
    * 毎日多くの新規ユーザが入ってくるシステムの管理者が、KDE Plasma Desktop のデフォルトとは異なる、特定の設定を新規ユーザに対して適用したい場合
    * You are system administrator and want to change the desktop or system settings of all your users. Logging in as each user and do the changes in [[Special:myLanguage/System_Settings|System Settings]] is not an option.
    * システム管理者が、全てのユーザに対して設定の変更を行いたい場合。それぞれのユーザの ID でログインして、[[Special:myLanguage/System_Settings|システム設定]]から変更を行う、というやり方はまずありえないでしょう。
    * You have several KDE desktop machines: maybe a computer at work behind a proxy, a machine at home and some virtual machines for testing. You re-setup computers frequently and want your settings to be rolled out identically afterwards
    * 個人で幾つかの KDE デスクトップを搭載したマシンを所有しており、頻繁にコンピュータの再セットアップを行うので、その際に毎回同じ設定が展開されるようにしたい場合。仕事で使っていて、プロキシ環境で利用していたり、或いは家で使っていて、テスト用の仮想マシンが幾つかある場合も含みます。


    In any case you will have to make changes to the setting files in ~/.kde or ~/.kde4 or /usr/local/share or /usr/share.
    いずれの場合も、~/.kde 又は ~/.kde4、/usr/local/share、或いは /usr/share にある設定ファイルを変更しなければなりません。


    == /etc/skel ==
    == /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.
    新規ユーザが作成された際、/etc/skel の内容がそのユーザのホームディレクトリにコピーされます。以後作成される全てのユーザに対する初期設定を作成したい場合、/etc/skel の設定を変更して下さい。


    == Examples ==
    == Examples ==
    To change the default browser, use the program [[Special:myLanguage/System_Settings|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:
    To change the default browser, use the program [[Special:myLanguage/System_Settings|System Settings]]. However, there are situations where you cannot call '''kcmshell5''' to open System Settings. In this case you can use the following script. It changes the default browser to Firefox:


    {{Input|1=<nowiki>#!/bin/bash
    {{Input|1=<nowiki>#!/bin/bash
    # This file sets up a computer as tstaerk likes it. Call it after you have performed the OS installation.</nowiki><br /><nowiki>
    # このファイルは tstaerk (訳注: ユーザ名) の好みに合わせてコンピュータをセットアップするものです。OS のインストール終了後に実行して下さい。</nowiki><br /><nowiki>
    # 1. set default browser to firefox
    # 1. デフォルトのブラウザを Firefox に設定
    # 1.1. for SUSE Linux, where we have to look in .kde4 instead of .kde
    # 1.1. SUSE Linux のために、.kde のではなく .kde4 ディレクトリを見るようにします。
    # The key for default browser is BrowserApplication.
    # デフォルトブラウザのキーは BrowserApplication です。
    cd
    cd
    cd .kde4/share/config
    cd .kde4/share/config
    # first delete all the old entries for BrowserApplication
    # まず、BrowserApplication の全ての古いエントリを削除します。
    sed -i 's/BrowserApplication\[\$e\]=.*//g' kdeglobals
    sed -i 's/BrowserApplication\[\$e\]=.*//g' kdeglobals
    # add BrowserApplication to the General section if a General section exists
    # BrowserApplication General セクションに追加します。(General セクションが存在する場合のみ)
    sed -i 's/\[General\]/\[General\]\nBrowserApplication\[\$e\]=!firefox/g' kdeglobals
    sed -i 's/\[General\]/\[General\]\nBrowserApplication\[\$e\]=!firefox/g' kdeglobals
    # add a General section and the key BrowerserApplication if no General section exists
    # General セクションが存在しない場合、General セクションを追加し、そこに BrowerserApplication キーを追加する。
    grep "\[General\]" kdeglobals || echo -e "\n[General]\nBrowserApplication[\$e]=!firefox" >> kdeglobals</nowiki>}}
    grep "\[General\]" kdeglobals || echo -e "\n[General]\nBrowserApplication[\$e]=!firefox" >> kdeglobals</nowiki>}}


    [[Category:Tutorials]]
    [[Category:Tutorials/ja]]
    [[Category:System]]
    [[Category:System/ja]]
    [[Category:Advanced Users]]
    [[Category:Advanced Users/ja]]

    Latest revision as of 12:20, 26 March 2017

    デフォルトの設定を変更したい状況としては、基本的には以下の3つがあるでしょう:

    • 毎日多くの新規ユーザが入ってくるシステムの管理者が、KDE Plasma Desktop のデフォルトとは異なる、特定の設定を新規ユーザに対して適用したい場合
    • システム管理者が、全てのユーザに対して設定の変更を行いたい場合。それぞれのユーザの ID でログインして、システム設定から変更を行う、というやり方はまずありえないでしょう。
    • 個人で幾つかの KDE デスクトップを搭載したマシンを所有しており、頻繁にコンピュータの再セットアップを行うので、その際に毎回同じ設定が展開されるようにしたい場合。仕事で使っていて、プロキシ環境で利用していたり、或いは家で使っていて、テスト用の仮想マシンが幾つかある場合も含みます。

    いずれの場合も、~/.kde 又は ~/.kde4、/usr/local/share、或いは /usr/share にある設定ファイルを変更しなければなりません。

    /etc/skel

    新規ユーザが作成された際、/etc/skel の内容がそのユーザのホームディレクトリにコピーされます。以後作成される全てのユーザに対する初期設定を作成したい場合、/etc/skel の設定を変更して下さい。

    Examples

    To change the default browser, use the program System Settings. However, there are situations where you cannot call kcmshell5 to open System Settings. In this case you can use the following script. It changes the default browser to Firefox:

    #!/bin/bash
    # このファイルは tstaerk (訳注: ユーザ名) の好みに合わせてコンピュータをセットアップするものです。OS のインストール終了後に実行して下さい。
    # 1. デフォルトのブラウザを Firefox に設定 # 1.1. SUSE Linux のために、.kde のではなく .kde4 ディレクトリを見るようにします。 # デフォルトブラウザのキーは BrowserApplication です。 cd cd .kde4/share/config # まず、BrowserApplication の全ての古いエントリを削除します。 sed -i 's/BrowserApplication\[\$e\]=.*//g' kdeglobals # BrowserApplication を General セクションに追加します。(General セクションが存在する場合のみ) sed -i 's/\[General\]/\[General\]\nBrowserApplication\[\$e\]=!firefox/g' kdeglobals # General セクションが存在しない場合、General セクションを追加し、そこに BrowerserApplication キーを追加する。 grep "\[General\]" kdeglobals || echo -e "\n[General]\nBrowserApplication[\$e]=!firefox" >> kdeglobals