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

Cosmic screenshot does not work when having PAM enabled. #68

Open
MartianInGreen opened this issue Oct 24, 2024 · 6 comments
Open

Cosmic screenshot does not work when having PAM enabled. #68

MartianInGreen opened this issue Oct 24, 2024 · 6 comments

Comments

@MartianInGreen
Copy link

MartianInGreen commented Oct 24, 2024

When using cosmic screenshot on a system with PAM (and fprintd) enabled the program always crashes with:

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.48"))), reply-serial: 17, body: Signature("s") }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is regardless of the actual login method used for first login, so happens both when login in with a fingerprint and password as long as the option to login with a fingerprint is enabled (but failed).

@eduardz1
Copy link

I seem to have a similar problem

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.77"))), reply-serial: 17, body: Signature("s") }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It might be related due to having modified the /etc/greetd/cosmic-greeter.toml file to enable automatic login at boot:

[terminal]
vt = "1"

[general]
service = "cosmic-greeter"

[default_session]
command = "cosmic-comp systemd-cat -t cosmic-greeter cosmic-greeter"
user = "cosmic-greeter"

[initial_session]
command = "cosmic-session"
user = "eduard"

@MartianInGreen
Copy link
Author

Ah yeah that's a good idea, here is my /etc/pam.d/cosmic-greeter

# Account management.
account required /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_unix.so # unix (order 10900)

# Authentication management.
auth sufficient /nix/store/znz29vh4d4a3vswpzkh4v7izz28g18m6-fprintd-1.94.3/lib/security/pam_fprintd.so # fprintd (order 11400)
auth sufficient /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_unix.so likeauth try_first_pass # unix (order 11600)
auth required /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_deny.so # deny (order 12400)

# Password management.
password sufficient /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_unix.so nullok yescrypt # unix (order 10200)

# Session management.
session required /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
session required /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_unix.so # unix (order 10200)
session required /nix/store/m5mhqggiq2pgq0q92pw8lwzilk08kary-linux-pam-1.6.1/lib/security/pam_limits.so conf=/nix/store/d5jz0d6fnf0v2gz6hzhy290lsmk1ggcj-limits.conf # limits (order 12200)

@MartianInGreen
Copy link
Author

This is actually really annoying because Cosmic also doesn't support wlr screencopy so rn there is just absolutely no way for me to take screenshots...

@MartianInGreen
Copy link
Author

I don't actually think this is a cosmic-screenshot issue but rather a cosmic-comp issue since apparently the org.freedesktop.portal.Screenshot portal just doesn't exist.

@eduardz1
Copy link

eduardz1 commented Oct 26, 2024

Yeah other screenshot app also fail. Btw in my case it's sufficient to just log in and out to fix this behaviour

@MartianInGreen
Copy link
Author

Sadly that doesn't work for me since I just log in the same way with a finger print and it just fails the same way. Had to disable fingerprint for now :/

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

2 participants