This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to print to printer machine running X server?


From: "Hr. Daniel Mikkelsen" <daniel@copyleft.no>
Reply-To: cygwin-xfree@cygwin.com
To: cygwin-xfree@cygwin.com
Subject: Re: How to print to printer machine running X server?
Date: Tue, 6 Jan 2004 16:12:08 +0100 (CET)

On Tue, 6 Jan 2004, Øyvind Harboe wrote:

> Is there a way to print to a printer on the machine where the X server
> runs?

> - I have CygWin + xfree86 on a Windows machine
> - On the Windows machine (which has printers connected), I start
> OpenOffice on a remote machine Linux box over ssh -X..

> How do I print from OpenOffice running on the remote Linux box to the
> printer on the Windows machine where the X server is running?

Printing isn't part of X, so there is no standard correct way of doing this.

My setup:

The Windows computer has its printers shared, accesible to the GNU/Linux
(actually FreeBSD) machine.

The GNU/Linux machine runs CUPS, and uses the samba "transport" to print to
the Windows connected printers. They're named "printer1" and "printer2".

When I log in on the GNU/Linux box from the Windows machine with XDMCP, I run a
script which uses "lpadmin -d" to select default output for the lpr command.
The script looks up the printer from a table using my DISPLAY setting.


Not perfect, but transparent to end users.

-- Daniel


Note that this requires that the printer share on the Windows machine be "visible" to the remote computer, which may not always be the case. It might be possible to use ssh's -L command-line switch to forward the necessary port(s) over the ssh tunnel to make the local share visible to the remote machine.


Something I've done in the past is print to a Postscript file on the remote machine, convert it to PDF using ps2pdf, transfer it to the local computer via FTP, and then use Adobe Acrobat Reader on the local machine to view/print the result.

_________________________________________________________________
Working moms: Find helpful tips here on managing kids, home, work ? and yourself. http://special.msn.com/msnbc/workingmom.armx



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]