|
Post by snugbug on Mar 17, 2022 17:32:35 GMT
I want to be able to make screenshots automatically, just by pressing the Print key, without any dialog, but the ordinary screenshot tool of Bodhi doesn't allow for preselection of a screen or window without any dialog on my dual screen system.
That's why I unloaded the ordinary screenshot tool, installed xfce4-screenshooter and created this .sh script (I did the same on an MX Linux and is is working great there):
#!/bin/bash xfce4-screenshooter --window --save ~/Pictures/Screenshots/screenshot_$(date +D%Y.%m.%d-T%H.%M.%S).png Then I created a personal launcher with the Settings console, in the tab personal launcher, looking like this and made it executable:
[Desktop Entry] GenericName[de_DE]=Screenshots-without-Dialog Hidden=false Exec=/home/user/Scripts/Screenshots-without-Dialog.sh Icon=applets-screenshooter Name[de_DE]=Screenshots-without-Dialog Type=Application NoDisplay=false Version=1.0 MimeType=Application; StartupNotify=false Comment=Screenshots-without-Dialog DBusActivatable=false Categories=Utilities; Terminal=false Name=Screenshots-without-Dialog GenericName=Screenshots-without-Dialog Icon[de_DE]=applets-screenshooter Comment[de_DE]=Screenshots-owithout-Dialog
The resulting desktop file is called Screenshots_without_Dialog.desktop with underscores instead of hyphens. These underscores were created automatically, and inside composing window of the personal applications launcher, I coudln't edit them into hyphens.
When I start
/home/user/Scripts/Screenshots-without-Dialog.sh
in the terminal, a screenshot is added into the target folder just as intended. But in the keyboard settings, where the shortcuts can be edited, when I try to associate that personal app launcher to the Print key, and press that key, I get this error message: Moksha couldn't execute this application:
/home/user/Scripts/Screenshots-without-Dialog.sh
Start of application failed. i also tried to associate the Print key to: /home/user/.local/share/applications/Screenshots-without-Dialog.desktop
So, i guess the script, and the launcher are working but the association to the Print key is wrong. Where did I go wrong, please?
Note: I'm running Bodhi 6.0 AppPack 64 bit.
|
|
|
Post by thewaiter on Mar 17, 2022 18:27:19 GMT
OK, it will be me again with the answer Firstly, what is wrong with native screenshot tool? Is one extra mouse click or pressing Enter so annoying? I added that dialog with a possibility to have a delayed screenshot which is pretty useful for taking menus. But OK, your decision. Secondly, you complicate things a lot. Why did you create a personal launcher? No need. Why did you make a desktop file executable? No need... BUT, did you make the sh file executable? It is very important! I also hope you created ~/Pictures/Screenshots directory. Anyway, this is the working solution. Only what you need is executable Screenshots-without-Dialog.sh bash file defined in key bindings settings this way: i.imgur.com/D54d6qR.jpgIn case of troubles, restart moksha with CTRL ALT END EDIT: I can recommend a flameshot application as advanced screenshot tool
|
|
|
Post by bumpysoul on Mar 17, 2022 19:11:16 GMT
I unloaded it for a different reason. It allways caused wine to update or some such and saved to desktop in wine.Dont remember particulars but not having screenshots is no big deal to me.The rest of bodhi simply kicks ass though.
|
|
|
Post by snugbug on Mar 17, 2022 19:57:37 GMT
@ thewaiter Wow, thank you once more. I've got no idea what went through my mind, when I did the personal launcher and the desktop file. I've done it like you said, and... wow again, so easy, absolutely "piece of cake" and is working perfectly.
Referring to why I was looking for a way to avoid any dialog, this is quite handy, if for instance you are watching some video content in fullscreen mode and want a group of screenshots within a few seconds, maybe to hit a particular moment of a scene, as best as possible.
|
|
|
Post by thewaiter on Mar 17, 2022 20:06:17 GMT
OK then. Linux world is a room of freedom of choice
|
|
|
Post by thewaiter on Mar 17, 2022 20:26:59 GMT
I can not reconcile with the fact there is not an option in Moksha to do what you want. Of course it is. Open the screenshot module settings and set the settings this way: i.imgur.com/bCShL8Y.jpgTurn off all checkboxes and put the zero time value in slider. Now you have all you need without installing extra bunch of apps Stefan
|
|
|
Post by snugbug on Mar 17, 2022 22:33:22 GMT
Could it be, you forgot about the dual screen? Setting it your way the tool cannot tell one screen from the other one. Anyway, the best way is this one, you posted before.
I even found an improvement, by adding %3N to the line
xfce4-screenshooter --window --save ~/Pictures/Screenshots/screenshot_$(date +D%Y.%m.%d-T%H.%M.%S).png
So, now it says: xfce4-screenshooter --window --save ~/Pictures/Screenshots/screenshot_$(date +D%Y.%m.%d-T%H.%M.%S.%3N).png
Now I can make a thousand screenshots within a second, well, if I'm fast enough hitting the Print key.
|
|