The One with the Thoughts of Frans

Alt + Print screen in Xfce

Perhaps it’s merely a fluke of Debian Xfce, but the Print screen key does nothing by default. If you just want to use Print screen that’s easy to rectify through Settings > Keyboard > Application Shortcuts > Add. Use the command xfce4-screenshooter -f or -w for respectively full screen and window. As it turns out that interface doesn’t support the key combination of Alt + Print screen thanks to some kernel feature. The suggestion is to disable the kernel feature, but interestingly enough it works when you add the shortcut manually. Remember how we regained control of Ctrl + F1F12? Once again, edit ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml. Look for the custom section, which should look a little something like this:

    <property name="custom" type="empty">
      <property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
      <property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xflock4"/>
      <property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/>
      <property name="&lt;Alt&gt;F2" type="string" value="xfrun4"/>
      <property name="override" type="bool" value="true"/>
      <property name="&lt;Super&gt;p" type="string" value="xfce4-display-settings --minimal"/>
    </property>

Next, we add in our custom setting:

      <property name="&lt;Alt&gt;Print" type="string" value="xfce4-screenshooter -w"/>

Now it should look like this.

    <property name="custom" type="empty">
      <property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
      <property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xflock4"/>
      <property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/>
      <property name="&lt;Alt&gt;F2" type="string" value="xfrun4"/>
      <property name="override" type="bool" value="true"/>
      <property name="&lt;Super&gt;p" type="string" value="xfce4-display-settings --minimal"/>
      <property name="&lt;Alt&gt;Print" type="string" value="xfce4-screenshooter -w"/>
    </property>

You’re going to have to log out and log in again (or restart) for the changes to take effect. I have to admit it’s probably more useful to bind Print screen to take window screenshots by default, but on the other hand it might be a good idea to stick to the global standard so you can still use desktop environments other than your own without feeling hampered.

Leave a Comment

You must be logged in to post a comment.