printer and cups

Arch based Porteus community project

Moderator: M. Eerie

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#1 by vinnie » 30 Jul 2024, 14:18

I am (also) trying to set up a laser brother. I am not an expert and have been searching.
I came across this forum (coincidentally the same printer and recent message), unfortunately the “sane-airprint” package does not seem to exist in the arch repos (but sane-airscan is there...).
However, I searched the internet and cups looks like it should support airprint.
Continuing the search, I found this command

Code: Select all

avahi-daemon
avahi-browse -rt _ipp._tcp > discovered
And yes my printer is seen in the network!

Code: Select all

+   eth0 IPv6 Brother MFC-L2710DW series                    Internet Printer     local
+   eth0 IPv4 Brother MFC-L2710DW series                    Internet Printer     local
=   eth0 IPv6 Brother MFC-L2710DW series                    Internet Printer     local
   hostname = [BRWD88083FC14A1.local]
   address = [192.168.8.111]
   port = [631]
   txt = ["mopria-certified=2.1" "print_wfds=T" "UUID=e3248000-80ce-11db-8000-b42200a249ba" "PaperMax=legal-A4" "kind=document,envelope,label,postcard" "URF=W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1" "rfo=ipp/faxout" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=T" "Duplex=T" "Copies=T" "Color=F" "usb_CMD=PJL,HBP,URF" "usb_MDL=MFC-L2710DW series" "usb_MFG=Brother" "priority=25" "adminurl=http://BRWD88083FC14A1.local./net/net/airprint.html" "product=(Brother MFC-L2710DW series)" "ty=Brother MFC-L2710DW series" "note=" "rp=ipp/print" "pdl=application/octet-stream,image/urf,image/pwg-raster" "qtotal=1" "txtvers=1"]
=   eth0 IPv4 Brother MFC-L2710DW series                    Internet Printer     local
   hostname = [BRWD88083FC14A1.local]
   address = [192.168.8.111]
   port = [631]
   txt = ["mopria-certified=2.1" "print_wfds=T" "UUID=e3248000-80ce-11db-8000-b42200a249ba" "PaperMax=legal-A4" "kind=document,envelope,label,postcard" "URF=W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1" "rfo=ipp/faxout" "TBCP=F" "Transparent=T" "Binary=T" "PaperCustom=T" "Scan=T" "Fax=T" "Duplex=T" "Copies=T" "Color=F" "usb_CMD=PJL,HBP,URF" "usb_MDL=MFC-L2710DW series" "usb_MFG=Brother" "priority=25" "adminurl=http://BRWD88083FC14A1.local./net/net/airprint.html" "product=(Brother MFC-L2710DW series)" "ty=Brother MFC-L2710DW series" "note=" "rp=ipp/print" "pdl=application/octet-stream,image/urf,image/pwg-raster" "qtotal=1" "txtvers=1"]
So I want to try to configure the printer and starting cupsd I open the “http://localhost:631/” panel, press on “Administration” and there is no way to enter with the password: “Internal Server Error”
I have tried everything, add a password to the user, add root to the lp group, add a new group in /etc/cups/cupds.conf and run it with 'cupsd -c /etc/cups/cupsd.conf' each time restarting cupsd. I also tried launching the browser from root.
In one forum I found the advice to use “system-config-printer”, it opens and also sees the printer but when I try to add my networkprinter: "CUPS server error (fetching PPDs) there was an error during the CUPS operation: 'Internal Server Error'. " :wall:

The only thing I can think of is that I have some problem with cups and try to install from aur “cups-git”.
Edit: No, not possible, cups-git in aur is made to work with systemd. I hate systemd.

beny
Full of knowledge
Full of knowledge
Posts: 2183
Joined: 02 Jan 2011, 11:33
Location: italy

printer and cups

Post#2 by beny » 30 Jul 2024, 15:58

Code: Select all

  => 49
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  brother-mfc-l2710dw-4.0.0-1

:: Downloaded PKGBUILD (1/1): brother-mfc-l2710dw
  1 brother-mfc-l2710dw                      (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
:: (1/1) Parsing SRCINFO: brother-mfc-l2710dw
==> Creazione del pacchetto: brother-mfc-l2710dw 4.0.0-1 (mar 30 lug 2024, 17:55:36)
==> Download dei sorgenti in corso...
  -> Download di mfcl2710dwpdrv-4.0.0-1.i386.rpm in corso...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  129k  100  129k    0     0   460k      0 --:--:-- --:--:-- --:--:--  461k
==> Validazione di source file con sha256sums...
    mfcl2710dwpdrv-4.0.0-1.i386.rpm ... Verificato
==> Creazione del pacchetto: brother-mfc-l2710dw 4.0.0-1 (mar 30 lug 2024, 17:55:37)
==> Controllo delle dipendenze durante l'avvio in corso...
==> Controllo delle dipendenze durante la compilazione in corso...
==> Download dei sorgenti in corso...
  -> È stato trovato mfcl2710dwpdrv-4.0.0-1.i386.rpm
==> Validazione di source file con sha256sums...
    mfcl2710dwpdrv-4.0.0-1.i386.rpm ... Verificato
==> Rimozione dell'esistente directory $srcdir/ in corso...
==> Estrazione dei sorgenti in corso...
  -> Estrazione di mfcl2710dwpdrv-4.0.0-1.i386.rpm usando bsdtar in corso...
==> I sorgenti sono pronti.
==> Creazione del pacchetto: brother-mfc-l2710dw 4.0.0-1 (mar 30 lug 2024, 17:55:38)
==> Controllo delle dipendenze durante l'avvio in corso...
==> Controllo delle dipendenze durante la compilazione in corso...
==> ATTENZIONE: Sto usando il tree esistente di $srcdir/
==> Entro nell'ambiente fakeroot...
==> Avvio di package() in corso...
==> Rimozione dei dati superflui in corso...
  -> Rimozione dei file libtool in corso...
  -> Eliminazione dei file indesiderati in corso...
  -> Rimozione dei file dalle librerie statiche...
  -> Rimozione dei simboli non necessari dai binari e dalle librerie in corso...
strip: Impossibile riconoscere il formato del file di input "./usr/share/brother/Printers/MFCL2710DW/lpd/armv7l/brprintconflsr3"
strip: Impossibile riconoscere il formato del file di input "./usr/share/brother/Printers/MFCL2710DW/lpd/armv7l/rawtobr3"
  -> Compressione delle pagine man ed info in corso...
==> Controllo per il rilascio dei pacchetti in corso...
==> Creazione del pacchetto "brother-mfc-l2710dw" in corso...
  -> Generazione del file .PKGINFO in corso...
  -> Generazione del file .BUILDINFO in corso...
  -> Aggiunta del file install in corso...
  -> Creazione del file .MTREE in corso...
  -> Compressione del pacchetto in corso...
==> Creazione del pacchetto "brother-mfc-l2710dw-debug" in corso...
  -> Generazione del file .PKGINFO in corso...
  -> Generazione del file .BUILDINFO in corso...
  -> Creazione del file .MTREE in corso...
  -> Compressione del pacchetto in corso...
==> Uscita dall'ambiente di fakeroot.
==> Compilazione terminata: brother-mfc-l2710dw 4.0.0-1 (mar 30 lug 2024, 17:55:41)
==> Pulizia in corso...
caricamento dei pacchetti in corso...
risoluzione delle dipendenze in corso...
ricerca dei pacchetti in conflitto in corso...

Pacchetti (2) brother-mfc-l2710dw-4.0.0-1  brother-mfc-l2710dw-debug-4.0.0-1

Dimensione totale dei pacchetti da installare:  0,40 MiB

:: Vuoi procedere con l'installazione? [S/n] 
(2/2) verifica delle chiavi presenti nel porta...  [######################] 100%
(2/2) verifica dell'integrità dei pacchetti        [######################] 100%
(2/2) caricamento dei file dei pacchetti           [######################] 100%
(2/2) controllo dei conflitti in corso             [######################] 100%
(2/2) controllo dello spazio disponibile sul disco [######################] 100%
:: Elaborazione delle modifiche al pacchetto...
(1/2) installazione in corso di brother-mfc-l2...  [######################] 100%
Restart CUPS (org.cups.cupsd.service) in order to load the new files.
Register the new print at "http://localhost:631/".

  To avoid errors like "Unable to locate printer..." when printing via network:
  Add the printer with its socked address "socket://<printer ip>:9100"
(2/2) installazione in corso di brother-mfc-l2...  [######################] 100%
:: Esecuzione degli hook di post-transazione...
(1/1) Arming ConditionNeedsUpdate...
[beny@archlinux ~]$ 

                                                                                                               

beny
Full of knowledge
Full of knowledge
Posts: 2183
Joined: 02 Jan 2011, 11:33
Location: italy

printer and cups

Post#3 by beny » 30 Jul 2024, 16:15

hi vinnie depend also

Code: Select all

  # Generated by makepkg 6.1.0
# using fakeroot version 1.35
pkgname = brother-mfc-l2710dw
pkgbase = brother-mfc-l2710dw
xdata = pkgtype=pkg
pkgver = 4.0.0-1
pkgdesc = LPR and CUPS driver for the Brother MFC-L2710DW
url = http://solutions.brother.com/linux/en_us/
builddate = 1722354938
packager = Unknown Packager
size = 375715
arch = x86_64
license = custom:Brother commercial license
depend = cups
depend = lib32-glibc
                                                               

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#4 by vinnie » 30 Jul 2024, 16:17

I had seen that package on aur though aside from the last update being 6 years ago, it depends on cups.
I can always try it although I am a bit doubtful.

beny
Full of knowledge
Full of knowledge
Posts: 2183
Joined: 02 Jan 2011, 11:33
Location: italy

printer and cups

Post#5 by beny » 30 Jul 2024, 16:53

hi, brother printer it release driver for 32 bit system,so you have to add to the system the lib32-glibc,but i can go wrong on this...if work without driver is ok

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#6 by vinnie » 30 Jul 2024, 20:38

no, the problem is cups.
I can't use it in any way, it keeps giving me server error

beny
Full of knowledge
Full of knowledge
Posts: 2183
Joined: 02 Jan 2011, 11:33
Location: italy

printer and cups

Post#7 by beny » 30 Jul 2024, 21:12

Code: Select all

  [guest@porteus ~]$ sudo pman -Sy cups-openrc
[sudo] password for root: 
:: Synchronizing package databases...
 system is up to date
 world is up to date
 galaxy is up to date
 extra is up to date
resolving dependencies...
looking for conflicting packages...

Package (8)           New Version  Net Change  Download Size

world/avahi-openrc    20210505-2     0.00 MiB       0.00 MiB
world/cups            2:2.4.9-1     12.72 MiB       5.16 MiB
world/cups-filters    2.0.0-1        1.17 MiB       0.19 MiB
world/libcupsfilters  2.0.0-2        1.67 MiB       0.60 MiB
world/libpaper        2.2.5-1        0.14 MiB               
world/libppd          2.0.0-1        0.95 MiB       0.31 MiB
world/qpdf            11.9.1-1       3.24 MiB       0.98 MiB
world/cups-openrc     20210505-2     0.00 MiB       0.00 MiB
                                                

beny
Full of knowledge
Full of knowledge
Posts: 2183
Joined: 02 Jan 2011, 11:33
Location: italy

printer and cups

Post#8 by beny » 30 Jul 2024, 21:13

ok try if this is ok now i install on my system you have to start the service
[guest@porteus ~]$ sudo rc-update add cupsd
* service cupsd added to runlevel default
[guest@porteus ~]$ sudo rc-service cupsd start
* Caching service dependencies ... [ ok ]
* Starting avahi-daemon ...
but cupsd don't start with sudo you need su root with sudo give an error, someone can explain this

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#9 by vinnie » 31 Jul 2024, 01:38

but are you sure that you are using nemesis?

Code: Select all

[porteus guest]# rc-update add cupsd
 * rc-update: service `cupsd' does not exist
avahi seems to be already installed and working, while cups is not and you have to install it with pmod

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4076
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

printer and cups

Post#10 by ncmprhnsbl » 31 Jul 2024, 01:47

vinnie wrote:
31 Jul 2024, 01:38
rc-update: service `cupsd' does not exist
world/cups-openrc : you have this too?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#11 by vinnie » 31 Jul 2024, 10:10

No! I simply installed cups, that package had escaped me!
Surely it's from artix, now i have to go out but in these days i'll try it!
Thanks!

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#12 by vinnie » 01 Aug 2024, 19:00

ncmprhnsbl wrote:
31 Jul 2024, 01:47
world/cups-openrc : you have this too?
Ok, I had time to test it, with this package the command "rc-service cups start" works (after adding the group with "groupadd cups; usermod -aG cups root")
however it still fails to log in as administrator in "http://localhost:631/admin".

I did some research and came to this message:
The problem is that I'm still going on without saving any nemesis state, if I restart I shouldn't get any results.
I don't know if that's the problem, but if it is, how could I avoid rebooting?


Edit:
Okay, I was able to print once, I had to create a save file and restart though.
Unfortunately I don't really know how it works yet and I created a xzm, then I made some changes and did the printing and created another xzm deleting the first one and after the reboot I realized that the saves is layers style only with modified things so I lost my changes.
I want to describe the procedure I did to install the printer, now I'm going to do it very roughly because I'm going to have to do it all over again anyway when I get a better understanding of how to create the save files.


procedure
1 pmod cups-openrc ghostscript #ghostscript is also necessary
2 rc-update add cupsd default #add cupsd to services in autostart
3 maybe is necessary to create a cups group and add root to it, I need to verify
4 save changes and reboot
5 http://localhost:631/admin #root user and password
6 add printer
7 select the printer and for connection fileld add ipp://192.168.x.x/ipp/print #the address of the printer can be found with command "avahi-browse -rt _ipp._tcp", if this output contain also the field "rp=/ipp/print" you have to add /print to the end of this url as I did
8 keep configurating till you have to select ppd file, do not insert anything and select "*everywhere" kind of printer
9 continue until configuration is finished, try a printout, if everything works, make another save.

I tried to merge several saves created with the system tool "system > nemesis save session > save to module" but I could not unzip the modules with xzm2dir, it gives me an error:

Code: Select all

xzm2dir ./hanges-240801.xzm ./asd/
 $2 does not exist.
how can you always create one save instead of a series of updates? i don't like that there are multiple files, i prefer everything to be inside one module.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4076
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

printer and cups

Post#13 by ncmprhnsbl » 02 Aug 2024, 03:51

vinnie wrote:
01 Aug 2024, 19:00
2 rc-update add cupsd default #add cupsd to services in autostart
the config/services file can be used as well (though not for this process without rebooting) ..but, having the /etc/init.d and /etc/runlevels/default symlink in your module is probably better in this case anyway.
vinnie wrote:
01 Aug 2024, 19:00
3 maybe is necessary to create a cups group and add root to it, I need to verify
certainly the cups group is needed, though it might be made/added by the package installation, so /etc/groups will be needed in your module (as grabbing your changes will do)
looking at https://wiki.archlinux.org/title/CUPS#Configuration doesn't seem to suggest that any user(or root) needs to be a member of it though. (the polkit rule trick there may be useful)
vinnie wrote:
01 Aug 2024, 19:00
could not unzip the modules with xzm2dir, it gives me an error:
with nemesis' version of xzm2dir ./asd should be an existing directory and probably no trailing / .. (ie. mkdir ./bar && xzm2dir ./foo.xzm ./bah)
the other thing is that 'save to module' may include whiteouts , which can be a problem if you're trying to extract a module inside the live system instead of an outside mounted partition for example..
the changes-time tool might be useful here too, to avoid extraneous stuff..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

vinnie
Samurai
Samurai
Posts: 112
Joined: 13 Jun 2024, 08:25
Distribution: alpine

printer and cups

Post#14 by vinnie » 03 Aug 2024, 17:52

ncmprhnsbl wrote:
02 Aug 2024, 03:51
the config/services file can be used as well (though not for this process without rebooting) ..but, having the /etc/init.d and /etc/runlevels/default symlink in your module is probably better in this case anyway.
Yes, it's necessary to reboot and I am not sure what files are created and I need to save.
ncmprhnsbl wrote:
02 Aug 2024, 03:51
certainly the cups group is needed, though it might be made/added by the package installation, so /etc/groups will be needed in your module (as grabbing your changes will do)
looking at https://wiki.archlinux.org/title/CUPS#Configuration doesn't seem to suggest that any user(or root) needs to be a member of it though. (the polkit rule trick there may be useful)
on installation of the package is not created, I know because it gave me error, however I do not know if it is created on reboot.

ncmprhnsbl wrote:
02 Aug 2024, 03:51
with nemesis' version of xzm2dir ./asd should be an existing directory and probably no trailing / .. (ie. mkdir ./bar && xzm2dir ./foo.xzm ./bah)
the other thing is that 'save to module' may include whiteouts , which can be a problem if you're trying to extract a module inside the live system instead of an outside mounted partition for example.
I pasted the output because actually the error was a bit strange, I had created the dir .
although I don't know what it is, I think it is more likely that the case is your second guess

ncmprhnsbl wrote:
02 Aug 2024, 03:51
the changes-time tool might be useful here too, to avoid extraneous stuff..
you are right, maybe it is the best idea, however the value in minutes that is asked for is value that changes according to the time when one launches the script and of which one should take note and calculate.
I used to use a similar (or perhaps virtually identical) system a while back, but it relied on using a marker.
Example:

Code: Select all

touch /tmp/marker
#...make all changes
find /start/dir -newer /tmp/marker
In your script it looks very similar:

Code: Select all

find $changes -mmin -$time 

I wonder if you could also add this option of creating a marker and specifying it instead of entering the number of minutes or it might also be useful to hand-enter a previously annotated time stamp such as "h : m : s" so that the script calculates the time by itself.
I can pass you the script I used, but it is much less efficient than yours, it is very slow to find changes.

Post Reply