Help - Search - Members - Calendar
Full Version: Sharing Printer With Linux
Linuxhelp > Support > Technical Support
I have a home network with 5 computers, 3 windows and 2 linux.

I have a printer (Epson Stylus C62) connected to one of my windows machines, and would like to share it with my linux machines. All my computers chare a connection through a router (Linksys).

I've read up a little on Samba, but from what I've seen so far, I'd need to have the printer connected to the linux machine (Don't really want to do this, since I don't know where to find drivers for this printer, nor do I want to spend time tracking down endless dependancies) Then again, perhaps I'm just scared away from doing this because of a rather bad experience with RedHat.

My 2 linux computers use Debian

you'll need samba-client
apt-get install samba-client [no worry about dependencies, it will donwload em if needed]
yum install samba-client
chose the one you like more ...

trough X11 as mentioned bellow is easy to setup , tried myself
just open up the print manager [I used GNOME], and select NETWORK PRINTER SAMBA [Windows]
and fill in the details...

Robert B

ps.: it's not soooo hard to install a samba print server smile.gif, and using apt-get or yum, you really got nothing to worry about dependencies anymore , which I also hate SOOO much

From a website
Read Introduction to Linux samba in this guide first.
The fastest way to set up printer sharing is to use XWindows. Start XWindows as root :
[root@ppa /root]# startx
From Control Panel, select Printer Configuration.
You may get some error messages when you start Printer Configuration.
If the message "Error, Samba does not appear to be installed", you have to install Samba (from the CD), see Adding more software from the CD.
In the RHS Linux Print System Manager window, select Add.
In the Add a Printer Entry, select Lan Manager Printer (SMB), and a warning about passwords will pop up; click OK.
Fill out Edit Lan Manager Printer (SMB) Entry :

Names (name1|name2|...) STPR
Spool directory /var/spool/lpd/lp
File Limit in Kb (0 = no limit) 0
Hostname of Printer Server ppb
IP number of Server (optional)
User PP
Input Filter

In the Configure Filter dialog, select HP LaserJet, change paper type to a4, mark "Send EOF after job to eject page?" and leave other fields at their defaults.
Back in the RHS Linux Print System Manager window, highlight the new printer entry (STPR) and select Tests - Print ASCII test page. If everything works, a test page will be printed. Also try the Postscript test page.
Next step is trying to print from a text console. Find a (not too large) text file to test with - in this case the "Hello" script created in Shell-scripts.
[root@ppa /root]# usr/bin/lpr -PSTPR /home/pp/bin/hello
should print the file /home/pp/bin/hello on the printer STPR that we just set up. If you omit the -PSTPR, the file will be printed to the default printer instead. To see what the default printer is, see the value of the environment variable PRINTER :
[root@ppa /root]# echo $PRINTER
Currently no printer is defined as default, as the output is an empty string, so set the value of PRINTER :
[root@ppa /root]# PRINTER='STPR'
[root@ppa /root]# export PRINTER
To print out hello you now type :
[root@ppa /root]# lpr /home/pp/bin/hello
And check if you can print from your normal login (if you ran root as su, you can not log out in your normal account; you have to start a new login shell in order inherit the PRINTER variable) :
[pp@ppa pp]$ lpr bin/hello
The current settings of PRINTER will be lost after next reboot unless you add them to /etc/profile. You have to add the line (or modify PRINTER if it is already there) :
and you have to add PRINTER to the export list.
After reboot, I had the error message :
lpr: connect: No such file or directory
jobs queued, but cannot start daemon.
I do not know the reason for this, and I have only seen it this one time.
My current printer capabilities file (/etc/printcap) looks like (excluding most comments) :

##PRINTTOOL3## SMB laserjet 300x300 a4 {} Laserjet Default {}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.