Skip to content

Qubes Os Screenshot Tool. Provice functionality to upload screenshots to other AppVMs and to imgurl service

License

Notifications You must be signed in to change notification settings

honzahosek/qvm-screenshot-tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

qvm-screenshot-tool

The qvm-screenshot-tool is a screenshot tool for Qubes OS
This tool provide funcionality to make screenshots at Qubes dom0, edit them and upload it automaticaly to AppVM, to imgurl service thought this AppVm and some other taks. This tool must be places and used only at dom0
No need to upload something to TemplateVM.

Need example? All screenshots on this tutorial done by this tool :)

Changelog

0.9 - version fro Qubes R4.1 based on deepin-screenshot provide new more easy way to draw, anotate on screenshots. No more scrot (it's not supported by new dom0 fedora 32) 0.8 beta - Dom0 full log with all screenshot uploads. Possible to erase this log. Bug fix, before that all screenshots were stored at dom0 by default (thanks @heinrich-ulbricht). Now they removed by default.
0.7 beta - Now Qubes Screenshot Tool support command line arguments. You can setup some keybinding to skip all dailogs and quickly do the same job. e.g. qvm-screenshot-tool.sh --region-only --imgurl --virtualmachine APPNAME 0.6 - Now possible to skip first dialog and make choice from command line: --region-only or --fullscreen 0.5 beta - added option to reopen closed dialog (imgurl upload dialog) again at AppVM. "Kshaphoot" removed if it's not installeted at the Qubes system.
0.4 beta - fixed some minor issues with user "pictures" dir name on dom0. (multilingual)
0.3 beta - fixed some minor issues with user "pictures" dir name on destination VM. (multilingual)
0.2 beta - Now the tool support editing images at dom0. You can aanotane any text to screenshot, crop image, composite, draw the lines and use filters! Read how to do that below.

screenshot png

Known bugs

Don't know

How to use it

You will be asked for actions by GUI prompt.qvm-screenshot-tool support ksnapshot (KDE5 tool) and now at 0.9+ version deepin-screenshot console tool to make screenshots which is not available by default at dom0, but it can by simple installed to it with one command sudo qubes-dom0-update deepin-screenshot zenity
screenshot png

Qubes Team plan to remove KDE5 from Qubes by default, therefore ksnapshot will be also removed. Accordingly, I highly recommend to use it with deepin-screenshot.

How to use the tool with Ksnapshot

  1. You can start ksnapshot first and make your screenshot with it, then start qvm-screenshot-tool or you can start qvm-screenshot-tool and select ksnapshot option at dialog window.
  2. After qvm-screenshot-tool started. It will popup confirmation dialog. Do not close it, if you are NOT ready to do something with your screenshot at ksnapshot! Make screenshot first.
  3. If you are happy with result at ksnapshot preview window. Then click yes on qvm-screenshot-tool dialog.
  4. New dialog will be apiared and then you can choose options to upload screenshot etc. (read more below)

screenshot png

How to use it with deepin-screenshot

All other options on first dialog use scrot tool to make screenshots.

  1. Start tool with ./qvm-screenshot-tool or hotkey which you already setup (see install section)
  2. Choose e.g. region or window
  3. Simple click on window to make screeshot of that window. Drag mouse with left button down to select region of the screen.
  4. Then select actions what you want to do with screenshot. e.g. upload it to imgurl server, only it to AppVM or dom0
  5. You will be prompted. Select destination AppVM. Throught this VM utility will upload screenshot to imgurl server.
  6. Then amazing dialog apear at AppVM window. You will find urls on it. Simple select them with the mouse and Ctrl+Cthem to put to clipboard.
  7. If nautilus mode was selected it will be started with $PATH opened. If xcopy is installeted. Url will be copy to clickboard.

screenshot png

How to use the ImageMagick editon (no longer need from 0.9 version, now deepin-screenshot can annotate and draw on yor images at first stage)

You can edit scrrenshot before upload it to img url or move them to AppVM.

  1. Select edit mode (and upload move if need to also upload)
  2. You will see image on the screen. Click on it to get menu.
  3. Edit the image. if you do something wrong clock "Ctrl-Z" to undo changes.
  4. When you are ready to upload. Go to File -> Save and choose predefined possition
    0000-SAVE-EDITED-SHOT-HERE-TO-PROCESS.png
    to save it to (or we will continue with not edited screenshot)
  5. Just Quit from the editor and tool will continue to move screenshot to AppVM or uploading.

screenshot png

Descriptions of the settings

screenshot png

Exit -- screenshot already stored at ~/Pictures on dom0. If this opion selected tool immediately exit and nothing more
Upload tp AppVM only -- tool will upload the image to selected destination AppVM. You can also select to open it with Nautilus and remove image from dom0
Upload to Imgurl - will do this magic for you, if options above not selected.
Start Nautilus at AppVM -- will start nautilus with opened directory where the image stored
Keep screenshot at dom0 -- will keep the image at dom0. By default its removed (expect Exit goal)

Features

  • Make screenshots with ksnapshot or deepin-screenshot
  • Draw, annotate, select area on screenshot
  • Upload screenshots to AppVM
  • Auto-Start VM if it's not running
  • Upload screenshots to imgurl server and provide urls
  • Copy link to AppVM clipboard
  • Last upload log with imgurl link and deletion link is stored at AppVM: ~/Pictures/imgurl.log
  • Automatic image deletion from dom0 (you can switch it off on dialog)
  • Urls notifications are where from you can copy urls to clipboard
  • NEW! Support command line argumens to skip dialogs and quikly to the same job.

Installation

WARNING! ALWAYS REVIEW ANY CODE THAT YOU UPLOAD TO DOM0 BEFORE DO THAT!

First, you must review the code, before upload it to dom0 ! Always do that if you are uploading code to dom0 from some other source and other way then Qubes Team recommend it !!!

Discussion thread on the qubes maillist about the code:
https://forum.qubes-os.org/t/r4-1-qubes-screenshot-tool/7005 https://groups.google.com/forum/#!topic/qubes-users/dcsRRPf0Fxk

Manual install

First install dependencies:

sudo qubes-dom0-update zenity deepin-screenshot

Then just save qvm-screenshot-tool.sh as a file to any AppVM. Then copy it to dom0 with the following command at dom0 terminal:

qvm-run --pass-io NAMEOFAPPVM 'cat /path/to/qvm-screenshot-tool.sh' > /home/user/Pictures/qvm-screenshot-tool.sh

Then give it execute privilegies at dom0 terminal:

chmod +x /home/user/Pictures/qvm-screenshot-tool.sh

Of course, you can start it for testing purposes from command line:

./qvm-screenshot-tool.sh

It's possible to skip first dialog and make choice from command like with --region-only or --fullscreen :

./qvm-screenshot-tool.sh --region-only
./qvm-screenshot-tool.sh --fullscreen

Now, you are ready to setup it on some hotkey combination. Go to System -> Keyboard settings and bind the script to your favorite shortcut PrintScreen key or to e.g. Ctrl+PrintScreen combination.

Dependencies

Most are probably pre-installed at Qubes OS by default.

sudo qubes-dom0-update zenity deepin-screenshot
  • zenity
  • deepin-screenshot
  • Linux only AppVMs supported
  • curl at Linux AppVM
  • zenity at dom0 and at AppVM.
  • scrot at dom0 (recommended) or ksnapshot
  • ImageMagick (already at dom0 preinstalleted)
  • xclip at AppVM (only need if you want also copy url to clipboard automaticaly att AppVM)

OS support

Qubes OS only. :-)

This will not fully work on Windows AppVMs. Only if Qubes Team will add something like cygwin. But are you really want Windwos support for uploading images to imgurl service?

Also its is almost ready for GNOME !!!

How to contribute

  • Report issues
  • Submit feature request
  • Make a pull request
  • If you like this tool, you can donate Qubes OS developers https://www.qubes-os.org/donate/#bitcoin and maybe send me notification at qubes-users maillist that you are happy with this tool and you do that, because of it :)
  • check privacy tools list for amazing privacy list

About

Qubes Os Screenshot Tool. Provice functionality to upload screenshots to other AppVMs and to imgurl service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%