Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CUPS and remote printers
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Thu Sep 06, 2012 1:52 pm    Post subject: CUPS and remote printers Reply with quote

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
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Thu Sep 06, 2012 2:09 pm    Post subject: Reply with quote

Tell us more. Like: how is the printer connected to the network, what type and brand of printer, etc...
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Thu Sep 06, 2012 2:38 pm    Post subject: printer Reply with quote

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
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Thu Sep 06, 2012 3:00 pm    Post subject: Reply with quote

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 Wink

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!
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Thu Sep 06, 2012 5:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Thu Sep 06, 2012 6:23 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
bobthebob1234
LXF regular


Joined: Thu Jan 03, 2008 9:38 pm
Posts: 1369
Location: A hole in a field

PostPosted: Thu Sep 06, 2012 6:27 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Thu Sep 06, 2012 6:30 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Fri Sep 07, 2012 4:28 am    Post subject: Reply with quote

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

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! Wink ) so perhaps you can persuade the remote users to switch over to a better Linux supported brand. Wink
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Fri Sep 07, 2012 10:14 am    Post subject: Reply with quote

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 Smile

pj
Back to top
View user's profile Send private message
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3447
Location: Birmingham, UK

PostPosted: Fri Sep 07, 2012 1:15 pm    Post subject: Reply with quote

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!

*************** ************
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Fri Sep 07, 2012 1:17 pm    Post subject: Reply with quote

Great - thanx wylie - i will give it a go

Last edited by redcarpet on Fri Sep 07, 2012 8:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Fri Sep 07, 2012 1:27 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
wyliecoyoteuk
LXF regular


Joined: Sun Apr 10, 2005 11:41 pm
Posts: 3447
Location: Birmingham, UK

PostPosted: Fri Sep 07, 2012 9:49 pm    Post subject: Reply with quote

Not sure, but I think that you may need a script to redirect simple I/O
Quote:
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!

*************** ************
Back to top
View user's profile Send private message
redcarpet



Joined: Thu Sep 06, 2012 1:45 pm
Posts: 10

PostPosted: Sat Sep 08, 2012 8:32 am    Post subject: Reply with quote

ah OK - thanks for that
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! 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
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast