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

screen lock (slock) does not lock database #4712

Closed
dkwo opened this issue May 7, 2020 · 9 comments
Closed

screen lock (slock) does not lock database #4712

dkwo opened this issue May 7, 2020 · 9 comments

Comments

@dkwo
Copy link

dkwo commented May 7, 2020

I use suckless slock to lock my screen:

  1. if I suspend and lock, then the database is correctly locked.
  2. if instead I just lock screen with slock (e.g. when laptop is docked), then database is not locked.

Is it possible to correct this behavior?

Desktop Env: dwm
Windowing System: X11
KeePassXC - Version 2.5.4
Revision: dcca5aa

Qt 5.14.2
Debugging mode is disabled.

Operating system: Arch Linux
CPU architecture: x86_64
Kernel: linux 5.6.10-arch1-1

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:
libgcrypt 1.8.5

@droidmonkey
Copy link
Member

Sounds like slock is not sending the standard FreeDesktop.org signals that a lock event occurred. Please open an issue with them.

@droidmonkey droidmonkey added upstream and removed bug labels May 7, 2020
@dkwo
Copy link
Author

dkwo commented May 7, 2020 via email

@droidmonkey
Copy link
Member

Related to what needed to happen to correct #3339

@dkwo
Copy link
Author

dkwo commented May 18, 2020

I have been informed that slock currently has no dbus support.
The suggestion was to try and wrap it by something like

dbus-send --dest=org.freedesktop.secrets /org/freedesktop/secrets
org.freedesktop.Secret.Service.Lock
array:objpath:"/org/freedesktop/secrets/collection/default"

which works for gnome-keyring.
Do you happen to know how to modify it, to make it work with keepassxc?

@droidmonkey
Copy link
Member

droidmonkey commented May 18, 2020

Send the standard dbus screen lock message from freedesktop.org

@dkwo
Copy link
Author

dkwo commented May 18, 2020 via email

@dkwo
Copy link
Author

dkwo commented May 19, 2020

Actually, it is described in your wiki, if only the command were written correctly, see #2764 (comment)
Is there a way to use dbus-send instead of qdbus?

@dkwo
Copy link
Author

dkwo commented May 19, 2020

Nevermind, I found that
dbus-send --type=method_call --dest=org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.MainWindow.lockAllDatabases
does the job.
Thanks.

@dkwo dkwo closed this as completed May 19, 2020
@droidmonkey
Copy link
Member

No I meant this one:

sessionBus.connect("org.freedesktop.ScreenSaver", // service
"/org/freedesktop/ScreenSaver", // path
"org.freedesktop.ScreenSaver", // interface
"ActiveChanged", // signal name

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

No branches or pull requests

2 participants