dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] Unknown subject to take screenshot from

Open JohRest opened this issue 5 months ago • 10 comments

Describe the bug

when taking screenshot in ml4w I keep getting "unknown subject to take screenshot from" regardless what option I choose

Steps to reproduce

SUPER + PRINT, options is not relevant (choose any). Then the result is a notfication window reading "Unknown subject to take screenshot from"

Expected behavior

Normally copied screenshot (either in clipboard or file)

Screenshots

No response

Distribution

Arch Linux

If Other, specify

No response

Additional context

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

JohRest avatar Jun 30 '26 14:06 JohRest

#1680 should fix this issue, but it is awaiting @mylinuxforwork 's review. If you need a solution immediately, you can take the clean-install-grimblast.sh script from the PR and run that locally (it will delete any local instance of grimblast, download the latest version from source, then build/install it).

hurlbutt avatar Jul 01 '26 21:07 hurlbutt

Just merged it into the Rolling Release. Please test and share your feedback.

mylinuxforwork avatar Jul 06 '26 11:07 mylinuxforwork

I have just updated to 2.14.1 (rolling release). Whenever I choose things such as Screenshot > Immediate > Capture Selection -> Copy it is still the same error. Will try #1680 later.

LE: I can confirm that running the script from #1680 solves the problem.

razvancioarga avatar Jul 07 '26 06:07 razvancioarga

@mylinuxforwork - When do setup/post-opensuse.sh and setup/post-fedora.sh get called when upgrading either via a stable release or a rolling release?

@razvancioarga - Are you using either openSUSE or Fedora? If not, what distro are you using?

hurlbutt avatar Jul 07 '26 15:07 hurlbutt

@hurlbutt I am using Arch. I have manually copied and executed the script from #1680 .

razvancioarga avatar Jul 07 '26 15:07 razvancioarga

@razvancioarga - Understood. For Arch, grimblast-git is listed as an Arch dependency that should be installed (and hopefully updated) via paru or yay.

If you were to run pacman -Q grimblast in a terminal, what is the output on your machine?

hurlbutt avatar Jul 07 '26 16:07 hurlbutt

Does anyone know an alternative for grimblast for screenshots? That works on multiple linux distributions?

mylinuxforwork avatar Jul 07 '26 18:07 mylinuxforwork

The only other one I've heard is Hyprshot, but a) it's no different from grimblast and b) isn't officially in the Fedora repo (requires enabling solopasha/hyprland).

hurlbutt avatar Jul 07 '26 18:07 hurlbutt

Also looking over Hyprshot it only supports png (vs. grimblast which has jpg support)

hurlbutt avatar Jul 07 '26 18:07 hurlbutt

I had to patch screenshot.sh to comply with the new behaviour of grimblast

diff --git a/screenshot.sh b/screenshot.sh
index b3f2231..cad8949 100644
--- a/screenshot.sh
+++ b/screenshot.sh
@@ -26,7 +26,9 @@ fi
 eval screenshot_folder="$SAVE_DIR"
 eval NAME="$SAVE_FILENAME"

-# Get image format
+# Grimblast r127 decides the output format from the file extension
+# (it no longer supports the --filetype flag the older script used).
+# For copy/copysave, grimblast pipes PNG to the clipboard regardless.
 image_format="png"
 extension="${NAME##*.}"

@@ -257,7 +259,7 @@ timer() {
 # take shots
 takescreenshot() {
     sleep 1
-    grimblast --notify "$option_chosen" --filetype "$image_format" "$option_type_screenshot" $NAME
+    grimblast --notify "$option_chosen" "$option_type_screenshot" $NAME
     if [ -f $HOME/$NAME ]; then
         if [ -d $screenshot_folder ]; then
             mv $HOME/$NAME $screenshot_folder/
@@ -269,7 +271,7 @@ takescreenshot_timer() {
     sleep 1
     timer
     sleep 1
-    grimblast --notify "$option_chosen" --filetype "$image_format" "$option_type_screenshot" $NAME
+    grimblast --notify "$option_chosen" "$option_type_screenshot" $NAME
     if [ -f $HOME/$NAME ]; then
         if [ -d $screenshot_folder ]; then
             mv $HOME/$NAME $screenshot_folder/

y0uCeF avatar Sep 06 '26 14:09 y0uCeF