unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@univie.ac.at>
To: 60242@debbugs.gnu.org
Subject: bug#60242: Cannot install a Samba printer
Date: Wed, 21 Dec 2022 17:17:02 +0100	[thread overview]
Message-ID: <87y1r0ag01.fsf@gottlob.mail-host-address-is-not-set> (raw)

Dear Guix maintainers,

I have been trying to set up a Guix system install at work and have hit
a wall related to installing a Samba printer. I believe this is a bug in
the way that either CUPS or Samba are packaged in Guix (but I'm very new
to Guix, so please bear with me). Specifically, installing Samba needs
to provide a link somewhere to the smbspool program in order to make
CUPS aware of it as a backend.

Here are the steps that led me to this issue:

0) I setup CUPS to run in my OS config like:

            (service cups-service-type
                     (cups-configuration
                      (default-paper-size "A4")
                      (web-interface? #t)))

(I have also added my user to the groups "lp" and "lpadmin", though I'm
not sure if that's important.)

1) I tried to add a Samba printer using the system-config-printer program,
following the instructions from my employer 
(https://zid.univie.ac.at/uprint/anleitungen/unter-linux-installieren/).
This goes smoothly until the last step; after entering the printer name,
description, and location, and clicking "Apply", a dialog appears asking
me to authenticate. No matter what credentials I enter here (my own user
account, root's, or my samba domain credentials), this step fails with a
"client-error-not-possible" CUPS server error. No other information is
provided.  

Adding the printer through the CUPS web interface doesn't work either;
there is no option there to install a Samba printer. 

Here is what I've been able to learn through my own troubleshooting:

Elsewhere on the web, people who have the same issue generally report
that it's fixed by installing the "smbclient" package. Guix has no such
package; so I installed the "samba" package (although I do not want to
run a samba server) to get access to the client utilities. 

I made some progress by directly copying a working <Printer> config
for this printer from another machine into /etc/cups/printers.conf and
restarting CUPS. This at least added the printer to CUPS, so that I can
see it in the system-config-printer GUI and in the CUPS web interface.
In the latter, I now see a more informative error in the printer's
status field:

"Backend /gnu/store/xl7mglavpkc4gjh7m53d0wf55mifnqy3-cups-server-bin/lib/cups/backend/smb does not exist!"

The other machine where I have this printer configured is running Debian.
On Debian, installing the smbclient package creates a symlink at
/usr/lib/cups/backend/smb to /usr/bin/smbspool. This is what appears to
be missing in Guix.

The smbspool program is installed in Guix via the samba package at
/gnu/store/4fpyn089b3873ci591935nqd8d5g8zdw-samba-4.16.4/bin/smbspool.
(I can send jobs to the Samba printer on Guix if I manually call
smbspool.) But no corresponding symlink to this program is created in
the lib/cups/backend directory when the samba package is installed,
which appears to the source of the error above.

(It *could* be that the absence of this symlink is also the source of
the client-error-not-possible in the system-configure-printer GUI; I'm
not sure.)

I'm not sure what the right way to create such a symlink on Guix would
be, but it seems like its absence makes it impossible to install and use
a Samba printer.

As I said, I *believe* this is a bug in how Samba and/or CUPS is
packaged; but if there's some additional configuration I could do to get
this working, please let me know!

Many thanks for your help,
Richard 





                 reply	other threads:[~2022-12-22  1:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1r0ag01.fsf@gottlob.mail-host-address-is-not-set \
    --to=richard.lawrence@univie.ac.at \
    --cc=60242@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).