KDE - 共通事項 - 画面キャプチャ - 組み合わせ

クラウディア 
1. 概要
2. インストール
3. 自動起動
4. 既存のショートカットキーを無効化
5. 新規のショートカットキーを設定

1. 概要

 「Spectacle」のショートカットは、無効化できたものの、カスタマイズのショートカットに Ctrl+Print が設定できなかったので、「sxhkd」にまかせます。  下記のものは、「sxhkd」の力を借りなくても大丈夫でした(別ページに記載のものは、下記に表示していません)。 ・PCLinuxOS ・Slackware

2. インストール

 「root」ユーザ権限で。  「antiX」

apt install -y xfce4-screenshooter xfce4-clipman  sxhkd
 「EndeavourOS」

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

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

apt-get install -y xfce4-screenshooter xfce4-clipman-plugin
 「Slackware」  実は、「Slackware 15.0」インストール時に、デスクトップで「XFCE」を選んだため、最初からインストールされていたのですが、インストールされていない環境にインストールするのであれば

slackpkg install xfce4-screenshooter xfce4-clipman-plugin

3. 自動起動

 「xfce4-clipman」と「sxhkd」の自動起動を設定します。  「sxhkd」をインストールしていない場合は、「xfce4-clipman」の設定のみです。  ログインユーザで。  「antiX」  (「IceWM」の設定で、「xfce4-clipman」は起動していたので、「sxhkd」のみ)

mkdir -pv ~/.config/autostart

sh
cat << 'EOF' >> ~/.config/autostart/sxhkd.desktop
[Desktop Entry]
Type=Application
Name=sxhkd
TryExec=sxhkd
Exec=sxhkd
EOF
exit
 「EndeavourOS」「Fedora」

mkdir -pv ~/.config/autostart

sh
cat << 'EOF' >> ~/.config/autostart/xfce4-clipman.desktop
[Desktop Entry]
Type=Application
Name=xfce4-clipman
TryExec=xfce4-clipman
Exec=xfce4-clipman
EOF
exit
 「FreeBSD」

mkdir -pv ~/.config/autostart

sh
cat << 'EOF' >> ~/.config/autostart/xfce4-clipman.desktop
[Desktop Entry]
Type=Application
Name=xfce4-clipman
TryExec=xfce4-clipman
Exec=/bin/sh -c "/usr/local/bin/xfce4-clipman &"
EOF
exit
 「EndeavourOS」「Fedora」

mkdir -pv ~/.config/autostart

sh
cat << 'EOF' >> ~/.config/autostart/xfce4-clipman.desktop
[Desktop Entry]
Type=Application
Name=xfce4-clipman
TryExec=xfce4-clipman
Exec=xfce4-clipman
EOF
exit
 「Linux Mint」「Slackware」

mkdir -pv ~/.config/autostart
cp /usr/share/applications/xfce4-clipman.desktop ~/.config/autostart/.
vi ~/.config/autostart/xfce4-clipman.desktop

OnlyShowIn=XFCE;GNOME;X-Cinnamon;
 の行を下記へ変更します。  (行番号は、「Fedora」のものです)

OnlyShowIn=XFCE;GNOME;X-Cinnamon;KDE;
 「ALT Linux」

mkdir -pv ~/.config/autostart
cp /usr/share/applications/xfce4-clipman.desktop ~/.config/autostart/.
vi ~/.config/autostart/xfce4-clipman.desktop

Categories=GTK;Utility;TrayIcon;
OnlyShowIn=XFCE;GNOME;X-Cinnamon;
StartupNotify=false
 65行目の末尾へ「KDE;」を追加します。  (行番号・内容はプラットフォームによって異なります)

OnlyShowIn=XFCE;GNOME;X-Cinnamon;KDE;
 「PCLinuxOS」

mkdir -pv ~/.config/autostart

sh
cat << 'EOF' >> ~/.config/autostart/xfce4-clipman.desktop
[Desktop Entry]
Type=Application
Name=xfce4-clipman
TryExec=xfce4-clipman
Exec=/bin/sh -c "/usr/bin/xfce4-clipman &"
EOF
exit

4. 既存のショートカットキーを無効化

 「KDE システム設定」を起動して  「ショートカット」
「KDE」-「KDE システム設定」

 「Spectacle」で「アクティブウィンドウを撮影」の Ctrl+Print をゴミ箱へ入れます。

「KDE」-「Shortcuts - KDE システム設定」

 「デスクトップ全体」を撮影の Print も無効化して、上位の「Spectacle を起動」に Print を割り当てます。
 これで、メニューを表示していても、Print キーで画面全体のキャプチャがとれます。

 「EndeavourOS」「PCLinuxOS」では、カスタムショートカットに、「Spectacle」で全画面、「xfce4-screenshooter」でアクティブウィンドウのキャプチャをとるように設定します。
 全画面キャプチャのコマンドが


spectacle -c -b -n -f
 アクティブウィンドウキャプチャのコマンドが

xfce4-screenshooter -c -w
 です。

5. 新規のショートカットキーを設定

 「antiX」では、これが必要です。  ログインユーザで。  「sxhks」のキー設定

mkdir -pv ~/.config/sxhkd

sh
cat << 'EOF' >> ~/.config/sxhkd/sxhkdrc
ctrl + Print
    xfce4-screenshooter -c -w
EOF
exit
 これで、ログインしなおせば、以下のキーが有効になります。 ・Print 全画面のキャプチャで「Spectacle」が起動 ・Ctrl+Print アクティブウィンドウをキャプチャしてクリップボードへコピー
earthcar(アースカー)
U-NEXT
JETBOY
神戸養蜂場
ハイスピードプラン