Git Product home page Git Product logo

gtklock's Introduction

gtklock

GTK-based lockscreen for Wayland.

screenshot

About

gtklock is a lockscreen based on gtkgreet. It uses the ext-session-lock Wayland protocol. Works on sway and other wlroots-based compositors.

ℹ️ For documentation, check out the man page and wiki.

Available on these repositories:

Packaging status

Installing gtklock

  • Arch: # yay -S gtklock (using Yay)
  • Gentoo: # emerge --ask gui-apps/gtklock (in GURU repository)
  • Void: # xbps-install gtklock

❤️ Please submit an installation command for your distro!

Building from source

$ meson setup builddir
$ ninja -C builddir
# meson install -C builddir

Dependencies

  • Meson (build-time)
  • pkg-config (build-time)
  • scdoc (optional, build-time)
  • PAM
  • gtk+3.0
  • gtk-session-lock

Installing build dependencies

  • Arch: # yay -S gcc meson pkgconf scdoc pam wayland gtk3 gtk-session-lock
  • Fedora: # dnf install gcc meson pkgconf scdoc pam-devel wayland-devel gtk3-devel, install gtk-session-lock manually
  • Void: # xbps-install gcc meson pkgconf scdoc pam-devel wayland-devel gtk+3-devel gtk-session-lock-devel

❤️ Please submit an dependency installation command for your distro!

gtklock's People

Contributors

erikreider avatar jovanlanik avatar ldelossa avatar lujianhua avatar melihdarcanxyz avatar mrroy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gtklock's Issues

Crash

After entering a wrong password and pressing random keys the program crashes.
Discovered by reddit user here.

build support for Ubuntu Jammy

I'm have build your project using make && make install on Ubuntu 22.10 without problem. However when I try to build on Ubuntu 22.04, somehow the include paths are not making it to the compiler invocation. Any idea what I may be missing?

Ubuntu 22.10:

$ make
...
cc -std=c11 -Iinclude -DPREFIX=/usr -I/usr/include/security -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-layer-shell -pthread  -DMAJOR_VERSION=2 -DMINOR_VERSION=0 -DMICRO_VERSION=0   -c -o src/auth.o src/auth.c
...

Ubuntu 22.04:

$ make
Package pam was not found in the pkg-config search path.
Perhaps you should add the directory containing `pam.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pam' found
cc -std=c11 -Iinclude -DPREFIX=/usr  -DMAJOR_VERSION=2 -DMINOR_VERSION=0 -DMICRO_VERSION=0   -c -o src/auth.o src/auth.c
In file included from src/auth.c:15:
include/auth.h:8:10: fatal error: glib.h: No such file or directory
    8 | #include <glib.h>
      |          ^~~~~~~~
compilation terminated.

Support for new ext-session-lock-v1 protocol

As compositors switch to new ext-session-lock-v1, gtklock won't be available to use. Therefore, support should be added.

I'm getting this error on latest river release:

** (gtklock:38102): CRITICAL **: 21:15:42.023: Your compositor doesn't support wlr-input-inhibitor

Intermittent segmentation faults

Over several runs, it appears there's an intermittent segmentation fault

~/git/c/gtklock master
🖳  ./gtklock 

** (gtklock:41453): WARNING **: 16:30:43.099: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

~/git/c/gtklock master
🖳  ./gtklock

** (gtklock:41633): WARNING **: 16:30:52.752: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
zsh: segmentation fault (core dumped)  ./gtklock

~/git/c/gtklock master 7s
🖳  ./gtklock

** (gtklock:41802): WARNING **: 16:31:03.687: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

~/git/c/gtklock master
🖳  ./gtklock

** (gtklock:41950): WARNING **: 16:31:12.051: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

backtrace:

gdb) backtrace
#0  0x000000000040558b in auth_pw_check ()
#1  0x000000000040834e in window_pw_wait ()
#2  0x00007efc51250302 in g_thread_proxy (data=0x8b82a0) at ../glib/gthread.c:827
#3  0x00007efc5105be2d in start_thread (arg=<optimized out>) at pthread_create.c:442
#4  0x00007efc510e11b0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Failed howdy authentication causes core dump

I'm currently trying to get howdy and gtklock to play nicely together but have noticed that a failed auth attempt with howdy (so letting it timeout) causes gtklock to seg fault. Successful authentication with howdy works fine. Not sure if this is better posted upstream but figured I'd start here.

Some useful info:
I'm running sway on Linux 5.19.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 24 Sep 2022 18:24:15 +0000

Have howdy plugged into pam and gtklock as follows:
/etc/pam.d/login

#%PAM-1.0

auth       sufficient   pam_unix.so try_first_pass likeauth nullok
auth       sufficient   pam_python.so /lib/security/howdy/pam.py
auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    optional     pam_gnome_keyring.so auto_start
password   include      system-local-login

Steps to reproduce:

  • Add howdy to pam.d/login
  • Run gtklock
  • Trigger auth attempt by leaving password empty
  • Let attempt timeout

Crash when disabling display

If you disable a display, for example when you connect your laptop to an external display, gtklock will crash, leaving the session unlocked.

How to reproduce:
Run gtklock &!; sleep 2; swaymsg output eDP-1 disable; sleep 2; swaymsg output eDP-1 enable

Lock occurs after a delay (25 seconds) instead of immediately

Expected behavior

Running the command gtklock should immediately lock the screen.

Actual behavior

Running the command gtklock waits 25 seconds, then locks the screen.

Steps to reproduce

  1. Install gtklock on NixOS.
  2. Add necessary setting security.pam.services.gtklock = {};.
  3. Run command gtklock.

System info:
Operating System: NixOS (x86_64)
Wayland Compositor / Window Manager: Hyprland
Terminal: Kitty
Display Manager: GDM

Please let me know if there's any other info that would be helpful.

Crash on entering wrong password

Details

Distro: archlinux
sway 1.7-9
wlroots 0.15.1-5
gtklock 1abec48

Steps to reproduce

  1. Enter wrong password
  2. ???
  3. Crash

Backtrace

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
Downloading 0.00 MB source file /usr/src/debug/glibc/nptl/pthread_kill.c
44	     return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                       
[Current thread is 1 (Thread 0x7faf8ab7f640 (LWP 24867))]
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007faf9508e3d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007faf9503e838 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007faf95028535 in __GI_abort () at abort.c:79
#4  0x00007faf9508245e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7faf951c083e "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#5  0x00007faf950980cc in malloc_printerr (str=str@entry=0x7faf951c39c0 "malloc(): unaligned tcache chunk detected") at malloc.c:5664
#6  0x00007faf9509c5ec in tcache_get (tc_idx=<optimized out>) at malloc.c:3195
#7  __GI___libc_malloc (bytes=bytes@entry=24) at malloc.c:3313
#8  0x00007faf9159bac7 in malloc_multiply (need=1, size=24) at ../systemd-stable/src/basic/alloc-util.h:104
#9  prioq_new (compare_func=0x7faf91590030 <earliest_time_prioq_compare>) at ../systemd-stable/src/basic/prioq.c:35
#10 prioq_ensure_allocated (q=q@entry=0x7faf740527e8, compare_func=0x7faf91590030 <earliest_time_prioq_compare>) at ../systemd-stable/src/basic/prioq.c:60
#11 0x00007faf9159f26f in setup_clock_data.constprop.0 (e=e@entry=0x7faf74052770, d=d@entry=0x7faf740527e0, clock=1) at ../systemd-stable/src/libsystemd/sd-event/sd-event.c:1193
#12 0x00007faf91595b0f in sd_event_add_time (clock=1, usec=0, accuracy=0, callback=0x7faf9158fab0 <time_callback>, userdata=<optimized out>, ret=<optimized out>, e=<optimized out>)
    at ../systemd-stable/src/libsystemd/sd-event/sd-event.c:1261
#13 varlink_attach_event (priority=0, e=<optimized out>, v=<optimized out>) at ../systemd-stable/src/shared/varlink.c:1948
#14 userdb_connect (iterator=0x7faf740494f0, path=0x7faf74004550 "/run/systemd/userdb/io.systemd.Home", method=<optimized out>, more=<optimized out>, query=0x7faf7401b790)
    at ../systemd-stable/src/shared/userdb.c:376
#15 0x00007faf915974c6 in userdb_start_query (iterator=0x7faf740494f0, method=0x7faf915a8da0 "io.systemd.UserDatabase.GetUserRecord", more=false, query=0x7faf740a0420, flags=9)
    at ../systemd-stable/src/shared/userdb.c:502
#16 0x00007faf915978c6 in userdb_by_name (name=0x564c8f811610 "p00f", flags=9, ret=0x7faf8ab7e818) at ../systemd-stable/src/shared/userdb.c:637
#17 0x00007faf9157b2b4 in userdb_getpwnam (errnop=<optimized out>, buflen=<optimized out>, buffer=<optimized out>, pwd=<optimized out>, name=<optimized out>)
    at ../systemd-stable/src/nss-systemd/userdb-glue.c:20
#18 _nss_systemd_getpwnam_r (name=0x564c8f811610 "p00f", pwd=0x7faf740130d0, buffer=0x7faf74013100 "qemu", buflen=1024, errnop=0x7faf8ab7f5c0)
    at ../systemd-stable/src/nss-systemd/nss-systemd.c:325
#19 0x00007faf950dc663 in __getpwnam_r (name=<optimized out>, resbuf=0x7faf740130d0, buffer=<optimized out>, buflen=1024, result=<optimized out>) at ../nss/getXXbyYY_r.c:273
#20 0x00007faf95feeaa2 in pam_modutil_getpwnam () at /usr/lib/libpam.so.0
#21 0x00007faf9186084a in  () at /usr/lib/security/pam_unix.so
#22 0x00007faf9186090f in  () at /usr/lib/security/pam_unix.so
#23 0x00007faf91860212 in  () at /usr/lib/security/pam_unix.so
#24 0x00007faf9185da12 in pam_sm_authenticate () at /usr/lib/security/pam_unix.so
#25 0x00007faf95fe891a in  () at /usr/lib/libpam.so.0
#26 0x00007faf95fe8181 in pam_authenticate () at /usr/lib/libpam.so.0
#27 0x0000564c8eca88f9 in auth_pwcheck (s=<optimized out>) at auth.c:60
#28 0x0000564c8eca8f0b in window_pw_wait (data=0x564c8f8466f0) at window.c:90
#29 0x00007faf953e8da5 in g_thread_proxy (data=0x564c8fa4ac60) at ../glib/glib/gthread.c:827
#30 0x00007faf9508c54d in start_thread (arg=<optimized out>) at pthread_create.c:442
#31 0x00007faf95111b14 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

per monitor background image

Is there a way to define a background image per monitor?
Like so in css: window#DP-1 {} or window.HDMI-A-1 {}

Or a way for a single background to span across monitors. So you could do smth like this:

grim /tmp/lock.png
corrupter -mag 1 -boffset 3 -meanabber 1 /tmp/lock.png /tmp/lock.png
gtklock -s style.css

[feature request] span single background over entire window

I'm using a multi monitor setup, and i like to make my screen locker extra fancy.

I came up with the idea to create a screenshot of both outputs combined and apply blur to it using imagemagick, and then use this as wrapper for launching gtklock where the image is provided to it upon launch.

I did however not find a way to span this background over gtklock, so a singular image covers both outputs. I'm guessing this is the best way to do it, as setting specific backgrounds per output is probably not easy to implement.

So basically i have a 2560x1440 and 3440x1440 next to each other, so my screenshot is 6000x1440. One big canvas.

gtklock not working when compiled using musl

When compiling gtklock in musl based distros (i'm using Alpine), after typing the password to unlock there is a infinite loading which never ends.

Following message is displayed at dmesg command:

[ 1696.746924] gtklock[28089]: segfault at 0 ip 00007f18ee42c6b9 sp 00007f18ea0fde18 error 6 in ld-musl-x86_64.so.1[7f18ee3f0000+48000]

Input box text disappears

When you type a password and move the mouse the text disappears.
It seems to be a issue with the layer shell code because it doesn't happen when running $ gtklock -l.

initially hide the form when the `-b`ackground image used

Thank you for adding the -b flag. It looks superb.

I think it would look even better if the clock, the password label and the unlock button were initially hidden, and show up on a key or button event.

Thank you for your work, it goes well with what I'm working on.

Flash of desktop screen on laptop resume

Hey,

Gtklock working pretty great for me. However, if I shut my laptop screen and allow it to suspend, when I come back, I get a flash of my desktop windows before gtlock renders itself.

Here is my swayidle configuration:

exec swayidle -w \
         timeout 300   'gtklock -d -s ~/.config/gtklock/style.css' \
         timeout 600   'swaymsg "output * dpms off"' \
         resume        'swaymsg "output * dpms on"' \
         after-resume  'gtklock -d -s ~/.config/gtklock/style.css'

I did have that after-resume line as before-sleep at one point, but that failed to invoke gtlock all together.

Can't compile on ARM64

Trying to compile on PostmarketOS on ARM64 and I get a pkg-config error that says PAM is not found even though I have the linux-pam and linux-pam-dev packages installed

authentication always failing on NixOS

I don't know if I'm doing something wrong, but under Hyprland, when entering my password, login fails.
I even tested copy/pasting my password and it still doesn't work.
Is there a way for me to debug gtklock?
It doesn't give anything on sucess nor on failure.

Rofi launches on top of gtklock

I run rofi and then launch gtklock, rofi stays on top of gtklock and allows me to kill gtklock. I'm not sure if this is a security vulnerability but just wanted you to let you know.

[Feature request] Add layout config

Instead of hardcoding all of the elements, I think there could be something like an html or xml with the layout.
Afaik gtk only supports css, but at least add some way to customize it instead of hardcoding.
Max I was able to do with css is hide the "Password" label by making font size 0.
I still want to get rid of unlock button, or at least make it centered.

account locked for no reason

This happens to me on the random basis:

image

Last night and 4 times tonight, out of nowhere, I had my account blocked for 10 minutes. I was playing with changing user images, using in turns mugshot and swaysettings, and also deleting images manually. No idea if it matters. I remember having a similar incident at the office, on some older gtklock version. I'm pretty sure I entered my password correctly every time, and 100% sure that I couldn't misspell it 3 times.

$ gtklock -i -m userinfo-module

** (gtklock:280886): WARNING **: 02:53:06.671: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

(gtklock:280886): GLib-CRITICAL **: 02:53:06.703: g_key_file_load_from_file: assertion 'file != NULL' failed

(gtklock:280886): GLib-GObject-CRITICAL **: 03:03:05.260: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Both ~/.face and /var/lib/AccountsService/icons/piotr are present at the moment.

No capslock warning

When the capslock is activated, gtklock doesn't warn the user that the capslock is activated.

Thanks for this program!

No longer see messages in gtklock

Hello,

I got a new laptop today and installed gtklock. Everything works as expected except for the messages shown when attempting a fingerprint scan. Any changes on gtklock's end that would cause this?

Crash on suspend

Hey,

Came back from suspend with my sway instance crashed. Saw this in my journalctl

Jul 06 19:10:51 fedora systemd[1]: Reached target sleep.target - Sleep.
Jul 06 19:10:51 fedora systemd[1]: Starting systemd-suspend.service - System Suspend...
Jul 06 19:10:51 fedora audit: BPF prog-id=207 op=LOAD
Jul 06 19:10:51 fedora audit: BPF prog-id=208 op=LOAD
Jul 06 19:10:51 fedora audit: BPF prog-id=209 op=LOAD
Jul 06 19:10:51 fedora systemd[1]: Started [email protected] - Process Core Dump (PID 715495/UID 0).
Jul 06 19:10:51 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@12-715495-0 comm="systemd" exe="/usr/lib>
Jul 06 19:10:51 fedora systemd-sleep[715526]: Entering sleep state 'suspend'...
Jul 06 19:10:51 fedora kernel: PM: suspend entry (s2idle)
Jul 06 19:10:51 fedora [715545]: [164B blob data]
Jul 06 19:10:51 fedora systemd-coredump[715527]: [🡕] Process 715433 (gtklock) of user 1000 dumped core.
                                                 
                                                 Module linux-vdso.so.1 with build-id 5785fbe1cc105912f683ad7629d33f7d6e3692ce
                                                 Module libdconfsettings.so with build-id bbf80c3788c9b836a1ae22bd23e75712368ce187
                                                 Metadata for module libdconfsettings.so owned by FDO found: {
                                                         "type" : "rpm",
                                                         "name" : "dconf",
                                                         "version" : "0.40.0-6.fc36",
                                                         "architecture" : "x86_64",
                                                         "osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                                 }
                                                 
                                                 Module libgpg-error.so.0 with build-id a53c231739d55cc39b97e28c36cd8b3e58a8f8f8
                                                 Metadata for module libgpg-error.so.0 owned by FDO found: {
                                                         "type" : "rpm",
                                                         "name" : "libgpg-error",
                                                         "version" : "1.45-1.fc36",
                                                         "architecture" : "x86_64",
                                                         "osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                                 }
                                                 
                                                 Module libgcrypt.so.20 with build-id ab80eae398f8814c7dc7bfc27fa3724491a47294
                                                 Stack trace of thread 715433:
                                                 #0  0x00007f73220d38f7 g_log_structured_array (libglib-2.0.so.0 + 0x598f7)
                                                 #1  0x00007f73220d3bc2 g_log_default_handler (libglib-2.0.so.0 + 0x59bc2)
                                                 #2  0x00007f73220d3e22 g_logv (libglib-2.0.so.0 + 0x59e22)
                                                 #3  0x00007f73220d40d3 g_log (libglib-2.0.so.0 + 0x5a0d3)
                                                 #4  0x0000000000405fff main (gtklock + 0x5fff)
                                                 #5  0x00007f7321ea2550 __libc_start_call_main (libc.so.6 + 0x29550)
                                                 #6  0x00007f7321ea2609 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x29609)
                                                 #7  0x0000000000404a55 _start (gtklock + 0x4a55)
                                                 
                                                 Stack trace of thread 715436:
                                                 #0  0x00007f73220bd9e0 g_hash_table_new_full (libglib-2.0.so.0 + 0x439e0)
                                                 #1  0x00007f732235f77b g_dbus_message_init (libgio-2.0.so.0 + 0x10a77b)
                                                 #2  0x00007f7322231fd9 g_type_create_instance (libgobject-2.0.so.0 + 0x3bfd9)
                                                 #3  0x00007f7322219e38 g_object_new_internal (libgobject-2.0.so.0 + 0x23e38)
                                                 #4  0x00007f732221b081 g_object_new_with_properties (libgobject-2.0.so.0 + 0x25081)
                                                 #5  0x00007f732221bb21 g_object_new (libgobject-2.0.so.0 + 0x25b21)
                                                 #6  0x00007f7322361ebe g_dbus_message_new_from_blob (libgio-2.0.so.0 + 0x10cebe)
                                                 #7  0x00007f7322372055 _g_dbus_worker_do_read_cb (libgio-2.0.so.0 + 0x11d055)
                                                 #8  0x00007f732230576a g_task_return_now (libgio-2.0.so.0 + 0xb076a)
                                                 #9  0x00007f73223057ad complete_in_idle_cb (libgio-2.0.so.0 + 0xb07ad)
                                                 #10 0x00007f73220cb4cb g_idle_dispatch (libglib-2.0.so.0 + 0x514cb)
                                                 #11 0x00007f73220cefaf g_main_context_dispatch (libglib-2.0.so.0 + 0x54faf)
                                                 #12 0x00007f73221242c8 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xaa2c8)
                                                 #13 0x00007f73220ce6cf g_main_loop_run (libglib-2.0.so.0 + 0x546cf)
                                                 #14 0x00007f732236999a gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x11499a)
                                                 #15 0x00007f73220f9302 g_thread_proxy (libglib-2.0.so.0 + 0x7f302)
                                                 #16 0x00007f7321f05e2d start_thread (libc.so.6 + 0x8ce2d)
                                                 #17 0x00007f7321f8b620 __clone3 (libc.so.6 + 0x112620)
                                                 
                                                 Stack trace of thread 715437:
                                                 #0  0x00007f732210c7fe g_variant_builder_end (libglib-2.0.so.0 + 0x927fe)
                                                 #1  0x00007f732210fd78 g_variant_valist_new (libglib-2.0.so.0 + 0x95d78)
                                                 #2  0x00007f7322110322 g_variant_new_va (libglib-2.0.so.0 + 0x96322)
                                                 #3  0x00007f7322110521 g_variant_builder_add (libglib-2.0.so.0 + 0x96521)
                                                 #4  0x00007f7322365c4b g_dbus_message_to_blob (libgio-2.0.so.0 + 0x110c4b)
                                                 #5  0x00007f73223595ab g_dbus_connection_send_message_unlocked.lto_priv.0 (libgio-2.0.so.0 + 0x1045ab)
                                                 #6  0x00007f7322359d27 g_dbus_connection_send_message_with_reply_unlocked (libgio-2.0.so.0 + 0x104d27)
                                                 #7  0x00007f7322359f03 g_dbus_connection_send_message_with_reply (libgio-2.0.so.0 + 0x104f03)
                                                 #8  0x00007f73223656c6 g_dbus_connection_call_internal (libgio-2.0.so.0 + 0x1106c6)
                                                 #9  0x00007f7322365859 g_dbus_connection_call (libgio-2.0.so.0 + 0x110859)
                                                 #10 0x00007f73230910e4 dconf_gdbus_method_call (libdconfsettings.so + 0x80e4)
                                                 #11 0x00007f73220cb4cb g_idle_dispatch (libglib-2.0.so.0 + 0x514cb)
                                                 #12 0x00007f73220cefaf g_main_context_dispatch (libglib-2.0.so.0 + 0x54faf)
                                                 #13 0x00007f73221242c8 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xaa2c8)
                                                 #14 0x00007f73220cc940 g_main_context_iteration (libglib-2.0.so.0 + 0x52940)
                                                 #15 0x00007f73230903ad dconf_gdbus_worker_thread (libdconfsettings.so + 0x73ad)
                                                 #16 0x00007f73220f9302 g_thread_proxy (libglib-2.0.so.0 + 0x7f302)
                                                 #17 0x00007f7321f05e2d start_thread (libc.so.6 + 0x8ce2d)
                                                 #18 0x00007f7321f8b620 __clone3 (libc.so.6 + 0x112620)
                                                 
                                                 Stack trace of thread 715434:
                                                 #0  0x00007f7321f7ebef __poll (libc.so.6 + 0x105bef)
                                                 #1  0x00007f732212423d g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xaa23d)
                                                 #2  0x00007f73220cc940 g_main_context_iteration (libglib-2.0.so.0 + 0x52940)
                                                 #3  0x00007f73220cc991 glib_worker_main (libglib-2.0.so.0 + 0x52991)
                                                 #4  0x00007f73220f9302 g_thread_proxy (libglib-2.0.so.0 + 0x7f302)
                                                 #5  0x00007f7321f05e2d start_thread (libc.so.6 + 0x8ce2d)
                                                 #6  0x00007f7321f8b620 __clone3 (libc.so.6 + 0x112620)
                                                 
                                                 Stack trace of thread 715435:
                                                 #0  0x00007f7321f8429d syscall (libc.so.6 + 0x10b29d)
                                                 #1  0x00007f732211f9d0 g_cond_wait_until (libglib-2.0.so.0 + 0xa59d0)
                                                 #2  0x00007f732209ef11 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x24f11)
                                                 #3  0x00007f732209f0a5 g_async_queue_timeout_pop (libglib-2.0.so.0 + 0x250a5)
                                                 #4  0x00007f73220fbbb5 g_thread_pool_thread_proxy.lto_priv.0 (libglib-2.0.so.0 + 0x81bb5)
                                                 #5  0x00007f73220f9302 g_thread_proxy (libglib-2.0.so.0 + 0x7f302)
                                                 #6  0x00007f7321f05e2d start_thread (libc.so.6 + 0x8ce2d)
                                                 #7  0x00007f7321f8b620 __clone3 (libc.so.6 + 0x112620)
                                                 ELF object binary architecture: AMD x86-64
Jul 06 19:10:51 fedora systemd[1]: [email protected]: Deactivated successfully.
Jul 06 19:10:52 fedora kernel: Filesystems sync: 0.119 seconds

Error updating to gtklock-1.3.7-1 [AUR]

Well, I'm only with my old, testing lappy, but for some reason can't update the gtklock package.

(...)
src/gtklock.c: In function 'create_gtklock':
src/gtklock.c:100:50: error: 'G_APPLICATION_DEFAULT_FLAGS' undeclared (first use in this function); did you mean 'G_APPLICATION_GET_CLASS'?
  100 |         gtklock->app = gtk_application_new(NULL, G_APPLICATION_DEFAULT_FLAGS);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  G_APPLICATION_GET_CLASS
src/gtklock.c:100:50: note: each undeclared identifier is reported only once for each function it appears in
make: *** [<builtin>: gtklock.o] Error 1
rm wlr-input-inhibitor-unstable-v1-client-protocol.c
==> ERROR: A failure occurred in build().
    Aborting...

[AUR] `gtklock` / `gtklock-userinfo-module` dependecy version mismatch

Hi @jovanlanik! Could you please take a closer look at the gtklock-userinfo-module PKGBUILD -> gtklock version required? Attempt to upgrade, having both packages installed, ends up in:

(...)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing gtklock (1.3.5-1) breaks dependency 'gtklock=1.3.4' required by gtklock-userinfo-module
==> WARNING: Failed to install built package(s).
==> Cleaning up...
:: Cloning gtklock-userinfo-module package repo...
Cloning into 'gtklock-userinfo-module'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 19 (delta 5), reused 19 (delta 5), pack-reused 0
Receiving objects: 100% (19/19), done.
Resolving deltas: 100% (5/5), done.
==> Making package: gtklock-userinfo-module 1.3.5-1 (Mon Sep  5 08:21:24 2022)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: gtklock=1.3.5
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> gtklock=1.3.5
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

full output here

So, the only way to upgrade it is to uninstall gtklock-userinfo-module temporarily.

Keyboard input of last used program still active when locked

gtklock version: 1.3.6
WM: Hyprland
OS: Arch Linux
modules: userinfo

I know this doesn't affect everyone I think but I thought maybe I should report this anyways.

So looks that this only happens under certain conditions.
Normally when my Laptop battery is low swayidle kicks in and locks the screen and since I can type my password fast I once didn't noticed and after I pressed enter I noticed the text input field wasn't focused so I typed my password again and unlocked it and noticed that I accidentally sent someone my password.....luckily I reacted fast enough and I deleted the message 😅
I tried to reproduce this on sway but seems like it doesn't happen with sway

Support multiple modules

How to support multiple modules in the config.ini file?

With this:

[main]
modules=userinfo-module.so
modules=playerctl-module.so
modules=powerbar-module.so

... only the final module is loaded

These fail completely:

modules=a,b,c
modules=a b c

This works fine:

LD_LIBRARY_PATH=/usr/local/lib/gtklock gtklock -m powerbar-module -m userinfo-module -m playerctl-module

Feature Request: Allow positioning window-box

Currently the window box is always placed in the center of the screen. I think it would be useful to be able to position the box at the top or bottom of the screen. I did some examination of GTK's CSS properties, and I was unable to find a way to move the box around.

Fails to unlock

Hate to be the first but ...

I tried running gtklock with -l, -d or -i options as well as unadorned and it failed to accept my password.

sway-1.6.1-4.fc35.x86_64
wlroots-0.14.1-3.fc35.x86_64

Long pause unlocking after resume

Hey,

Not a great bug report here since it seems pretty intermittent but have you noticed very long pause on unlock after resume? At first I thought gtklock crashed as it got stuck on the spinner. Then I let it sit for awhile and it actually did finish.

[discussion] modules: possibly hard to maintain?

I get the idea of the modules: you can optionally add extra functionality while keeping the main software minimal.

However, this would require all the separate modules that may follow to be individually packaged and updated. Depending on how many modules there are, this would be way harder for distributions to maintain than just the singular gtklock package i would assume.

So are the modules the best way forward, or should extra functionality like the user info be directly added to gtklock? Since there already is a config file, it's simple to enable specific features you want (or not).

Input inhibiting

Input isnt inhibited and can cause you to type in a window when typing password

[Feature request] User Switching

Add a button to execute a command to switch to Display Manager like gdmflexiserver for GDM or dm-tool switch-to-greeter for LightDM

compilation error in fedora.

Hey,

I pulled in all the dependencies to do a local build of gtklock. When attempting to build I get a clang flag's error tho.

🖭  make
/usr/bin/clang   gtklock.o include/wlr-input-inhibitor-unstable-v1-client-protocol.h wlr-input-inhibitor-unstable-v1-client-protocol.o auth.o input-inhibitor.o module.o source.o window.o  -lpam -lwayland-client -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lgtk-layer-shell -lgmodule-2.0 -pthread -lglib-2.0  -o gtklock
clang-14: error: cannot specify -o when generating multiple output files
make: *** [<builtin>: gtklock] Error 1

Is this an issue with makefile or something on my end?

When using -b (background) the image should fill the screen

So I'll be the second issue too!

I tried using the -b background option with an image smaller than my display and it put the image in the top left corner, leaving the rest of the screen exposed.

It would be nice if it added black bars to fill in the screen or shrunk the image if it were larger than the display - like 'imv -f' - see image
dump

EDIT: I figured out how to do a screendump of the locked screen:
dump

Wallpaper image with multiple monitors

When using a wallpaper image on the lock screen and then plugging in one or more monitors with different resolutions the image rendering on the external monitors does not take the size difference into account. This results in the image being stretched correctly on the laptop monitor, but does not stretch correctly on external monitors with larger resolutions.

Daemonize option doesn't work

Hi, thanks for the great work!

With the latest release, gtklock -d command doesn't work as intended. Most of the time it doesn't lock the screen at all but sometimes it locks after a long time i.e. after waking up from sleep.

Please let me know if you need more details.

Reproducable core dump

Played around with this.

Was unable to catch the core dumps before because daemonizing with "-d" option leaves no place to write out logs.

🖳  gtklock&; sleep 1 && gtklock 
[1] 550298

** (gtklock:550298): WARNING **: 20:17:06.231: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

** (gtklock:550311): ERROR **: 20:17:07.080: Failed to inhibit input. Is another lockscreen already running?
zsh: trace trap (core dumped)  gtklock

The above is a common scenario when you have gtklock ran 1) at a timeout and 2) before suspend, where the first time out is earlier then the suspend timeout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.