How do I save a screenshot to save on a Qube?

How do I save a screenshot on a Qube?

Hi everyone.
I know how to take a screenshot.

When I take a screenshot, it’s saved to the clipboard of dom0.

I don’t know how to save the screenshot to the Qube’s image folder. How do I save a screenshot on a Qube?

++++

French translation:

Salut tout le monde.
Je sais faire une capture d’écran mais je ne sais pas comment enregistrer la capture d’écran dans le dossier image d’un Qube.

1 Like

I don’t think that’s possible under the Qubes security model. However, you can move the png file from the Pictures folder in dom0 to the qube using qvm-move-to-vm <qube> filename.

1 Like

I don’t remember where I found this (probably somewhere on this forum), but credit to whoever originally shared it. I’ve been using it and it’s surprisingly handy, even if it’s not perfect.

On dom0 ~/bin/screenshot_VM.sh:

#!/bin/sh
# lets the user take a screenshot based on rectangular selection and sends it to the currently focused VM

CUR_WIN_ID=`xdotool getwindowfocus`
CUR_VM=`xprop _QUBES_VMNAME -id $CUR_WIN_ID | cut -d \" -f 2`

if [[ "$CUR_VM" != "_QUBES_VMNAME:  not found." ]]; then
	xfce4-screenshooter -r -o "qvm-copy-to-vm $CUR_VM"
	notify-send "Screenshot sent!" "Your selection has been sent as a screenshot to $CUR_VM!"
fi

Then just bind it to the Print Screen key in xfce4-keyboard-settings, or whichever key you prefer.

2 Likes

Works perfectly! Also necessary to make the script executable in dom0:

sudo chmod +x /bin/screenshot_VM.sh

The keybindings are found in the Qubes menu > System Settings > Keyboard > Application Shortcuts.

Quick Quality-of-Life Improvements (at the very end)

2 Likes

I’ve had good results with

1 Like

In English:
Hi everyone. I figured out how to take a screenshot in the “Default dvm” Qube, which has the advantage of having an internet connection. Here’s the tutorial:

  1. Click on “Open Qubes Application Menu”.
  2. Click on the “default-dvm” Qube.
  3. Click on Settings.
  4. In the “Search for application” field, type “screenshot”.
    In “All available applications”, click on “Screenshot”. Click the “Add selected” button to add the “Screenshot” application to the “Application shown in App Menu”.
    Then click the “OK” button.
    Repeat the same steps with the following applications:
  • Clipboard Manager.
  • Thunar File Manager.
    See the images.

En français / in french:
Salut tout le monde. J’ai trouvé comment faire une capture d’écran dans le "qube “Default dvm” qui a l’avantage d’avoir une connection internet. Voici tutoriel:

  1. Cliquez sur “Open Qubes Application Menu”.
  2. Cliquez sur le qube “default-dvm”
  3. Cliquez sur Settings
  4. Dans la zone de saisie “Search for application”, tapez en anglais “screenshot” qui se traduit par “capture d’écran” en français.
    Dans la “All available applications”, puis cliquez sur “Screenshot”. Cliquez sur le bouton “Add selected” pour ajouté l’application “Screenshot” dans la zone “Application shown in App Menu”.
    Ensuite cliquez sur le bouton “OK”.
    Répétez les même actions avec les applications:
    -Clipboard Manager (Gestionnaire du presse papier en français).
    -Thunar File Manager (Gestionnaire de fichier en français).
    Regardez les images.

You can’t directly save a dom0 screenshot into a Qube’s folder. First save the screenshot in dom0, then copy it to the target Qube.

A simple way is:

  1. Save the screenshot in dom0.
  2. Use qvm-copy-to-vm to send it to the Qube:
qvm-copy-to-vm your-qube-name screenshot.png

Then open that Qube and check the copied file, usually in:

~/QubesIncoming/dom0/

From there, you can move it to the Pictures/Image folder inside the Qube.

I found the solution!

Language: French

For English speakers, use your internet browser’s translation function.


French:

J’ai trouvé la solution!

Langue: Français

Pour les anglophones, utilisez la fonction traduction de votre “internet browser”.

Greeting!