Skip to content

Conversation

@mtwebster
Copy link
Member

@mtwebster mtwebster commented Jan 17, 2026

  • Re-uses PAM mechanisms from cinnamon-screensaver
  • Functional in wayland or x11
  • Add a native 'away message' dialog
  • Unify 'show-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).
  • debian/control: Provide cinnamon-screensaver
  • Remove cinnamaon-screensaver as a required session component.
  • Unify mpris code for the sound applet and albumArtWidget.js
  • Action modes implemented to guard keybindings in various modes.

TODO:

  • Notification monitor (for feature parity with cinnamon-screensaver).
  • Wallpaper in wayland sessions
  • Fallback locker.
  • More keybinding cleanup.
  • fprintd testing
  • debian/control fixes to allow replacement of cinnamon-screensaver
    during upgrade (cinnamon will now Provide cinnamon-screensaver).
  • ** Remove packaging changes disabling docs, and debug mode for the screensaver

Imported from cinnamon-screensaver:

  • pam.d files
  • src/screensaver/*
  • src/cinnamon-screensaver-pam-helper

callback.

This lets us more easily control what keybindings are available in
a given 'mode'.

Assign modes to various states - expo, overview, etc...
- Re-uses PAM mechanisms from cinnamon-screensaver
- Functional in wayland or x11
- Add a native 'away message' dialog
- Unify 'show-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).
- debian/control: Provide cinnamon-screensaver
- Remove cinnamaon-screensaver as a required session component.
- Unify mpris code for the sound applet and albumArtWidget.js

TODO:
- Notification monitor (for feature parity with cinnamon-screensaver).
- Wallpaper in wayland sessions
- Fallback locker.
- fprintd testing
- debian/control fixes to allow replacement of cinnamon-screensaver
  during upgrade (cinnamon will now Provide cinnamon-screensaver).

Imported from cinnamon-screensaver:
- pam.d files
- src/screensaver/*
- src/cinnamon-screensaver-pam-helper
@mtwebster mtwebster changed the title Add native screensaver [WIP] Add native screensaver Jan 17, 2026
@mtwebster mtwebster requested a review from Copilot January 17, 2026 14:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a native screensaver implementation to Cinnamon, migrating functionality from the external cinnamon-screensaver daemon into Cinnamon itself. The implementation reuses PAM authentication mechanisms and provides feature parity for both X11 and Wayland sessions.

Changes:

  • Integrated PAM authentication with native unlock dialog and away message support
  • Implemented screensaver widgets (clock, album art with MPRIS control, power/battery indicator)
  • Added action modes system for keybinding context management during lock/unlock states
  • Unified MPRIS and power utility modules for sharing between sound applet and screensaver
  • Updated session files, packaging, and applets to use internal screensaver

Reviewed changes

Copilot reviewed 57 out of 59 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
src/screensaver/*.{c,h} PAM authentication, setuid handling, subprocess management (imported from cinnamon-screensaver)
src/cinnamon-screensaver-pam-helper.c PAM helper subprocess for authentication
js/ui/screenShield.js Main screensaver coordinator with widget floating system and state management
js/ui/unlockDialog.js Unlock dialog UI with password entry and user switching
js/ui/awayMessageDialog.js Modal dialog for setting away message before locking
js/ui/screensaverWidgets/*.js Floating widgets for clock, album art, and power display
js/misc/{authClient,loginManager,mprisPlayer,powerUtils}.js Infrastructure modules for authentication, session management, and shared utilities
js/ui/main.js Action mode system for keybinding filtering based on screen state
js/ui/keybindings.js Action mode support for keybindings
files/usr/share/cinnamon/cinnamon-screensaver-command/*.py Replacement screensaver command tool using DBus
data/pam/*.pam PAM configuration files for authentication
debian/* Packaging changes to provide cinnamon-screensaver and add PAM dependencies
*.session.in Removed cinnamon-screensaver as required session component
data/theme/cinnamon-sass/widgets/_screensaver.scss Styling for screensaver widgets and unlock dialog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
return FALSE;
}
return FALSE;
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreachable code: this return statement will never be executed because all paths above either return TRUE or FALSE via goto out.

Copilot uses AI. Check for mistakes.
data->closure->cb_data);
data->should_interrupt_stack = res == FALSE;

g_printerr ("should interrupt: %d\n", data->should_interrupt_stack);
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent use of g_printerr for debug output. This function uses global.log elsewhere but switches to g_printerr here. Consider using consistent logging throughout for better log management and filtering.

Copilot uses AI. Check for mistakes.

// Look up the binding in our keybinding manager
let bindingName = binding.get_name();
let [action_id, entry] = Main.keybindingManager._lookupEntry(bindingName);
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable action_id.

Copilot uses AI. Check for mistakes.

// Get widget's preferred size
let [minWidth, natWidth] = widget.get_preferred_width(-1);
let [minHeight, natHeight] = widget.get_preferred_height(natWidth);
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial value of minHeight is unused, since it is always overwritten.

Copilot uses AI. Check for mistakes.

// If we constrained width, recalculate height with new width
if (widgetWidth < natWidth) {
[minHeight, natHeight] = widget.get_preferred_height(widgetWidth);
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned to minHeight here is unused.

Copilot uses AI. Check for mistakes.
#!/usr/bin/python3

from gi.repository import GLib, Gio
import sys
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'sys' is not used.

Suggested change
import sys

Copilot uses AI. Check for mistakes.
print("cinnamon-screensaver-command (Cinnamon %s)" % version.unpack())
else:
print("cinnamon-screensaver-command (Cinnamon version unknown)")
except:
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except block directly handles BaseException.

Suggested change
except:
except Exception:

Copilot uses AI. Check for mistakes.
@mtwebster
Copy link
Member Author

/generate-test-packages

@github-actions
Copy link

Test packages generated successfully!

Download from the workflow run (available for 7 days).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant