February 8, 2020 12:19 PM, "haaber" <haa...@web.de> wrote: >>> Hi, when I press PrintScreen (under xfce), I get several options, among >>> which save-in-dom0. It would be nice to be able to send it directly to a >>> VM. Can this be done? Cheers, Bernhard >> >> I haven't tested it, but try something like this: >> >> #!/bin/bash >> qvm-copy-to-vm $(zenity --entry --title='Send to VM' --text='Destination >> VM') "${BASH_ARGV[@]}" >> >> Save that as an executable script, such as "~/.local/bin/send-to-vm.sh". >> Then, open dom0 file >> manager, right click any png, click open with other application, and under >> "use a custom command" >> enter "send-to-vm.sh %s". Then, when you take a screenshot, instead of >> choosing "save", choose >> "open with..." and see if your script shows up in the list of available >> applications. If not, you >> might have to write a simple .desktop file in ~/.local/share/applications in >> order for it to show >> up as an option. >> >> Again, this is just an idea off the top of my head and totally untested. > > Thank you. Of course I can do a second step after PrintScreen: change to > my dom0 terminal to run qvm-copy-to-vm. That is what I do since ever. My > question is rather how to integrate a new "send-to-VM" function in the > screenshot application so that it is only one step: PrintScreen & select > destination appVM ...
Okay, no offense, but that's pretty much *exactly* what I described. The idea is that from the screenshot menu, instead of clicking save, you click "open with send-to-vm.sh", and then a zenity GUI window will pop up asking you for the destination VM name. If you want a list to select from, change it to something like `qvm-ls | cut zenity --list`. I don't see how it could be any more integrated. If you believe I am mistaken, please point out exactly how my solution differs from what you're trying to achieve. You might also be interested in the Qubes Screenshot Tool instead https://github.com/evadogstar/qvm-screenshot-tool > I guess the PrintScreen "app" is a simple script, > hidden somewhere, as well? I'd like to extend it. Bernhard No, it's a binary. https://git.xfce.org/apps/xfce4-screenshooter The PrintScreen key is mapped to screenshooter by default, but you can map it to something else via System Tools > Keyboard. You can also remap it to "screenshooter --open send-to-vm.sh" to skip the save/open/upload dialog and instead go right to the destination VM dialog. See also https://docs.xfce.org/apps/screenshooter/usage https://askubuntu.com/questions/252738/configure-xfce4-screenshooter-settings https://www.commandlinux.com/man-page/man1/xfce4-screenshooter.1.html -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/80c51b481d80c5de4f4afe2f96ad73fd%40disroot.org.