Commit graph

78 commits

Author SHA1 Message Date
Jeremy Soller
4ddb320dae
Merge pull request #130 from lilyinstarlight/fix/get-session-by-pid-race
Fix race condition when getting login session
2024-09-22 15:45:19 -06:00
Lily Foster
a114971a67
Fix race condition when getting login session
If `org.freedesktop.login1.Manager.GetSessionByPID` is called after
cosmic-session puts it in a new systemd scope, it will no longer find
the login session as it would have been removed out of the login session
scope.

Most of the time, cosmic-greeter gets to that line before the scope is
changed, but sometimes (particularly on slower systems or virtual
machines) this race can be lost and lead to cosmic-greeter failing to
start and preventing lockscreen from working.

This commit solves that race condition by always checking the parent PID
instead (which would be cosmic-session which is always present in the
login session scope), and all POSIX-y systems should support using parent
PID.
2024-09-22 17:04:23 -04:00
Josh Megnauth
047e393eb8
Remove unneeded searches in ConfigUpdateUser 2024-09-07 02:17:27 -04:00
Josh Megnauth
70b8cae87e
Reduce time text's size for 12 hour clock 2024-09-06 23:02:08 -04:00
Josh Megnauth
5a7f5dc3b5
Reduce searches by caching UserData index 2024-09-06 23:01:54 -04:00
Josh Megnauth
912017615c
Respect user config for military time
Closes: #96
2024-09-06 21:48:00 -04:00
Jeremy Soller
ff03667847
Merge pull request #124 from pop-os/pam
Add custom PAM configuration to start gnome-keyring
2024-09-06 10:50:59 -06:00
Jeremy Soller
c8477a97a9
Merge pull request #112 from joshuamegnauth54/issue-109-restore-user-session-choice
Default to user's previously selected session
2024-09-06 10:50:37 -06:00
Jeremy Soller
ef1253aa23
Add custom PAM configuration to start gnome-keyring 2024-09-06 10:34:37 -06:00
Jeremy Soller
cd9fc48c6f
Merge pull request #116 from joshuamegnauth54/issue-103-localize-datetime-password-prompt
Localize date strings
2024-08-28 21:51:08 -06:00
Josh Megnauth
4050ea8bfe
Localize date strings
Mostly closes: #103

Analogous to my other patches that localize date strings (e.g.
pop-os/cosmic-files#277).

The "password:" prompt is not localized in this patch because PAM should
yield translated strings on its own. This needs further investigation.
2024-08-28 23:19:39 -04:00
Josh Megnauth
16f639d0af
Default to user's previously selected session
Closes: #109
2024-08-28 22:55:08 -04:00
Daniel Weiland
71b44998c3
Hide battery status on devices without a battery 2024-08-27 15:59:23 -05:00
Jason Rodney Hansen
75e456ed4b Use secure input so visibility of password can be toggled 2024-08-15 07:49:37 -06:00
Jeremy Soller
70bf8d296d
Update fallback background 2024-08-02 09:42:34 -06:00
Ashley Wulber
2294d10a51 fix: exit after logind subscription error 2024-07-31 20:00:30 -06:00
Michael Aaron Murphy
20b7a41247 chore(greeter): use one vec for subscriptions 2024-07-31 13:41:31 +02:00
Michael Aaron Murphy
479fb1064e improv(greeter): use subscription for handling greetd IPC socket 2024-07-31 13:41:31 +02:00
Jeremy Soller
38329eb43a
Format and improve logging 2024-06-14 21:29:08 -06:00
Jeremy Soller
3dfd916092
Just reconnect when error received while cancelling session 2024-06-14 21:28:29 -06:00
Jeremy Soller
e5d859a902
Set XDG_SESSION_DESKTOP 2024-06-05 11:05:11 -06:00
Jeremy Soller
3b06040a9f
Set greetd env, requires greetd 0.10 2024-06-05 10:43:05 -06:00
Jeremy Soller
f6ccf0146e
Add greeter keyboard and user selection (#55)
* Add greeter keyboard and user selection

Fixes #37
Fixes #38

* Support switching users and add tooltips to icon buttons

* Implement switching users

* Implement keyboard layout switching

* Ensure that user's xkb_config is used
2024-06-04 22:17:44 -06:00
Josh Megnauth
bba692eecb Fix login deadlocks
Logins seem to spuriously fail with both correct or incorrect passwords.
The failure is not related to the password. `cosmic-greeter` hangs but
the GUI still works. The password text area disappears as well.

I traced this issue down to the socket. It seems like accessing the
socket deadlocks with one thread waiting for the socket to become
readable while another waits for it to become writable.

Switching to `greet-ipc`'s `TokioCodec` and adding a lock to the socket
seems to have fixed this issue. I successfully logged in and inputted
incorrect passwords consecutively without experiencing a deadlock.
2024-06-03 08:02:56 -06:00
Jeremy Soller
d8c81ce3fb
Fix warnings 2024-05-17 09:17:02 -06:00
Jeremy Soller
d11501c43d
Update dependencies 2024-05-17 09:11:50 -06:00
Jeremy Soller
bfe8d8506b
Power off and restart dialogs 2024-05-07 10:08:03 -06:00
Jeremy Soller
93d4818823
Add localization 2024-05-07 10:07:48 -06:00
Jeremy Soller
adb691704e
Turn into a library 2024-05-07 09:03:32 -06:00
Jeremy Soller
9d4fe5bb0b Lock on suspend with inhibit 2024-04-08 09:43:13 -06:00
Jeremy Soller
eb3ba78e57 Implement lock on demand 2024-04-08 09:43:13 -06:00
Jeremy Soller
349c009321 Support unlock from logind dbus 2024-04-08 09:43:13 -06:00
Jeremy Soller
e9b5524992 Add subscription for logind lock/unlock 2024-04-08 09:43:13 -06:00
Jeremy Soller
df5564e55a
Update libcosmic, fixing race conditions 2024-04-05 09:45:20 -06:00
Lily Foster
1bded07bfd Update libcosmic 2024-04-05 08:57:41 -06:00
Krzysztof Zduniak
f8da96e43e Fix power_off in logind.rs 2024-04-05 08:56:59 -06:00
Jeremy Soller
b8530a9001
Do not use dbus-run-session, fixes #22 and #23 2024-03-22 08:13:14 -06:00
Jeremy Soller
1b13865ea0
use dbus-run-session and set XDG_CURRENT_DESKTOP 2024-03-19 21:11:21 -06:00
Lily Foster
cb8762180e
Search all XDG_DATA_DIRS and XDG_DATA_HOME for sessions 2024-02-23 18:55:05 -05:00
Jeremy Soller
0d7624b76d Improved greetd error handling 2024-02-22 20:51:10 -07:00
Jeremy Soller
6747366724
Load theme from proxy 2024-02-06 15:48:57 -07:00
Jeremy Soller
fd049483c3
Add daemon to proxy user backgrounds 2024-02-06 15:03:07 -07:00
Jeremy Soller
3e2743a2e6
Use layer shell for greeter 2024-02-06 10:58:34 -07:00
Jeremy Soller
c3e530434d
Set XDG_SESSION_TYPE 2024-02-06 10:32:56 -07:00
Jeremy Soller
24ed38e3f8
Wrap x sessions in startx 2024-02-06 10:26:53 -07:00
Jeremy Soller
912bd61da0
Use cosmic-greeter as the greetd user 2024-02-05 12:54:34 -07:00
Jeremy Soller
195525d450
Implement power icon 2024-01-17 12:37:22 -07:00
Jeremy Soller
41cc4d1db7
Implement network icon 2024-01-17 11:18:58 -07:00
Jeremy Soller
d4d2773715
Update libcosmic 2024-01-17 09:37:15 -07:00
Jeremy Soller
8d91f3c4ea
Add suspend to greeter 2023-11-29 08:05:09 -07:00