Skip to content

feat: Update toggle-cups to enable use of USB connected printers/scanners#1135

Merged
RoyalOughtness merged 36 commits intolivefrom
unknown repository
Jul 16, 2025
Merged

feat: Update toggle-cups to enable use of USB connected printers/scanners#1135
RoyalOughtness merged 36 commits intolivefrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 20, 2025

@ghost ghost requested a review from RoyalOughtness as a code owner June 20, 2025 05:46
@ghost ghost changed the title feat: Update toggles.just for better documentation of printers/scanners using ipp-usb feat: Update toggle-cups to enable use of USB connected printers/scanners Jun 28, 2025
@ghost ghost requested a review from RoyalOughtness June 30, 2025 08:41
@ghost
Copy link
Copy Markdown
Author

ghost commented Jun 30, 2025

Hopefully this will be the last commit.

Changes are as follows:

  1. avahi-daemon (both .service and .socket) are unmasked when ujust toggle-cups is ran.
  2. avahi-daemon.service and avahi-daemon.socket are disabled. As ipp-usb.service will automatically start avahi-daemon when a printer/scanner is connected. avahi-daemon does not have to be enabled to make plug-n-play printing/scanning work.
  3. Default systemd unit files of avahi-daemon are overridden. Two systemd.unit options are toggled, StopWhenUnneeded and RefuseManualStart. The first option stops avahi-daemon when it is not in use, meaning once the printer/scanner is disconnected, avahi-daemon will be stopped. This would cause no breakage since it only exits when no system service Wants/Requires it. The second option disallows manually starting avahi-daemon to avoid confusion. Since avahi-daemon immediately exits when it's started manually, without any system services Want-ing/Require-ing it. Disallowing manual start of avahi-daemon would have no impact on ordinary users.
  4. The overriding systemd unit files are removed when CUPS is disabled, and avahi-daemon (both .service and .socket) are re-masked.

Impacts:

  1. When CUPS is enabled, avahi-daemon is started on-demand. Meaning that it will be started automatically when needed, and stopped when unused. These all happen automatically, without the need of users' intervention.

@ghost ghost requested review from RoyalOughtness and nihil-admirari July 12, 2025 04:14
RoyalOughtness
RoyalOughtness previously approved these changes Jul 13, 2025
Copy link
Copy Markdown
Collaborator

@Rubiginosa Rubiginosa left a comment

Choose a reason for hiding this comment

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

i like it, this is more explicit anyway

@RoyalOughtness RoyalOughtness merged commit e7cde46 into secureblue:live Jul 16, 2025
19 checks passed
RoyalOughtness pushed a commit to RoyalOughtness/secureblue-dev that referenced this pull request Aug 4, 2025
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.

4 participants