CUPS and remote printers

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

CUPS and remote printers

Postby redcarpet » Thu Sep 06, 2012 12:52 pm

Hi all,

I have tried to read up about this and getting my self in a mixup.

I have a linux (ubuntu) server at a remote site that users putty (ssh) into and run the software and all is ok.

I want them to be able to print the odd report on their local printer. They are using WINDOWS (!) and PUTTY. I cant seem to get my head around this one and thought it was just telling putty what the printer name is at the local windows terminal !

Any help (even basic points of view) or even how cups works with remote printers, would be really gratefully appreciated.

thanx
pj
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby Dutch_Master » Thu Sep 06, 2012 1:09 pm

Tell us more. Like: how is the printer connected to the network, what type and brand of printer, etc...
Dutch_Master
LXF regular
 
Posts: 2453
Joined: Tue Mar 27, 2007 1:49 am

printer

Postby redcarpet » Thu Sep 06, 2012 1:38 pm

there is no printer on the linux server.

the printer on the remote windows machine is an epson stylus rx 520 linked directly to the windows pc via usb
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby Dutch_Master » Thu Sep 06, 2012 2:00 pm

Right, that's vital info we can work with. Make sure the Win-OS machine acting as printer server allows sharing of the printer (it'll probably do, just check to make sure) then install Samba on the Linux machine. This is the protocol that allows a Linux box to communicate to its Win-OS neighbours using their own protocol. In effect, the Win-server is "tricked" into believing the Linux box is another Win-OS box ;)

When Samba is installed, tell it the IP address of the printer-server, then tell it to establish a connection and see what happens. Don't forget to install the Epson printer drivers on the Linux box too!
Dutch_Master
LXF regular
 
Posts: 2453
Joined: Tue Mar 27, 2007 1:49 am

Postby redcarpet » Thu Sep 06, 2012 4:23 pm

thanx for that I will try it over the weekend.

So, can you just advise me here a bit please. You have to fool the linux server into thinking that it is printing locally on the windows server?
(Not that this is the case at the moment but) What happens if there are two windows clients using the same linux file server both with epson printers. Sorry I ask I am just trying to get to grip with the logic as well as the code.
THanx Dutch

pj
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby nelz » Thu Sep 06, 2012 5:23 pm

Bear in mind that when you are logged into the remote server with SSH, that is effectively the local session. It sounds like you don't want every user to make their Windows printer available over the Internet, I think the simplest option may be to use whatever print-to-file option your software has, then copy this to the Windows box and print it locally.

If the reports are in text format, you could possibly use the passthrough option in PuTTY to print the entire session to the local printer.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8525
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby bobthebob1234 » Thu Sep 06, 2012 5:27 pm

Hang on, you want users to be able to print locally reports that are on the server?
What format are the reports in? Could they just be downloaded to local computer using scp (WinSCP) then printed as a file locally?



Edit:Oops Nelz beat me to it...
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby redcarpet » Thu Sep 06, 2012 5:30 pm

Hi Nelz
Yep I get it - using putty's ssh connection does make it a local session doesnt it - yes of course - i forgot that. Print-to-file not an option I am afraid - however - on the good side - it is all text reporting - so I will retry passthrough on putty. Do I need to adhere to any special naming conventions (i.e. make the printer the same name on box boxes) or anything wierd like that?.

Thanx - getting to grip bit by bit

pj
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby Dutch_Master » Fri Sep 07, 2012 3:28 am

Work got in the way, so it took a little longer to get back to you ;)

What you're doing with Samba is communicating between the Linux and Win-OS boxes in the protocol used by the Win-OS. It allows you to 'discover' the services the Win-print server offers (i.e. the printer) via the desktop. No need for ssh sessions!

Anyway, back to Cups: for a remote printer to function like a local one, you need to install the printer in Cups, as it were a local printer. But in the location field you enter the IP address (and printer spool) of the Win-OS box that acts as the printer server. I'm not sure your Epson is (properly) supported in Cups, IIRC Epson is one of the worst regarding Linux support. HP and Brother have much better Linux support (I have a Brother MFC and it's not the first one! ;) ) so perhaps you can persuade the remote users to switch over to a better Linux supported brand. ;)
Dutch_Master
LXF regular
 
Posts: 2453
Joined: Tue Mar 27, 2007 1:49 am

Postby redcarpet » Fri Sep 07, 2012 9:14 am

OK, thanx very much Dutch (and all).

You have given me good points to start off and I have taken on board what you say about Epsons and other makes.
I will now give this project a go and tell you how I get on. (even if it is more than a few days time)

Thanx every body for your help :)

pj
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby wyliecoyoteuk » Fri Sep 07, 2012 12:15 pm

no need for CUPS or Samba,
PuTTY has an option to redirect ANSI printing to a local printer, under the "Terminal" settings for remote printing.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3461
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby redcarpet » Fri Sep 07, 2012 12:17 pm

Great - thanx wylie - i will give it a go
Last edited by redcarpet on Fri Sep 07, 2012 7:53 pm, edited 1 time in total.
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby redcarpet » Fri Sep 07, 2012 12:27 pm

ok I have setup the printer name in the terminal setup and run a simple cat filename | lpr but nothing has happened. Sorry for this but I really dont know what to do next - thanx wylie - can you help
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Postby wyliecoyoteuk » Fri Sep 07, 2012 8:49 pm

Not sure, but I think that you may need a script to redirect simple I/O
4.3.9 Remote-controlled printing

A lot of VT100-compatible terminals support printing under control of the remote server. PuTTY supports this feature as well, but it is turned off by default.

To enable remote-controlled printing, choose a printer from the "Printer to send ANSI printer output to" drop-down list box. This should allow you to select from all the printers you have installed drivers for on your computer. Alternatively, you can type the network name of a networked printer (for example, \\printserver\printer1) even if you haven't already installed a driver for it on your own machine.

When the remote server attempts to print some data, PuTTY will send that data to the printer raw - without translating it, attempting to format it, or doing anything else to it. It is up to you to ensure your remote server knows what type of printer it is talking to.

Since PuTTY sends data to the printer raw, it cannot offer options such as portrait versus landscape, print quality, or paper tray selection. All these things would be done by your PC printer driver (which PuTTY bypasses); if you need them done, you will have to find a way to configure your remote server to do them.

To disable remote printing again, choose "None (printing disabled)" from the printer selection list. This is the default state.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3461
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby redcarpet » Sat Sep 08, 2012 7:32 am

ah OK - thanks for that
User avatar
redcarpet
 
Posts: 10
Joined: Thu Sep 06, 2012 12:45 pm

Next

Return to Help!

Who is online

Users browsing this forum: No registered users and 3 guests