SUMMARY I have this orange-background error "Could not take a screenshot". I've used previously the firejail firecfg command, but has since then restored using `firecfg --clean` and rebooted so that now there is no AppArmor profile loaded. It might not be connected to this... STEPS TO REPRODUCE 1. Press PrtScrn button OBSERVED RESULT "Could not take a screenshot" EXPECTED RESULT Screenshot SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.24.2 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.3 Kernel Version: 5.16.12-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz Memory: 7,6 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620
FWIW launching from terminal gives Screenshot request failed: "The process is not authorized to take a screenshot" qt.qpa.wayland: Wayland does not support QWindow::requestActivate() QPixmap::scaled: Pixmap is a null pixmap
So you're running Spectacle in Firejail or something? If so that might cause it. There is special code in Spectacle and KWin to communicate with one another, but only if the Spectacle binary can be correctly identified. It's quit possible that the sandboxing method you're using is interfering with that. Does it work if you stop sandboxing it with Firejail?
That's the issue, I don't see it being sandboxed. I launch it from the terminal with ./spectacle from the /usr/bin folder. spectacle file there is an executable, not some link or shell script. Also in the System activity, I don't see it launched with some options. I don't think it is sandboxed, I removed the AppArmor profile from firejail and it is neither loaded nor active. AFAIK AppArmor profile and changing of executables with links to firejail executable is how it works. I've disabled this and still I have this issue. Is there some way (say a log...) I could diagnose what's blocking it?
I've opened this discussion about FireJail: https://github.com/netblue30/firejail/discussions/5063
Removing the .desktop file that was converted by Firejail fixed it! Strange as I was not using the .desktop but was launching directly using the terminal, I think the command inside the .desktop file should not have been executed...
I had a feeling it was going to be something like that. :)