LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-06-2021, 05:15 PM   #1
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Rep: Reputation: 0
Sharing Linux USB printer with Windows


We are trying to let a Window 10 laptop print to
a USB printer attached to my Fedora 32 box.

The host name of the Linux box has been set as by root as follows:

Code:
   hostnamectl set-hostname george
The printers name, as set by the Fedora print admin tool is:
HP_LaserJet_P2035


As root, I executed the following commands:

Code:
   cupsctl --share-printers

   lpadmin -p HP_LaserJet_P2035 -o printer-is-shared=true

   lpadmin -p HP_LaserJet_P2035  -E -v ipp://george/printers/HP_LaserJet_P2035 -m everywhere

Then, on the Windows 10 laptop, we installed a network printer
with the following address:

Code:
  http://george:631/printers/HP_LaserJet_P2035

Port 631 is the IPP port, as specified by /etc/services


So far, we have been unable to print from Windows. The Linux USB
printer has installed under Windows, but when trying to print we get
the useful error messages: "Error Printing".

Can anyone help us out?
Thank you for your time.
 
Old 04-06-2021, 06:04 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Can your laptop resolve this hostname george (ping george)?
 
1 members found this post helpful.
Old 04-06-2021, 06:07 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Do you have a local DNS running that will resolve george to a real IP address? If not you will need to use the computers LAN IP address. If the computer is using DHCP you will need to use an address reservation in the router so it will stay the same.

Too late...
 
1 members found this post helpful.
Old 04-06-2021, 06:28 PM   #4
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Can your laptop resolve this hostname george (ping george)?
Yes, executing "ping george" on the laptop is successful.
 
Old 04-06-2021, 09:21 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Code:
 lpadmin -p HP_LaserJet_P2035  -E -v ipp://george/printers/HP_LaserJet_P2035 -m everywhere
As far as I know this would create a queue that points to itself which I don't think would actually work. Do you have a queue where the URL is a USB:// or similar?
 
1 members found this post helpful.
Old 04-06-2021, 10:00 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Do you have an active firewall on the Linux print server perhaps?

This might be worth reviewing too...
http://www.auxnet.org/index.php/the-...-in-windows-10
 
1 members found this post helpful.
Old 04-06-2021, 10:25 PM   #7
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Do you have an active firewall on the Linux print server perhaps?
Great suggestion. I brought up the Firewall Configuration tool
and under "public | Services" I checked the "ipp" box.


Now, when the laptop tries to print, lpq as root lists jobs in
the queue:

Code:
   [root@george cups]# lpq
   HP_LaserJet_P2035 is ready and printing
   Rank    Owner   Job     File(s)                         Total Size
   active  LAPTOP\ 214     Test Page                       248832 bytes
   1st     LAPTOP\ 215     Test Page                       248832 bytes
However, the jobs just hang there and the printer does not print.
.
 
Old 04-06-2021, 10:45 PM   #8
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: CentOS, Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
Success. As someone suggested, maybe I should not have executed:

Code:
   lpadmin -p HP_LaserJet_P2035  -E -v ipp://computer-room01/printers/HP_LaserJet_P2035 -m everywhere
So I used the Printer Configuration tool under Fedora and
deleted the printer, then re-added it. Now, the Windows laptop
can print.

Thank you everyone.
 
Old 04-11-2021, 12:06 AM   #9
Jeffery21
LQ Newbie
 
Registered: Apr 2021
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by chicagocoyote View Post
Success. As someone suggested, maybe I should not have executed:

Code:
   lpadmin -p HP_LaserJet_P2035  -E -v ipp://computer-room01/printers/HP_LaserJet_P2035 -m everywhere
So I used the Printer Configuration tool under Fedora and
deleted the printer, then re-added it. Now, the Windows laptop
can print.

Thank you everyone.
The biggest issue you'll run into is that the printer won't work if the source machine is turned off.
Install as a USB printer on one device, then navigate to the printer and instal as a network printer on the other. That's how I believe it went down.
If they're on the same network, you can connect the printer to one of them and then share it so the other machine can access it across the network.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can print from Windows to CUPS printer. Cannot print from Windows to Samba printer. PastorJeremyWilson Linux - Server 9 09-24-2018 02:11 PM
CUPS and Canon MP190 printer. Print quality and printer sharing... SFGAirborne Linux - Hardware 1 12-14-2010 05:55 AM
Help on Printer / printer sharing on Linux Debian tritako Debian 6 10-02-2008 10:29 AM
Printer-sharing with FreeBSD; cannot se icon for the printer hemmelig *BSD 7 05-13-2005 03:44 PM
how to get primary logon network, Access control,File sharing & printer sharing info dileepkk Linux - Networking 2 07-06-2004 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration