Openbox - 共通事項 - 画面キャプチャ - xfce4-screenshooter

クラウディア 
1. 概要
2. インストール
3. クリップボードマネージャ
4. antiX, MX Linux
5. EndeavourOS, Void Linux
6. Manjaro
7. PCLinuxOS
8. 状況

1. 概要

 プラットフォームによっては、あらかじめ、「xfce4-screenshooter」がインストールされていたりします。  わたしは、以下のショートカットキーを割り当てて
Print		全画面キャプチャ
・Ctrl+Print	アクティブウィンドウキャプチャ
 あわよくば、一気にクリップボードにコピーしておきたいと思います。

2. インストール

 それぞれのプラットフォームで用意されている、パッケージ管理プログラムで、以下のいずれかをインストールします。
キャプチャプログラム   インストールするパッケージ   備考
mate-screenshot mate-utils
gnome-screenshot gnome-screenshot, gnome-shells
xfce4-screenshooter xfce4-screenshooter, xfce4-clipman

 「EndeavourOS」「Manjaro」


yes | pacman -S xfce4-screenshooter xfce4-clipman-plugin
 「antiX」「MX Linux」

apt install -y xfce4-screenshooter xfce4-clipman
 「PCLinuxOS」

apt-get install -y xfce4-screenshooter xfce4-clipman-plugin
 「Void Linux」

xbps-install -Sy xfce4-screenshooter xfce4-clipman-plugin

3. クリップボードマネージャ

 「xfce4-clipman」をインストールしたものは、ログイン時に起動するようにします。  ログインユーザで。  「antiX」「EndeavourOS(2021.02.03 まで)」「Manjaro」「MX Linux」「PCLinuxOS」「SpiralLinux」

mkdir -pv ~/.config/openbox

sh
cat << 'EOF' >> ~/.config/openbox/autostart

xfce4-clipman &
EOF
exit
 「EndeavourOS(2021.04.17)」

mkdir -pv ~/.config/openbox

sh
cat << 'EOF' >> ~/.config/openbox/autostart

xfce4-clipman &
EOF
exit

4. antiX, MX Linux

 カスタマイズ用にファイルをコピーして編集。

cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml
vi ~/.config/openbox/rc.xml

  <!-- Launch scrot when Print is pressed -->
  <keybind key="Print">
    <action name="Execute"><command>scrot</command></action>
  </keybind>
 を下記へ変更します。  (行番号は、バージョンにより異なります)

    <!-- Launch scrot when Print is pressed -->
    <keybind key="Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -f</command>
      </action>
    </keybind>
    <keybind key="C-Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -w</command>
      </action>
    </keybind>

5. EndeavourOS, Void Linux


mkdir -pv ~/.config/openbox
cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml
vi ~/.config/openbox/rc.xml

  </keybind>
</keyboard>
 を下記へ変更します。

  </keybind>

  <!-- screenshot when Print is pressed -->
  <keybind key="Print">
    <action name="Execute">
      <command>xfce4-screenshooter -c -f</command>
    </action>
  </keybind>
  <keybind key="C-Print">
    <action name="Execute">
      <command>xfce4-screenshooter -c -w</command>
    </action>
  </keybind>
</keyboard>

6. Manjaro

 ショートカットキーの設定。

vi ~/.config/openbox/rc.xml

    <keybind key="Print">
      <action name="Execute">
        <command>scrot 'screenshot_%Y%m%d-%H%M%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; xdg-open $$(xdg-user-dir PICTURES)/$f'</command>
      </action>
    </keybind>
 を下記へ変更します。

    <keybind key="Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -f</command>
      </action>
    </keybind>
    <keybind key="C-Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -w</command>
      </action>
    </keybind>

7. PCLinuxOS

 ショートカットキーの設定。

cp /etc/xdg/openbox/rc.xml ~/.config/openbox/.
vi ~/.config/openbox/rc.xml

    <keybind key="Print">
      <action name="Execute">
        <command>gnome-screenshot'</command>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <command>gnome-screenshot -w</command>
      </action>
    </keybind>
 を下記へ変更します。

    <keybind key="Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -f'</command>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <command>xfce4-screenshooter -c -w</command>
      </action>
    </keybind>

8. 状況

 前項にも記しましたが、「ArcoLinux 19.12.15」では、「xfce4-screenshooter」で、クリップボードへのコピーまで行えました。  ディストリビューションごとの状況を、確認できたときに記しておきます。
  状況    プラットフォーム   備考 
「xfce4-screenshooter」で、クリップボードのコピーまで可ArcoLinux 20.07.5
FreeBSD 12.2
EndeavourOS 2021.02.03 ※1
Lubuntu 22.04
Manjaro 19.0, 20.2
MX Linux 21, 21.1
SparkyLinux 5.12
Void Linux 20210218
時間がたつと、「xfce4-clipman」がこける Fedora 33
「xfce4-screenshooter」がこける Mageia 8

 「FreeBSD」では、バックグラウンドでの「xfce4-screenshooter」のクリップボードから「VirtualBox」のクリップボードへのコピーが機能しませんので、「mate-screenshot」を使用します。
 ※1 「EndeavourOS 2020.09.20」では、「xfce4-clipman」がこけていました。

earthcar(アースカー)