LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-28-2005, 01:47 PM   #1
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Rep: Reputation: 30
How to print to a network dual boot machine?


Printing in Linux is a headache for me. Networking in general is another headache. So network printing is an absolute nightmare for me.

The story is as follows. I've got a laptop which is purely Ubuntu and a dual boot PC, which has a printer. Both PCs are in a local wireless network.

Firstly I set up a SMB printing, following a HOWTO and it works fine for me, when the desktop was booted in Windows. However, I wanted to make it possible to print when the desktop is booted in Ubuntu as well. So i followed a HOWTO how to share CUPS printer and set up it.

The problem now is that I cannot print to Windows. If the desktop is booted in Windows, it just does not work.

If I try to run Gnome CUPS manager I've got an error:
Code:
~$ gnome-cups-manager

** (gnome-cups-manager:30430): WARNING **: failed request with status 1280
However if I got to localhost:631 I can see the printer which configured for SMB:

Code:
Description: Stylus-Photo-790
Location:
Printer State: processing, accepting jobs.
"No pages found!"
Device URI: smb://10.0.0.11/epson790
I can see a job but is is being processed forever...

I wonder how to configure the printer so I could print through the network whether the desktop is booted in Windows or Linux?
 
Old 08-28-2005, 06:22 PM   #2
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Hmm.

Share your servers printer as SMB printer in MS Windows and as a CUPS printer in Linux.

Run CUPS on your laptop as a local printer server.
On your laptop:
Set up one printer queue for the SAMBA printer on your server.
Set up one printer queue for the CUPS printer on your servers.
Set up a printer class that uses both printers, the first that is up and accepting jobs.
Use that class as default printer on your laptop.

This should work, but I havn't tried it. Please tell us how/if it worked.

Yours
 
Old 08-29-2005, 07:01 AM   #3
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Jaxån
Hmm.

Share your servers printer as SMB printer in MS Windows and as a CUPS printer in Linux.

Run CUPS on your laptop as a local printer server.
On your laptop:
Set up one printer queue for the SAMBA printer on your server.
Set up one printer queue for the CUPS printer on your servers.
Set up a printer class that uses both printers, the first that is up and accepting jobs.
Use that class as default printer on your laptop.

This should work, but I havn't tried it. Please tell us how/if it worked.

Yours
the thing is that when the desktop is booted in Linux, I can print without any problem. gnome-cups-manager works and everything is fine. As soon as the desktop is down or in Windows, gnome-cups-manager stops to work and for example in OpenOffice I can see only a Generic Printer.

I do not know how actually to add SMB printer. If I use web interface localhost:631, I see always one printer, which says that it is connected to SMB:
Code:
Default Destination: Stylus-Photo-790

	Stylus-Photo-790 	EPSON Stylus Photo 790 - CUPS+Gimp-Print v4.2.7 	
		Description: Stylus-Photo-790
Location:
Printer State: idle, accepting jobs.
Device URI: smb://10.0.0.11/epson790

Print Test Page Stop Printer Reject Jobs Modify Printer
TO be able to print to CUPS printer i have made some changes in my /etc/cups/client.conf on the laptop (uncommnted
Code:
ServerName 10.0.0.11
). I wonder if I have to do there something as well to make SMB printer available as well.
 
Old 08-29-2005, 05:46 PM   #4
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Quote:
Originally posted by foxy123
the thing is that when the desktop is booted in Linux, I can print without any problem. gnome-cups-manager works and everything is fine. As soon as the desktop is down or in Windows, gnome-cups-manager stops to work and for example in OpenOffice I can see only a Generic Printer.

I do not know how actually to add SMB printer. If I use web interface localhost:631, I see always one printer, which says that it is connected to SMB:
Code:
Default Destination: Stylus-Photo-790

	Stylus-Photo-790 	EPSON Stylus Photo 790 - CUPS+Gimp-Print v4.2.7 	
		Description: Stylus-Photo-790
Location:
Printer State: idle, accepting jobs.
Device URI: smb://10.0.0.11/epson790

Print Test Page Stop Printer Reject Jobs Modify Printer
TO be able to print to CUPS printer i have made some changes in my /etc/cups/client.conf on the laptop (uncommnted
Code:
ServerName 10.0.0.11
). I wonder if I have to do there something as well to make SMB printer available as well.
You have to use a CUPS-server on your laptop. When you set ServerName in /etc/cups/client.conf you tell programs in your laptop to use the CUPS-server on your server at 10.0.0.11. But when you run MS Windows you dont have any CUPS-server running.

You install SMB-printer at the server, then it isn't there when linux isn't running.

Your server has to run a CUPS-server when running linux. But you have no need to set up a SMB-printer in cups, becouse when MS Windows shares the printer, you arn't running CUPS. When running MS Windows, it has to serv the printer from SMB.

On your laptop, you ALSO need to run a CUPS-server (do NOT use ServerName 10.0.0.11 in /set/cups/client.conf, use SeverName 127.0.0.1). There you set up two printers. On that uses the CUPS-printer on your server when it runs linux, and one that uses SMB:-printer when you running MS Windows on your server. Place both of them in a class in your laptop-CUPS-server. Use that namen as printer (set it as default printer in your laptop-CUPS).

So now your laptop sends jobs to your laptop-CUPS (as told by client.conf). On that server, it try to send jobs to SMB och CUPS printer on your server. If one of them works, your laptop-CUPS sends to that working printer (the other queue on your server will start if you restarts in other OS).

In both server and laptops file /etc/cups/cupsd set "BrowseAddress @LOCAL" so that the CUPS-server will send on your local net information about which printers are accessable from CUPS-servers on your local net.

So, if you run linux on your server, the laptop will send to servers CUPS-queue. If you running MS Windows on your server, your laptop will send printer jobs to SMB:printer.

So, check that you can print from your laptop to SMB-printer when MS Windows is running on your server. Then reboot your server and check that you can print on your CUPS-printer when Linux is running on your server. When this works, try the printer class to print. When you do this, rigth printer service (printer queue) will automaticly be used.

If this doesn't work, give me some information (ip-numbers on server and laptop and printer queues names on the server) about your set up.

Happy printing.

Last edited by Jaxån; 08-29-2005 at 05:54 PM.
 
Old 09-01-2005, 09:18 AM   #5
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
Quote:
There you set up two printers. On that uses the CUPS-printer on your server when it runs linux,
I cannot figure out how I can do that. SMB printer is fine, but how I should set up CUPS printer?
 
Old 09-01-2005, 12:42 PM   #6
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Machin A has your printer connected to it. This one runs Linux and MS Windows. You set up a CUPS server on this to handle your printer when you use Linux and the printer queue is called 'lp'. You share the printer for SAMBA use when it runs MS Windows, printer is called 'HP'.
Check that you can use the printers in Linux and MS Windows from this machine before you continue.
In this setup, you have to talk "IPP" to be able to use the printer 'lp' and "SMB" to use printer 'HP'.

Machine B whant to use the printer on machin A. This runs Linux all the time. You want to use the printer on Machine A when it runs Linux or MS Windows. You run a CUPS server AND CUPS client on this machine. The client part talks to B:s serverpart. You NEED to do this. So controll that no ServerName is set in /etc/cups/client.conf (or set to localhost, 127.0.0.1).

There is no way (that I know about) that you can use two protocols to talk to one printer directly. BUT you can set up two different printer queue on your machine B that talks to printer 'lp' with protocol 'IPP' and another that talks to printer 'HP' with protocol 'SMB'.
How to set up a SMB-printer to 'HP' on machine A is handled in the manual. Point your web browser at http://localhost:631/ on machine A.
To handle a IPP-printer you only need to have CUPS server on A and B broadcasts the printer settings, at least from A. So when you run Linux on A, 'pr' on A should show up in "lpstat -a" on B without any problems. You MIGHT need to tell A to broadcast it's printer status (look in /etc/cups/cupsd.con for a line that might have turned it off. Don't have a CUPS server in front of me now so I can't check myself).

Now when you have printed the test pages from the configuration page in your web browser, from machine B on both print queues, you can go to next step.

Now you have to create a class of printers on your machine B:s CUPS server called 'printer' or something. In that class of printers, you put your printers 'lp' and 'HP'. Now you use 'printer' on machine B to print on your printer at machine A without you need to know about if A runns linux or MS Windows.

Note: I have not tried this myself, but this is what I would try if I had this problem. But I don't run MS Windows any more. Not on any server. Neither should you.

Good Luck.
 
Old 09-01-2005, 12:51 PM   #7
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
thanks a lot.... I have finally found a line
Code:
BrowsePoll 10.0.0.11:631
and set so now I can see CUPS [rinter and print on it...

The problem now is that CUPS printer is called Stylus-Photo-790@thehill and SMB called Stylus-Photo-790. When I try to put them in one class, I have only SMB printer their. Maybe it is because they are called identically. But I cannot find the way to change their names. In localhost:631 it is not possible.

EDIT: Another possible reason that I do not have a permission to add CUPS printer to MyPrinter class. I can post my both cupsd.conf to check is everything is fine their...

Last edited by foxy123; 09-01-2005 at 01:00 PM.
 
Old 09-01-2005, 09:00 PM   #8
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Where did you try to change printer name on server A?
You need to change name on right server (I think).

How should CUPS on B be able to separate the SMB-printer and the CUPS-printer when they have same name? You need to change name on SMB or CUPS-printer. SMB-printer is on machine B, CUPS-printer is on server A.

And class should have another name than the printers. When it works, you could try to have a class with printer name and try it out. But do it simple for now. Different name everywhere, also to make it easier for you to know what it's about in log files.
 
Old 09-01-2005, 09:04 PM   #9
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Quote:
Originally posted by foxy123
EDIT: Another possible reason that I do not have a permission to add CUPS printer to MyPrinter class. I can post my both cupsd.conf to check is everything is fine their... [/B]
No need. But if you want you can check security at end of cupsd.conf. There you have same stuct to set security on libraries as you can see in URL on web browser. You could in this way give access to printers depending on netmask, IP-address och DNS-name.
 
Old 09-04-2005, 12:03 PM   #10
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
still no luck... basically I am not able to change printers names: neither for SMB nor for CUPS... localhost:631 web interface does not provide this option, neither gnome-cups-manager. I tried to change it in /etc/cups/printers.conf, but was not able to print even locally after that. How it should be done?
 
Old 09-05-2005, 11:20 AM   #11
Jaxån
Member
 
Registered: Apr 2005
Location: Sweden
Distribution: Debian
Posts: 142

Rep: Reputation: 15
Quote:
Originally posted by foxy123
still no luck... basically I am not able to change printers names: neither for SMB nor for CUPS... localhost:631 web interface does not provide this option, neither gnome-cups-manager. I tried to change it in /etc/cups/printers.conf, but was not able to print even locally after that. How it should be done?
If you cant change name, remove and install with new name.

This is a check list. Do those steps in order.

Boot dual boot server into Linux.

From web interface, port 631 (do this on right machine, don't mess that up):
Remove all printers (should be two?) in the cups server that runs on your laptop.
Remove printer (should be one) in the cups server that runs on your dual boot server (when in Linux).

Add the printer on your dual boot server, but with a different namn than the printer has in MS Windows SMB. Check that it works on that machine (try to print test page, button in web interface). If this doesn't work, fix it!

Add CUPS (so called IPP-printer) printer on laptop that uses dual servers printer, when running Linux on dual boot server. Check that you can write on that printer from laptop before you continue. If it doesn't work, fix it!

Reboot dual boot server into MS Windows.

Add SMB pinter on laptop. Check that you can write on that new printer from laptop before you continue. Check etc...

Make a new class on laptop with those two printers in it. Try to print on the new class from laptop. If it woorks, reboot dual boot server into Linux. Try to print from laptop again. This SHOULD work, but again, I have not tested this setup myself.

You can also check queue with this CLI-tool (Command Line, in a terminal like xterm)
lpstat -o
lpstat -s
(IPP-printer should show up like ipp://server/printer and SMB-printer smb://server/printer)

You can print with this CLI-tool: lp -d PRINTER file
You can remove a job with: cancel JOBNAME

Good Luck!
 
Old 09-08-2005, 10:18 AM   #12
foxy123
Member
 
Registered: Nov 2004
Distribution: Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 30
I finally made it! Created a new printer under a different name on my desktop machine using web interface and now it works. Thanks a lot for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to configure printing to dual-boot print server? foxy123 Linux - Networking 6 12-24-2005 08:07 AM
print to a network printer from win98 machine tulip4heaven Linux - Networking 3 04-07-2005 08:49 PM
Dual boot machine Grub doesn't install marios_auth Fedora 4 10-26-2004 10:27 PM
How to dual boot a linux machine rwalkerphl Linux - Newbie 1 10-12-2004 10:35 PM
Want dual boot Linux on XP machine marshouser Linux - Newbie 2 08-13-2003 09:23 PM

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

All times are GMT -5. The time now is 08:02 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