Request for auto-connection of cups-control for Brave

Hi,

I’m an engineer at Brave and I’d like to request auto-connection for cups-control for the Brave browser package.

This has been requested by users (https://github.com/brave/brave-browser/issues/13565#issuecomment-839626277) and also granted to other browsers (Firefox, Chromium).

Thanks.

1 Like

cups-control provides both the ability to print AND to configure printers so this is not normally auto-connected. However, there is the cups interface which can allow just printing but this is still a bit of a work-in-progress. We have a precedent of other browsers auto-connecting cups-control (firefox and chromium come to mind) as this is quite a standard workflow for most users. As such, +1 from me for auto-connect of cups-control for brave - can I please ask that once the cups interface is more complete that brave would move to this instead?

+1 from me for auto-connect cups-control to brave. +2 votes for, 0 votes against, granting auto-connect of cups-control to brave. This is now live.

Thanks!

@alexmurray regarding a potential future switch from cups-control to cups - I do see value in the distinction - some software only needs to print - but a browser could reasonably be used to add a new printer. Especially these days, when office suites run in the browser, rather than as separate standalone applications.

The first time a user wants to print something, before a printer is added, is not unlikely to be in a browser. The dialogs displayed will include an option to manage printers, so if that doesn’t work, it will be perceived as a bug (especially given the lack of a specific error message explaining the lack of permissions).

If the average snap user understood plugs and how they need to connect them manually sometimes (and how to actually do it), that would be fine. But it seems the average user isn’t even aware that they’re running a snap version of the browser…

@emitorino @alexmurray please reinstate the cups-control auto-connection for Brave.

We tried switching to cups, but that was not successful. Users reported issues with printing and with snap warnings about invalid plugs (Following official docs for cups results in invalid plug warnings), so we had to revert to cups-control, but it’s now no longer auto-connected.

https://github.com/brave/brave-browser/issues/34238

I tested it and got no warning. Built it locally.

EDIT:

snap warnings
last-occurrence:  9 days ago, at 10:49 IST
warning: |
  snap "savedesktop" has bad plugs or slots: dot-local-and-config (cannot add personal-files plug:
  "$HOME/.config/*" contains a reserved apparmor char from ?*[]{}^")
---
last-occurrence:  9 days ago, at 11:00 IST
warning: |
  snap "savedesktop" has bad plugs or slots: dot-local-and-config (cannot add personal-files plug:
  "$HOME/.config/" cannot end with "/")
---
last-occurrence:  6 days ago, at 00:51 IST
warning: |
  snap "brave" has bad plugs or slots: content (content plug must contain target path)

@emitorino @alexmurray ping

Hey @wknapik ,

From what I see the auto-connection for cups-control is still set. I disabled it and granted it again but seems the issue is still present.

@pedronis do you know why this can happen and what should we do to fix it?

So this appears to be an issue when the cups snap is installed - since it provides a cups-control slot and there is the implicit cups-control slot provided by the system, snapd does not know which one to connect to, and so connects neither. This will need a bit more investigation but I think it should be possible to solve it - but we need some guidance from @pedronis or someone on the snapd team to advise on the best solution here.

I think this work by the desktop team might help:

https://github.com/snapcore/snapd/pull/12965

cc @jamesh

This is still an issue. We still don’t get the autoconnection, neither on existing, nor fresh installs. This is causing issues for users. Is a fix in the works? It’s been almost 2 months…

Seems like the change from the above PR is not released yet. When might that happen?

@pedronis do you know when the next snapd release is happening?

Thanks!

Not yet, that would be 2.62. If this is perceived as more urgent and we need to do a 2.61.x release, it could be possibly be included into that.

@wknapik hey, does this ^ work for brave-browser?

Hi @emitorino, sorry for the late reply. For Brave users there’s reported breakage for a while now, so the sooner the fix goes out, the better.

1 Like

I moved it for inclusion in our next 2.61.x release

1 Like

@wknapik from what I can see the changes are already included in snapd so I am removing this request from our review queue. Feel free to write here again if you have any further question/issue.

Thanks!

@emitorino I’m on snapd 2.61.3 and I see cups-control autoconnected after snap remove brave && snap install brave, so looks like this is indeed resolved, thanks!

1 Like