- 1. 概要
- 2. インストール
- 3. 設定
- 4. ショートカットキー
- 5. GUI で設定できないとき
1. 概要
画面キャプチャ用のプログラムとして「lximage-qt」というものが用意されています・・・。
が、これその名の通り、キャプチャした後、イメージビューアがわきあがってきて、クリップボードにとることはできるのですが、いささか手間が面倒です。
プラットフォームによっては、「gnome-screenshot」が同梱されていますが、「GNOME」「Cinnamon」以外では、手順が1アクション多くなります。
よって「mate-screenshot」を使用します。
2020年9月4日、「xfce4-screenshooter」を「xfce4-clipman」と併用すれば、バックグランドでクリップボードにコピーできることが判明、絶賛移行中です。
2020年11月9日、「FreeBSD」で「xfce4-clipman」がこけることなく機能することが確認できました。
おそらくは、「LXQt」と「xfce4-screenshooter」「xfce4-clipman」は、相性がいい。
他のデスクトップでは、しばらくすると「xfce4-clipman」がこけることが多々あるのですが、「LXQt」上では、ほとんどこけたりしません。
2. インストール
それぞれのプラットフォームの、パッケージ管理プログラムでインストールします。
「ArcoLinux」「EndeavourOS」「Garuda Linux」「Manjaro」
yes | pacman -S xfce4-screenshooter xfce4-clipman-plugin
「Fedora」
yum install -y xfce4-screenshooter xfce4-clipman-plugin
「FreeBSD」
pkg install -y xfce4-screenshooter-plugin xfce4-clipman-plugin
「SparkyLinux」
apt install -y mate-utils
3. 設定
「EndeavourOS」「Garuda Linux」「Manjaro」では、「xfce4-screenshooter」を使うので、ログイン時に、「xfce4-clipman」を起動します。
ログインユーザで
sh
cat << 'EOF' >> ~/.xprofile
/usr/bin/xfce4-clipman &
EOF
exit
「ArcoLinux」
vi ~/.config/autostart/xfce4-clipman-plugin-autostart.desktop
102行をコメントアウトします。
Icon=xfce4-clipman-plugin
OnlyShowIn=XFCE;
Terminal=false
「Fedora」
mkdir -pv ~/.config/autostart
sh
cat << 'EOF' >> ~/.config/autostart/xfce4-clipman.desktop
[Desktop Entry]
Exec=/usr/bin/sh -c "xfce4-clipman &"
Icon=application-x-shellscript
Name=xfce4-clipman
Type=Application
Version=1.0
EOF
exit
「FreeBSD」では
~/.config/autostart/xfce4-clipman-plugin-autostart.desktop
が、機能しているようで、再起動してログインすると「xfce4-clipman」が起動します。
4. ショートカットキー
以下のように、ショートカットキーを割り当てます。
Print | | 全画面キャプチャ |
Ctrl+Print | | アクティブウィンドウキャプチャ |
「スタート」→「設定」→「LXQt settings」→「Shortcut Keys」
「追加」
「ショートカット」横の空白を押すとキー入力待ち(10秒)になりますので Print
コマンド欄に「mate-screenshot」を入力して
「OK」

同じ要領で
「ショートカット」に Ctrl+Print
コマンド欄に「mate-screenshot -w」を設定します。
「xfce4-screenhooter」を使用する場合は、全画面、アクティブウィンドウをクリップボードへコピーがそれぞれ、「xfce4-screenshooter -c -f」「xfce4-screenshooter -c -w」です。
5. GUI で設定できないとき
「SparkyLinux 5.8」では、システム設定のためか、Print を GUI から設定できませんでした。
「EndeavourOS」では、同時に「KDE」をインストールしていると、「Spectacle」にとられちゃいます。
設定ファイルを直接編集することとします。
vi ~/.config/openbox/lxqt-rc.xml
<!-- Launch gnome-screenshot when Print is pressed -->
<keybind key="Print">
<action name="Execute">
<command>lximage-qt --screenshot</command>
</action>
</keybind>
を、下記に変更します。
<!-- Launch gnome-screenshot when Print is pressed -->
<keybind key="Print">
<action name="Execute">
<command>mate-screenshot</command>
</action>
</keybind>
<keybind key="C-Print">
<action name="Execute">
<command>mate-screenshot -w</command>
</action>
</keybind>
「Fedora」もエディタでお手軽に
vi ~/.config/openbox/lxqt-rc.xml
</keybind>
<!-- Keybindings for running applications.
あたりで下記のように記述します。
</keybind>
<!-- screenshot -->
<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>
<!-- Keybindings for running applications.
「Manjaro」だと、Print の記述がないので、328 行と 329 行の間あたりに以下をぶちこみます。
「EndeavourOS」では、299行と 301行の間です。
<!-- screenshot -->
<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>
|