jbuchermn / newm

Wayland compositor
MIT License
958 stars 31 forks source link

How should custom lock panels be implemented? #154

Open tewkanz opened 1 year ago

tewkanz commented 1 year ago

I'm trying to update my newm configuration to use gtklock as my lock panel. newm doesn't expose the input inhibitor protocol, it just locks the screen itself. It also takes care of displaying the window, so we don't need the layer shell protocol. Both of those things are fine and gtklock's handling for them can be disabled through command line options.

However, when I enter my password and dismiss the lock window, my screen doesn't unlock. Do I need to redirect the password to the org.newm.auth.Request bus?

It does work if I write a little script that starts gtklock, then calls newm-cmd unlock after it exits. I don't love that though because it decouples the authentication from the screen unlock -- we don't really know why gtklock exited.

Basically, how was this intended to be used? :) It doesn't seem unreasonable to require programs to send their credentials through newm. However, I'm not sure how to make that happen without directly modifying the lock screen program.

tewkanz commented 1 year ago

Maybe we could write a pam module that sends credentials to newm's authentication bus that you plug into the lock screen? Getting a bit out of my comfort zone.

jbuchermn commented 1 year ago

Unfortunetaly that's indeed not possible at the moment due to a missing protocol in pywm (see https://github.com/jbuchermn/pywm/issues/18). Once I come around to implementing that, other lock screens should / could work (I suspect there's a little bit more to do, but we will see...)

You could possibly work round org.newm.auth.Request and newm-cmd unlock, but the latter is really only intended for debugging purposes...