Usually the fastest "modern" route is to have a relatively new kernel 2.4 or greater and install CUPS http://www.cups.org/doc-1.1/sam.html
Then use the web interface
apt-get install cups OR yum install cups
SAMBA is important as well (for printer sharing across OS Platforms) apt-get install samba
lpinfo -v
modify smb.conf to include
printing = cups printcap = cups
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html
http://www.cups.org/documentation.php/ref-cupsd-conf.html
nano /etc/cups/cupsd.conf
Change "Listen localhost:631" to one or more of the following...
Listen 127.0.0.1:631 Listen 192.0.2.1:631 Listen [::1]:631 Listen *:631
BrowseAllow from all BrowseAllow from none BrowseAllow from 192.0.2 BrowseAllow from 192.0.2.0/24 BrowseAllow from 192.0.2.0/255.255.255.0 BrowseAllow from *.domain.com BrowseAllow from @LOCAL BrowseAllow from @IF(name)
DefaultAuthType Basic DefaultEncryption IfRequested
e.g. A totally "insecure" option to just see if it's working (in case we're on a command line server)...
Administrator user group... //these people will be prompted if they make changes to the print system
SystemGroup sys root printeradminusername
The below settings control the need for SSL configuration...
DefaultEncryption Never
Encryption IfRequired
Encryption Required
Listen *:631 BrowseAllow from 192.168.1.0/24
Encryption Required
Allow 192.168.1.* Order allow,deny
AuthType Default
Require user @SYSTEM
Order allow,deny
YAY, it works!
/etc/init.d/cups reload /etc/init.d/cups restart
/sbin/service lpd stop /sbin/service cups start
Connect your printer to the parallel port or USB. then restart the CUPS daemon with
killall -HUP cupsd
and check with
lpinfo -v
direct parallel:/dev/lp0 direct usb://hp/dj450?serial=SG31K210C23S
for usb: lsusb
For parallel printers check with "/proc/sys/dev/parport/parport?/autoprobe*":
http://www.linuxprinting.org/~till/printing-tutorial/tut.html
serial port printer connected. I have an HP laserjet printer. My serial port is assigned to 3F8 IRQ4 in the Bios.
You should put something like this in /etc/conf.modules file. This works with HP parallel printer connected to my zip drive.
alias parport_lowlevel parport_pc options parport_pc io=0x378 irq=4,none
Reboot and try modprobe lp. It should work. Else; check the log files and /proc/... status.
The parallel ports are called /dev/lp${n} (/dev/lp0 [LPT1:], /dev/lp1, etc). Serial ports are called /dev/ttyS${n} (/dev/ttyS0 [COM1:], etc).
setserial -a /dev/ttyS0 baud_base 9600 chmod 777 /dev/ttyS0
CUPS' http : / / localhost : 631 and modified the printer port to serial: /dev /ttyS0 ? baud = 9600 + bits = 8 + parity = none + flow = soft (ignore embedded spaces)
cd /usr/spool/lp/model and then do a "grep stty *", I guess it looks like: "9600 -parenb cs8 ixon" is the most common
this is how you define printcap
dina:/usr/users/andy/work/lpd/lpd# stty -a < /dev/ttyS2
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol =