Skip to Main Content
Linux in a Windows World
book

Linux in a Windows World

by Roderick W Smith
February 2005
Beginner content levelBeginner
496 pages
16h 10m
English
O'Reilly Media, Inc.
Content preview from Linux in a Windows World

Printing to Printer Shares

A popular SMB/CIFS client feature on Linux is the ability to print to printers that are connected to Windows systems or to other systems that support SMB/CIFS printing. (Many dedicated print server appliances support SMB/CIFS printing, for instance.) Precisely how this task is accomplished depends on the software installed on your Linux system. One way that should always work, given an appropriately formatted file, is to use smbclient to submit a print job. You can also configure your Linux print queue to submit jobs to a remote server via SMB/CIFS, but the details vary with your local print queue. This section describes how to configure CUPS to configure an SMB/CIFS printer, as well as how to do the job with BSD LPD or LPRng.

Printing Using smbclient

If you have a one-time need to print to a Windows printer from Linux, you may want to consider using smbclient to do the job directly. As described earlier, smbclient is a basic text-mode tool for transferring files using SMB/CIFS. Many smbclient features and commands are modelled after those in text-mode FTP clients. One command in particular, though, is of interest here: print. Once you’ve started smbclient and connected to a print server, you can use this command to transfer a print job to the server. The transaction looks something like this:

$ smbclient //MANDRAGORA/HP4000
Password:
Domain=[GREENHOUSE] OS=[Unix] Server=[Samba 3.0.3]
smb: \> print myoutput.ps putting file myoutput.ps as myoutput.ps (29.8 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu Made Easy

Ubuntu Made Easy

Rickford Grant, Phil Bull
Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull
Fedora Bible 2010 Edition: Featuring Fedora Linux 12

Fedora Bible 2010 Edition: Featuring Fedora Linux 12

Christopher Negus, Eric Foster-Johnson
Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans

Publisher Resources

ISBN: 0596007582