Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnome 41 support #158

Closed
plumlis opened this issue Sep 23, 2021 · 21 comments
Closed

Gnome 41 support #158

plumlis opened this issue Sep 23, 2021 · 21 comments

Comments

@plumlis
Copy link

plumlis commented Sep 23, 2021

It seems haven‘t gnome 41 ready yet?

@plumlis
Copy link
Author

plumlis commented Sep 28, 2021

-- Journal begins at Mon 2021-05-10 13:40:14 CST. --
9月 28 11:54:19 plum-laptop gnome-shell[4977]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
9月 28 11:54:19 plum-laptop gnome-shell[4977]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
9月 28 11:57:43 plum-laptop gnome-shell[4977]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
9月 28 11:57:55 plum-laptop gnome-shell[4977]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
9月 28 11:57:55 plum-laptop gnome-shell[4977]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
9月 28 11:58:56 plum-laptop gnome-shell[4977]: Timelines with detached actors are not supported
9月 28 11:59:04 plum-laptop gnome-shell[4977]: JS ERROR: Error: cmd: gjs /home/plum/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js --filename /tmp/gnome-shell-screenshot-0B2DA1.png --area 1048,161,378,262 exitCode=256
spawnAsync/</<@/home/plum/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/extension.js:469:30
9月 28 11:59:17 plum-laptop gnome-shell[4977]: Timelines with detached actors are not supported
9月 28 11:59:17 plum-laptop gnome-shell[4977]: Timelines with detached actors are not supported
9月 28 12:00:56 plum-laptop gnome-shell[4977]: JS ERROR: Error: cmd: gjs /home/plum/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/auxhelper.js --filename /tmp/gnome-shell-screenshot-W9ZVA1.png --area 424,640,527,236 exitCode=256
spawnAsync/</<@/home/plum/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de/extension.js:469:30

@saboya
Copy link
Contributor

saboya commented Oct 16, 2021

In their infinite wisdom the Gnome team decided to just break userspace abruptly:

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

Essentially this extension has to be reimplemented using org.freedesktop.portal.Screenshot, but unclear if it can have feature parity with the existing functionality.

The alternative is using unsafe mode, which you can do by using this:

https://extensions.gnome.org/extension/4517/unsafe-mode/

@OttoAllmendinger
Copy link
Owner

Thanks for the heads up. Looks like it won't be an easy change.

@ramottamado
Copy link

In their infinite wisdom the Gnome team decided to just break userspace abruptly:

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

Essentially this extension has to be reimplemented using org.freedesktop.portal.Screenshot, but unclear if it can have feature parity with the existing functionality.

The alternative is using unsafe mode, which you can do by using this:

https://extensions.gnome.org/extension/4517/unsafe-mode/

Hello, I'm the author of said extension. Basically, that extension works by enabling unsafe_mode from Mutter global context (which you can always do from LG or from your own extension, just see the source code itself).

The problem is this mode is (surprise!) unsafe for end users, since this enable arbitrary code executions (just like ol' GNOME 3 days) by abusing Eval() dbus method.

Since security is a big issue, and nobody wants some rogue apps, scripts or extensions running malicious codes on their machine because an extension just open up the possibility to, I've since inactivated the extension, but you can still install the extension from the source code.

So you can either:

  1. Enable unsafe_mode from your extension (which is not advised, and potentially a security breach)
  2. Register your DBus caller as n allowed caller on the Shell side from your extension
  3. Re-implement the caller

@stefangweichinger
Copy link

Is there a usable workaround for Gnome 41 now, or not? I just upgraded to Fedora 35 beta and find myself without this very useful extension ;-) thanks for any info on that

@saboya
Copy link
Contributor

saboya commented Oct 21, 2021

@stefangweichinger Since you're using Fedora 35, you might as well use this:

https://copr.fedorainfracloud.org/coprs/yalter/gnome-shell-screenshot-ui/

It has a new "native" screenshot ui that will probably be enough for most people. I'm using that for now.

@stefangweichinger
Copy link

@saboya thanks. "Everybody else should avoid this repo." sound good ;-)

@rduivenvoorde
Copy link

Mmm, really miss this extension.

I had a look now at the 'Default Gnome Screenshot tool', and was actually rather positive about it's capabilities:

Screenshot

Only thing I miss is your nice 'menu' item...

So I wonder (and that would be my question) if it would be doable to 'merge' your menu with the workings of the screenshot tool?
OR is this actually already what you did?
OR would it be more appropriate to make this a feature request in the Screenshot Tool repo: "plz make it possible to (optionally) add a menu to the topbar"

@OttoAllmendinger
Copy link
Owner

for those who can't wait any longer, I pushed this branch here https://github.com/OttoAllmendinger/gnome-shell-screenshot/tree/gnome41-unsafe-mode

@moore-bryan
Copy link

Sorry, @OttoAllmendinger, the above "unsafe" fix doesn't work for me; i.e., same Error exit code=256 issue on my Fedora 35 install.

@BlackDex
Copy link

@moore-bryan that is because there is an error in the code. In his hast @OttoAllmendinger forgot to add , after the "40" versions while adding "41".

I applied these changes manually within my ~/.local/share/gnome-shell/extensions/gnome-shell-screenshot@ttll.de directory to the same files. And at line 1289 of the extension.js i add the following:

global.context.unsafe_mode = true;

Reloaded Gnome-Shell and now it is working like a charm again.

@rduivenvoorde
Copy link

@BlackDex are you sure about the comma? It is already an array?

I checked out the gnome41-unsafe-mode and did the install as written in readme and extension is working here (Debian testing). No comma needed, both with (an optional) and without it works.

Only change I see is the 'broken lock' icon, probably because it is 'unsafe'?

Screenshot-20211111183720-267x66

@BlackDex
Copy link

@rduivenvoorde , normally javascript array's need a , to separate the array elements.
But, i'm not sure regarding gnome-shell actually, could be different.

Could be that it is causing issues now, but maybe no critical items. Also since the metadata just has one element, which is no issue there.

@moore-bryan
Copy link

moore-bryan commented Nov 11, 2021

Well, the comma is irrelevant for me because I'd already adjusted the metadata.json file to include the correct version and adding the code at line 1289 breaks everything; that is, without it, the icon will load but I can't screenshot and with it the extension cannot be enabled at all.

@jmrodri
Copy link

jmrodri commented Nov 13, 2021

Is there a usable workaround for Gnome 41 now, or not? I just upgraded to Fedora 35 beta and find myself without this very useful extension ;-) thanks for any info on that

I'm having the same problem now. I should've known this is my most used extension.

@lvanderree
Copy link

@BlackDex are you sure about the comma? It is already an array?

I checked out the gnome41-unsafe-mode and did the install as written in readme and extension is working here (Debian testing). No comma needed, both with (an optional) and without it works.

Only change I see is the 'broken lock' icon, probably because it is 'unsafe'?

Screenshot-20211111183720-267x66

That is correct. I was also wondering what this icon was...
https://discourse.gnome.org/t/what-does-the-lock-icon-mean/8040

@lvanderree
Copy link

My workaround is to have the PrtSc-key bounded to the gnome-screenshot-tool. Which sort of works OK,
but I would rather still use this extension.

@fhuberts
Copy link

I'm on Fedora 35, and it has these shortcuts:
image

I think switching to the new shortcuts is doable, I'm going to try :-)

@somepaulo
Copy link

I think switching to the new shortcuts is doable, I'm going to try :-)

The trouble of memorizing all those shortcuts, especially when you only need screenshots once in a while, was most people's reason for using this extension (imho). No need to remember, just use the convenient menu.

@OttoAllmendinger
Copy link
Owner

portal support: #168

@OttoAllmendinger OttoAllmendinger changed the title Gnome 41 support? Gnome 41 support Nov 28, 2021
@OttoAllmendinger
Copy link
Owner

Version with Gnome 41 support is now active in the store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests