Open TheKamboy opened 2 months ago
Also, putting XDG_DESKTOP_PORTAL=cosmic
in /etc/enviroment
doesn't work.
Same result on Fedora Silverblue.
Something I find odd is that if I use Cosmic Screenshot with a different wayland based enviroment (ex. Hyprland) it works.
for me cosmic-screenshot on cosmic desktop works. it looses focus sometimes so one cannot click the capture button.
what i find weird that gnome screenshot does not work with cosmic desktop.
Same here, unable to launch it.
Same Issue on fedora 40 arm64
me too. While I have seen a panic previously, mine just hangs now with no interface.
@TheKamboy To clarify, cosmic-screenshot
works on Hyprland and other DEs/WMs because this program simply calls into an interface that's implemented across different desktop environments.
@drazil100 Hi again!! Your original issue had an interesting bit of information that I'll copy here for anyone attempting this issue.
$ cosmic-screenshot
thread 'main' panicked at src/main.rs:69:10:
failed to send screenshot request: Zbus(MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.DBus.Error.UnknownMethod")))), Some("No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.58"))), reply-serial: 17, body: Signature("s") }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It seems like the screenshot interface isn't being exposed or doesn't exist for some reason.
For those of you experiencing this issue, can you try getting some logs? Try:
journalctl --user -ef
And then look for logs related to xdg-desktop-portal-cosmic
or maybe even the compositor.
Interestingly, #56 is experiencing the same problem but on Pop so it doesn't seem to be directly related to Arch or other distros.
I noticed I have issues when I try to use it when I launch with start-cosmic but not always. When I log in through cosmic-greeter it works though.
Edit: I worded that so poorly... Fixed
I can't reproduce this yet. :sob: I may need log excerpts from some of you.
I'll likely spin up an Arch VM since it seems more reproducible there.
austin@msi:~$ RUST_BACKTRACE=1 cosmic-screenshot
thread 'main' panicked at src/main.rs:69:10:
failed to send screenshot request: Zbus(MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.DBus.Error.UnknownMethod")))), Some("No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.8"))), reply-serial: 17, body: Signature("s") }))
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
austin@msi:~$ RUST_BACKTRACE=full cosmic-screenshot
thread 'main' panicked at src/main.rs:69:10:
failed to send screenshot request: Zbus(MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.DBus.Error.UnknownMethod")))), Some("No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.8"))), reply-serial: 17, body: Signature("s") }))
stack backtrace:
0: 0x556bb54c0645 - <unknown>
1: 0x556bb54e81ab - <unknown>
2: 0x556bb54bcd4f - <unknown>
3: 0x556bb54c041e - <unknown>
4: 0x556bb54c17b9 - <unknown>
5: 0x556bb54c155a - <unknown>
6: 0x556bb54c1cc3 - <unknown>
7: 0x556bb54c1ba4 - <unknown>
8: 0x556bb54c0b09 - <unknown>
9: 0x556bb54c18d7 - <unknown>
10: 0x556bb54e6673 - <unknown>
11: 0x556bb54e6b66 - <unknown>
12: 0x556bb5231a17 - <unknown>
13: 0x556bb531e850 - <unknown>
14: 0x556bb52f01f1 - <unknown>
15: 0x556bb52cfbfc - <unknown>
16: 0x556bb52dc438 - <unknown>
17: 0x556bb52fb513 - <unknown>
18: 0x556bb52c99a9 - <unknown>
19: 0x556bb54b7b8d - <unknown>
20: 0x556bb52dc505 - <unknown>
21: 0x7fa1fb37ee08 - <unknown>
22: 0x7fa1fb37eecc - __libc_start_main
23: 0x556bb520d435 - <unknown>
24: 0x0 - <unknown>
I haven't commented in a while since I had moved on from using cosmic (for now) but it seems like cosmic screenshot doesn't work with certain distributions of Arch Linux. I recently switched to Arch Craft, and cosmic screenshot works in cosmic there. I'm not sure if I should rename the issue to something like Cosmic Screenshot panics in certain Arch Distributions, or something else.
For me it seems like it's intermittent on manjaro. It definitely wasn't working when I was using start-cosmic as opposed to cosmic-greeter, but now that I'm on cosmic-greeter it usually works. It depends on the day though. I have to reboot to fix it. Idk what's causing it.
I got it! I figured out a reproduction case that works on the Pop!_OS 24.04 alpha!
cage alacritty
)cosmic-screenshot will panic any time you try to run it until you reboot.
I assume this is some sort of weird race condition where if something manages to insert itself inbetween boot and logging into cosmic cosmic-screenshot can't hook in properly. This would explain why there haven't really been reports of issues with it in the Pop alpha. My guess is that some session managers actually interfere with cosmic-screenshot.
It appears from what I can tell that cosmic-screenshot is highly sensitive to how you log into cosmic and what runs before logging into cosmic. Once you are in and cosmic-screenshot runs once it will continue working for the remainder of the session, but if it doesn't run it will continue not to run for the remainder of the session.
Just experienced this issue on archlinux. It only shows up when starting cosmic from the tty with cosmic-session. When using cosmic-comp, cosmic-greeter or any other display manager to log in it initializes correctly and does not panic.
Thought I would make a new issue here since commenting under an inactive one doesn't do anything.
Log: