Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network Printer
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Mon Aug 30, 2021 9:33 am    Post subject: Network Printer Reply with quote

Hello, I'm trying to configure my stamoante smasung ml (attached to the raspberry and configure, via cups as a network printer). I then installed cups and avahi (and set zeroconf as use flag) then I installed system-config-printer, the printer is seen by the system but I can't print anything ... do you have any ideas?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Aug 31, 2021 3:00 am    Post subject: Reply with quote

I've never heard of anybody installing app-admin/system-config-printer. There is a GUI in your browser at localhost:631.

Does the printer work? How do you know? Maybe tell us the model of the printer. How is it connected to the Pi?

Are you trying to print from the Raspberry Pi or from another computer? If from another computer, does it print from the Pi? Is the Pi set up as a CUPS server?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Aug 31, 2021 6:19 am    Post subject: Reply with quote

the printer (samsung ml1660) is connected to the raspberry via usb port, on the server I have installed and configured cups and it works from the raspberry and it works from any other pc in the house, it does not work only from the machine on which I am running gentoo (on gentoo i also installed cups)
as I said, on gentoo I see it but if I send any document to print it does not print anything (cups is installed on gentoo but I have not configured anything since the printer is not physically connected to the pc in question).
If I select the printer (therefore not the one installed via system-config-printer) I get the warning: "Cannot start the printer. Check its configuration".
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Aug 31, 2021 4:53 pm    Post subject: Reply with quote

I followed this guide: https://wiki.gentoo.org/wiki/Printing

I set up printing group for my user and I moved the /etc/cups/cupsd.conf file with my IP address (that of the server running cups and to which the printer is connected) once I have saved the file and restarted the daemon, the network printer is gone, I can't detect it anymore ....
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Aug 31, 2021 5:34 pm    Post subject: Reply with quote

I don't think copying configuration files from the Pi will get you a working solution.

Two choices. Set up the printer manually as a network printer on your Gentoo machine to print to the printer through the Pi host.

The drivers for your printer are part of the net-print/splix package. I have them on my Gentoo system at:
/usr/share/cups/model/samsung/ml1660.ppd.gz

Install splix and then go through the printer setup in CUPS: localhost:631

You should also install net-print/cups-filters and if you activate /etc/init.d/cups-browsed (/etc/init.d/cups-browsed start) it's likely to find the printer for you.

Or, if this is the only printer you want to print to, make the Gentoo box a slave to print to the default Pi printer using /etc/cups/client.conf:
Code:
$ cat /etc/cups/client.conf
#ServerName localhost:631
#ServerName jerusalem:631
ServerName 192.168.1.103:631
#ServerName /run/cups/cups.sock

Change the IP address 192.168.1.103 to the IP address of the Pi.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Aug 31, 2021 6:00 pm    Post subject: Reply with quote

but I have not copied the file from the pi, I configured the file following the guide I posted but inserting the ip of the pi, however I install the packages you said and you say
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Aug 31, 2021 6:44 pm    Post subject: Reply with quote

Very well. Perhaps you should reverse the moving of the cupsd.conf file, since doing that is what made the printer disappear. Ordinarily, the user doesn't need to manually edit the cupsd.conf. Perahps copy a cupsd.conf from one of the working computers.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Aug 31, 2021 10:37 pm    Post subject: Reply with quote

ok, it finally works! Thanks for your help :)
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Wed Sep 01, 2021 12:11 am    Post subject: Reply with quote

Well done. What was your solution?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Wed Sep 01, 2021 7:08 am    Post subject: Reply with quote

I used the second solution you wrote
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Mon Oct 18, 2021 1:40 pm    Post subject: Reply with quote

Another small problem, I also have a scanner (epson) that I cannot configure in any way, I installed the drivers but the system does not see it, I tried to type from the browser localhost: 631 but it does not open the page (I assume by way of the fact that it doesn't have https) what can I do?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Mon Oct 18, 2021 2:30 pm    Post subject: Reply with quote

Be sure that the specific backend for the scanner is included (preferably near the top) of /etc/sane.d/dll.conf
Code:
net
# Add support for the HP-specific backend.  Needs net-print/hplip installed.
hpaio
# Add support for the Epson-specific backend.  Needs media-gfx/iscan installed.
epkowa

Also, for remote scanning, you need to run saned on the host computer. You also need to edit /etc/sane.d/net.conf
Code:
localhost
192.168.0.204
#jeremiah

The IP address is my networked HP LaserJet 3055. localhost covers my USB connected Epson Perfection V500 Photo.

Also, you won't find your scanner at port 631.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Mon Oct 18, 2021 4:07 pm    Post subject: Reply with quote

the printer is attached directly to the pc via USB cable
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Mon Oct 18, 2021 4:21 pm    Post subject: Reply with quote

The URL http://localhost:631 (note: NO space) should bring up the CUPS management interface. This is not related to the scanner nor saned.

The host needs to give the client permission to use the scanner (saned). Be sure to add that to saned.conf. In my case, I give permission to my entire LAN with the following:
Code:
#scan-client.somedomain.firm
192.168.0.0/24

or you can give permission to just a single client's IP address.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Mon Oct 18, 2021 4:24 pm    Post subject: Reply with quote

the problem is that typing the localhost:631 does not make me connect to the page, I tried to enable ssl but the thing remains the same

I am referring to the ip of the patch on which gentoo is running and on which I have previously installed cups
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Mon Oct 18, 2021 4:42 pm    Post subject: Reply with quote

I don't understand the term "the patch" but to connect a browser to localhost:631, cupsd must be running.
Code:
/etc/init.d/cupsd start

In order to make cupsd run at startup:
Code:
rc-update add cupsd default

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Oct 19, 2021 9:15 am    Post subject: Reply with quote

this is my /etc/sane.d/dll.conf:

Quote:
# dll.conf - Configuration file for the SANE dynamic backend loader
#
# Backends can also be enabled by configuration snippets under the dll.d/
# directory -- third party backends can drop their configuration file in
# this in this directory, named after the backend.
#
# The next line enables the network backend; comment it out if you don't
# need to use a remote SANE scanner over the network -- see sane-net(5)
# and saned(8) for details.
net
abaton
agfafocus
apple
artec
artec_eplus48u
as6e
avision
bh
canon
canon630u
canon_dr
canon_lide70
#canon_pp
cardscan
coolscan
#coolscan2
coolscan3
#dc210
#dc240
#dc25
dell1600n_net
dmc
epjitsu
epson
epson2
epsonds
escl
fujitsu
genesys
#gphoto2
gt68xx
hp
hp3500
hp3900
hp4200
hp5400
hp5590
hpljm1005
hpsj5s
hs2p
ibm
kodak
kodakaio
kvs1025
kvs20xx
kvs40xx
leo
lexmark
ma1509
magicolor
matsushita
microtek
microtek2
mustek
#mustek_pp
mustek_usb
mustek_usb2
nec
niash
#p5
pie
pieusb
pint
pixma
plustek
#plustek_pp
#pnm
qcam
ricoh
ricoh2
rts8891
s9036
sceptre
sharp
sm3600
sm3840
snapscan
sp15c
#st400
#stv680
tamarack
teco1
teco2
teco3
#test
u12
umax
umax1220u
#umax_pp
v4l
xerox_mfp
# Add support for the HP-specific backend. Needs net-print/hplip installed.
hpaio
# Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
epkowa


this is my /etc/sane.d/net.conf:

Code:
# This is the net backend config file.

## net backend options
# Timeout for the initial connection to saned. This will prevent the backend
# from blocking for several minutes trying to connect to an unresponsive
# saned host (network outage, host down, ...). Value in seconds.
# connect_timeout = 60

## saned hosts
# Each line names a host to attach to.
# If you list "localhost" then your backends can be accessed either
# directly or through the net backend.  Going through the net backend
# may be necessary to access devices that need special privileges.
# localhost

localhost
192.168.1.2
#jean


my saned.conf:

Quote:
#scan-client.somedomain.firm


cups is active at system startup
the printer in question (epson stylus sx400) is directly connected to the pc where gentoo is running, and not to the raspberry pi as for the samsung, that's why I thought of configuring it directly from cups by opening it on the browser, but unfortunately it doesn't open it, so I do not know how to do
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Oct 19, 2021 4:37 pm    Post subject: Reply with quote

Just restating that printing and scanning are unrelated. Consider it two separate devices.
CUPS is unrelated to SANE and cupsd is unrelated to saned.

Since the cups web interface should work by default, is cupsd really running?
Code:
$ ps ax |grep cupsd
 4546 ?        Ss     0:08 /usr/sbin/cupsd -f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf

What is the output of /etc/init.d/cupsd status?

What's the output of nmap -A localhost?

Is there a firewall on the host possibly blocking port 631? (printing)

I would consider purging cups:
Code:
emerge -c net-print/cups

Then manually remove any residual related files, i.e. /etc/cups especially, then start over.

A newly installed cups, with cupsd running, with default cups configuration should give you a clean web interface.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Oct 19, 2021 4:41 pm    Post subject: Reply with quote

Regarding your scanner(s), could there be a firewall issue?

What backend(s) does your scanner use?

What's the output of sane-find-scanner and/or scanimage -L?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Oct 19, 2021 6:23 pm    Post subject: Reply with quote

the output:

Quote:
jean@gentoo ~ $ ps ax |grep cupsd
2442 ? Ss 0:00 /usr/sbin/cupsd -f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf
3325 pts/0 S+ 0:00 grep --colour=auto cupsd
jean@gentoo ~ $ /etc/init.d/cupsd status
* status: started
jean@gentoo ~ $ nmap -A localhost
bash: nmap: comando non trovato
jean@gentoo ~ $ sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.
# Also you need support for SCSI Generic (sg) in your operating system.
# If using Linux, try "modprobe sg".

could not open USB device 0x0dda/0x2026 at 001:004: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x25a7/0xfa67 at 003:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x04d9/0x048e at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
# No USB scanners found. If you expected something different, make sure that
# you have loaded a kernel driver for your USB host controller and have setup
# the USB system correctly. See man sane-usb for details.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
jean@gentoo ~ $ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).



As for uninstalling cups and reinstalling it as soon as I have 5 minutes I try
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Oct 19, 2021 6:39 pm    Post subject: Reply with quote

Install nmap. It's an invaluable network took. Then retry the command "nmap -A localhost"
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Tue Oct 19, 2021 7:49 pm    Post subject: Reply with quote

Quote:
gentoo /home/jean # nmap -A localhost
Starting Nmap 7.92 ( https://nmap.org ) at 2021-10-19 21:47 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000069s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 998 closed tcp ports (reset)
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.6 (protocol 2.0)
| ssh-hostkey:
| 3072 62:a1:53:15:d6:d1:2a:ba:98:72:cd:b2:93:de:3a:42 (RSA)
| 256 e8:5f:1e:21:90:51:d9:7f:9d:d6:de:b9:f9:5b:80:5b (ECDSA)
|_ 256 19:87:0b:31:19:47:24:fd:0f:a5:f5:db:65:31:2c:0a (ED25519)
631/tcp open ipp CUPS 2.3
| http-robots.txt: 1 disallowed entry
|_/
|_http-title: Home - CUPS 2.3.3op2
|_http-server-header: CUPS/2.3 IPP/2.1
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6.32
OS details: Linux 2.6.32
Network Distance: 0 hops

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.83 seconds


once i uninstall cups, how do i know which files or folders are left installed?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Oct 19, 2021 8:11 pm    Post subject: Reply with quote

I was primarily thinking of /etc/cups

Probably best to just rename, i.e. 'mv /etc/cups /etc/cups.backup'
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
GianGian2387
Apprentice
Apprentice


Joined: 03 Jun 2021
Posts: 155

PostPosted: Thu Oct 21, 2021 7:25 am    Post subject: Reply with quote

I entered the following line in my make.conf: SANE_BACKENDS = "epson2" (I had previously checked the list and it is the correct one) and continued with the configuration of sane:

Quote:
jean@gentoo ~ $ emerge -pv sane-backends

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] media-gfx/sane-backends-1.0.31-r2::gentoo USE="ipv6 usb zeroconf -gphoto2 -snmp -systemd -threads -v4l -xinetd" ABI_X86="(64) -32 (-x32)" SANE_BACKENDS="epson2 -abaton -agfafocus -apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u -canon_dr -canon_lide70 -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210 -dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -escl -fujitsu -genesys -gt68xx -hp -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s -hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark -ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp -mustek_usb -mustek_usb2 -nec -net -niash -p5 -pie -pieusb -pixma -plustek -plustek_pp -pnm -qcam -ricoh -ricoh2 -rts8891 -s9036 -sceptre -sharp -sm3600 -sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3 -test -u12 -umax -umax1220u -umax_pp -xerox_mfp" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


created the scanner group
Quote:
jean@gentoo ~ $ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

Opening simplie scan does not detect the scanner anyway ...
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Thu Oct 21, 2021 3:23 pm    Post subject: Reply with quote

Is this where you found the supporting backend?
http://www.sane-project.org/sane-backends.html

Do you find anything about the scanner in dmesg? How about lsusb? If yes, share output.

Do you have your printer working now?
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum