Skip to content

Commit 3eca438

Browse files
authored
Add native screensaver (#13432)
* Implement a screensaver. - Functional in wayland or x11 - Add a native 'away message' dialog - Unify 'switch-to-greeter' code from multiple sources - Add systemd/consolekit support for session states - Provide cinnamon-screensaver-command (still utilized by csd- power for pre-power-event activation). - Remove cinnamon-screensaver as a required session component. - Allow disabling of the internal screensaver to continue using cinnamon-screensaver. - Unify mpris code for the sound applet and albumArtWidget.js - Unify power code for the power applet and powerWidget.js TODO: - Wallpaper in wayland sessions (postponed until there is layer- shell support in muffin). Imported from cinnamon-screensaver: - PAM-related files, cinnamon-screensaver-pam-helper - cinnamon-screensaver-command and cinnamon-unlock-desktop: Both remain compatible with cinnamon-screensaver (> 6.7). The screenShield actor contains all other related widgets like the unlock dialog, and is placed in the new screenShieldGroup, the top- most child of the global.stage. Requires: linuxmint/muffin#797 linuxmint/cinnamon-screensaver#491 linuxmint/cinnamon-settings-daemon#442 * Add backup-locker support for screensaver. Imported from cinnamon-screensaver, but improved... - Relies on dbus-activation now, which allows easier interaction between cinnamon and the locker process to coordinate grabs. - Add a simple dbus service to cinnamon-launcher, to allow restart from the backup locker (still falling back to tty instructions if the launcher isn't available). - Re-use event-grabber and event-filter from cinnamon-screensaver The backup window spawns when the screensaver shows, and is placed in global.top_window_group (where other override-redirect/POPUP-type windows are placed automatically). In the event of a crash/restart, the backup window will try to raise itself to the top, and will continue to until Cinnamon restarts. When Cinnamon restarts, if its stored state (gsettings) shows it should be locked, it will negotiate the modal grab from the backup locker, and immediately lock the screensaver again. * debian/control: Add Breaks/Replaces cinnamon-screensaver. * Restrict access to screenShield instance and screensaver service.
1 parent dd875ef commit 3eca438

78 files changed

Lines changed: 9811 additions & 560 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
linuxmint/cinnamon-control-center,
2929
linuxmint/cinnamon-desktop,
3030
linuxmint/cinnamon-menus,
31-
linuxmint/cinnamon-screensaver,
3231
linuxmint/cinnamon-session,
3332
linuxmint/cinnamon-settings-daemon,
3433
linuxmint/cinnamon-translations,

cinnamon.session.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Cinnamon Session]
22
Name=Cinnamon
3-
RequiredComponents=cinnamon;org.cinnamon.ScreenSaver;nemo-autostart;@REQUIRED@cinnamon-killer-daemon;
3+
RequiredComponents=cinnamon;nemo-autostart;@REQUIRED@cinnamon-killer-daemon;
44
DesktopName=X-Cinnamon
55

66

cinnamon2d.session.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Cinnamon Session]
22
Name=Cinnamon (Software Rendering)
3-
RequiredComponents=cinnamon2d;org.cinnamon.ScreenSaver;nemo-autostart;@REQUIRED@cinnamon-killer-daemon;
3+
RequiredComponents=cinnamon2d;nemo-autostart;@REQUIRED@cinnamon-killer-daemon;
44
DesktopName=X-Cinnamon
55

66

data/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ gnome.compile_resources(
6262
install: true,
6363
install_dir: pkgdatadir
6464
)
65+
66+
subdir('pam')

data/org.cinnamon.gschema.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,24 @@
521521
<description>If true, the pointer will be set to the center of the new monitor when using pointer next/previous shortcuts.</description>
522522
</key>
523523

524+
<key type="b" name="internal-screensaver-enabled">
525+
<default>true</default>
526+
<summary>Use internal screensaver implementation. Requires cinnamon restart if changed.</summary>
527+
<description>If true, use Cinnamon's internal screensaver for locking instead of the external cinnamon-screensaver daemon.</description>
528+
</key>
529+
530+
<key type="b" name="session-locked-state">
531+
<default>false</default>
532+
<summary>Whether the session is currently locked</summary>
533+
<description>Persists the screensaver locked state so it can be restored after a Cinnamon restart. This key is managed internally and should not be modified manually.</description>
534+
</key>
535+
536+
<key type="b" name="debug-screensaver">
537+
<default>false</default>
538+
<summary>Enable screensaver debug logging</summary>
539+
<description>If true, enables verbose debug logging for the screensaver, unlock dialog, and backup-locker.</description>
540+
</key>
541+
524542
<child name="theme" schema="org.cinnamon.theme"/>
525543
<child name="recorder" schema="org.cinnamon.recorder"/>
526544
<child name="keyboard" schema="org.cinnamon.keyboard"/>

data/pam/cinnamon.pam

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#%PAM-1.0
2+
3+
# Fedora & Arch
4+
-auth sufficient pam_selinux_permit.so
5+
auth include system-auth
6+
-auth optional pam_gnome_keyring.so
7+
account include system-auth
8+
password include system-auth
9+
session include system-auth
10+
11+
# SuSE/Novell
12+
#auth include common-auth
13+
#auth optional pam_gnome_keyring.so
14+
#account include common-account
15+
#password include common-password
16+
#session include common-session

data/pam/cinnamon.pam.debian

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@include common-auth
2+
auth optional pam_gnome_keyring.so

data/pam/meson.build

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pamdir = get_option('pam_prefix')
2+
if pamdir == ''
3+
pamdir = sysconfdir
4+
endif
5+
6+
if get_option('use_debian_pam')
7+
install_data(
8+
'cinnamon.pam.debian',
9+
rename: 'cinnamon',
10+
install_dir: join_paths(pamdir, 'pam.d')
11+
)
12+
else
13+
install_data(
14+
'cinnamon.pam',
15+
rename: 'cinnamon',
16+
install_dir: join_paths(pamdir, 'pam.d')
17+
)
18+
endif

data/services/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
service_files = [
2+
'org.cinnamon.BackupLocker.service',
23
'org.cinnamon.CalendarServer.service',
34
'org.Cinnamon.HotplugSniffer.service',
45
'org.Cinnamon.Melange.service',
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[D-BUS Service]
2+
Name=org.cinnamon.BackupLocker
3+
Exec=@libexecdir@/cinnamon-backup-locker

0 commit comments

Comments
 (0)