Skip to content

gnome-flashback: fix screenshot key and screen not locking when idle#233920

Merged
bobby285271 merged 1 commit intoNixOS:masterfrom
gazally:gnome-flashback-idle-monitor
Jun 1, 2023
Merged

gnome-flashback: fix screenshot key and screen not locking when idle#233920
bobby285271 merged 1 commit intoNixOS:masterfrom
gazally:gnome-flashback-idle-monitor

Conversation

@gazally
Copy link
Copy Markdown
Contributor

@gazally gazally commented May 25, 2023

These auto-started services are failing to start in the gnome-flashback desktop manager service, leaving warnings in the log:

gnome-flashback-clipboard
gnome-flashback-idle-monitor
gnome-flashback-media-keys

Fix the failures by removing the line from postInstall in the gnome-flashback package which is deleting the executables for those services, which the build creates in $out/libexec.

gnome-flashback-idle-monitor is responsible for sending a dbus message when the system is idle, so without it the screen never dims or locks. When gnome-flashback-media-keys is not running, using the PrtScr key to grab screenshots does not work.

gnome-flashback-clipboard from my cursory inspection of its source deals with streaming large clipboard transfers and translating clipboard formats. I have had copy and paste fail to work on my system before this fix, and haven't seen the problem since, but I don't have a reproducible case.

There's one more warning in the log about gnome-flashback-nm-applet failing to start, but the executable for that one is not present in $out/libexec so it seems to be a separate issue.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@gazally gazally requested a review from jtojnar as a code owner May 25, 2023 04:55
@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label May 25, 2023
@ofborg ofborg bot requested review from amaxine, bobby285271, dasj19 and hedning May 25, 2023 05:13
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels May 25, 2023
@bobby285271 bobby285271 requested a review from chpatrick May 25, 2023 05:18
@bobby285271
Copy link
Copy Markdown
Member

bobby285271 commented May 27, 2023

LGTM 🙃

@ofborg test gnome-flashback

I applied this PR to dd3626c and things became very reasonable to me, at that time there are only two bash scripts in libexec named gnome-flashback-{compiz,metacity} and both calls gnome-session. Since #53695 wants to support custom sessions, things are re-implemented in writeShellScriptBin and nothing in libexec are useful anymore.

I believe in this case there are no reasons to drop gnome-flashback-{clipboard,idle-monitor,media-keys}. I am using this PR and I can (at least) confirm the screenshot key issue is fixed. The only things is that we are re-adding libexec/gnome-flashback-metacity, with a quick look I don't aware of anything that will try exec that so we should be safe.

There's one more warning in the log about gnome-flashback-nm-applet failing to start

Looks like it looks for nm-applet (in networkmanagerapplet), but sounds like some people don't like adding that to desktop modules 😕

@jtojnar
Copy link
Copy Markdown
Member

jtojnar commented May 27, 2023

I would probably still remove gnome-flashback-{compiz,metacity} since having it and not being used can be confusing (e.g. people can try patching it to no effect).

Three autostarted desktop services are failing to start in the
gnome-flashback desktop manager service, leaving warnings in the log:

gnome-flashback-clipboard
gnome-flashback-idle-monitor
gnome-flashback-media-keys

Fix by only remove $out/libexec/gnome-flashback-metacity (which is
still not useful since we implement that ourselves) instead of the
entire $out/libexec.

The consequence of gnome-flashback-idle-monitor not running is that
the desktop manager does not get the message that the system is idle,
so the screen never dims or locks.
@bobby285271 bobby285271 marked this pull request as draft May 31, 2023 08:19
@bobby285271 bobby285271 force-pushed the gnome-flashback-idle-monitor branch from 77eaa01 to 17c59fd Compare May 31, 2023 08:19
@bobby285271 bobby285271 marked this pull request as ready for review May 31, 2023 08:20
@bobby285271
Copy link
Copy Markdown
Member

bobby285271 commented May 31, 2023

Hi @gazally, I force-pushed your branch to apply the suggestions above (and also updated the commit message) 🙇

(gnome-flashback-compiz is gone these days)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 1, 2023

Successfully created backport PR for release-23.05:

@gazally gazally deleted the gnome-flashback-idle-monitor branch June 2, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants