I'm using the most recent version of Lubuntu based on Ubuntu 18.04.1 LTS

I read this October 2017 discussion on the topic Change the location of saved screenshot when screenshot taken by printscreen button so in trying to emulate Pomsky's answer, I installed dconfEditor (I assume this comes with standard Ubuntu, I had to install it via Synaptic Package Manager since I don't think it came with Lubuntu) however I reached a snag.

I navigated to org / gnome but there was no gnome-screenshot there to open to find auto-save-directory. Does anyone know how to find this in Lubuntu? I figure the directory must be set up differently.

I had also tried this command in the Terminal:

  • gsettings set org.gnome.gnome-screenshot auto-save-directory 'file:///home/USERNAME/DESIREDFOLDER'

But it returned this error:

  • No such schema “org.gnome.gnome-screenshot”

The way it works now is if I press PrintScreen it generates an image inside the Home/USERNAME directory. I'd like to dedicate a folder specifically to it though, so that I don't get mixed up and risk moving/deleting important Home folders while moving/deleting these screenshots. I made such a folder but have not been able to get the pictures to appear there.

I can start a separate question for it, but if anyone knows how I can emulate left mouse clicks and right mouse clicks w/ keyboard keys (like mousekeys, preferably using number pad's 5 like I was used to) that would be great. My right button in particular is stuck and doesn't work and the key to the left of the rightmost CTRL doesn't always work the same way.

  • Please avoid clubbing issues in one question! – DK Bose Sep 22 '18 at 16:06

Lubuntu 18.04 uses scrot, not gnome-screenshot, as its default.

If you haven't added gnome-screenshot yourself, apt policy scrot and apt policy gnome-screenshot will make things clear.

Use something like:

scrot -u /path/to/desired/folder/"$(date +%Y%m%d%H%M%S)".png for an immediate screenshot of the active window


scrot -d10 /path/to/desired/folder/"$(date +%Y%m%d%H%M%S)".png for a screenshot with a delay of 10s of the fullscreen; this option is useful for capturing drop-down menus


scrot -s /path/to/desired/folder/"$(date +%Y%m%d%H%M%S)".png for selecting an area of the screen to be captured.

$(date +%Y%m%d%H%M%S)".png is the filename I use to "timestamp" the screenshots and to save in .png format.

Read man scrot for more on scrot and man date for naming files with timestamps.

In case you want to use keyboard shortcuts to launch the commands given above ...

Open PcManFM, the default file manager in Lubuntu.

Press Ctrl+H to enable viewing of hidden files and folders.

Open the .config folder and then, within that, the openbox folder. In the openbox folder, you'll see lubuntu-rc.xml. Make a backup of this file somewhere convenient and rename it to ORIGINAL-lubuntu-rc.xml. This is important in case bad things happen.

Open the lubuntu-rc.xml file which is in ~/.config/openbox using Leafpad. Don't double-click on it. It will cause the file to open in a web browser which isn't what we want. Scroll down till you see the following content:

      Take a screenshot of the current window with scrot when Alt+Print are pressed 
  <keybind key="Print">
    <action name="Execute">
      <command>lxsession-default screenshot</command>
  <keybind key="A-Print">
    <action name="Execute">
      <command>lxsession-default screenshot window</command>

Very, very carefully, replace that entire content with:

<keybind key="Print">        # Immediate scrot of active window
  <action name="Execute"><command>sh -c 'scrot -u /home/VistaRefugee/Pictures/"$(date +%Y%m%d%H%M%S)".png'</command></action>
<keybind key="W-Print">        # Delayed scrot of full screen
  <action name="Execute"><command>sh -c 'scrot -d10 /home/VistaRefugee/Pictures/"$(date +%Y%m%d%H%M%S)".png'</command></action>
<keybind key="S-Print">        # Interactive scrot
  <action name="Execute"><command>sh -c 'scrot -s /home/VistaRefugee/Pictures/"$(date +%Y%m%d%H%M%S)".png'</command></action>

Change VistaRefugee/Pictures to whatever you desire.

Save lubuntu-rc.xml.

Open lxterminal and run openbox --reconfigure. You should get back the terminal prompt. The purpose of openbox --reconfigure is to make the system aware of the changes you made. It also parses the content to ensure there aren't any syntax errors. If anything else happens, restore lubuntu-rc.xml from your back-up and give up or try again carefully.

Note that what goes into lubuntu-rc.xml is different than what you can run from a terminal because of how Openbox deals with certain characters.

Now, you can use

  • Print to capture the entire screen.

  • Shift+Print to capture a selected area of the screen

  • W+Print to capture the entire screen after a delay of 10s. Note that W is shorthand in openbox lingo for the Super key.

If you're planning to stay with Lubuntu 18.04 for a while, you may want to know more about Openbox, keeping in mind that lubuntu-rc.xml is just Lubuntu's name for what is also known as lxde-rc.xml or rc.xml in systems other than Lubuntu or where Openbox isn't used in the LXDE environment:

  • Can you explain why i should replace the default screenshot behavior with a full scrot command instead of configuring the lxsession defaults to invoke scrot correctly? I mean, for me at least, it's already invoking scrot, although looking at my desktop.conf file I can't see how it assembles the command. – Michael Jun 24 '19 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.