BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home

Printing with CUPS on OpenBSD

daniel —Wed, 11/19/2008 - 10:26pm

  • BSD

General Links
The HP LJ 1012
Suggested Linux Printers
lpd setup
hpijs
Setting up an lpd printer

CUPS

Install:
# pkg_add ftp://ftp.usa.openbsd.org/pub/OpenBSD/3.8/packages/i386/cups-1.1.23p2.tgz
To enable CUPS, execute '/usr/local/sbin/cups-enable' as root.
To disable CUPS, execute '/usr/local/sbin/cups-disable' as root.
Starting cupsd will overwrite /etc/printcap. A backup copy of this file is saved as /etc/printcap.pre-cups by '/usr/local/sbin/cups-enable' and will be restored when you run '/usr/local/sbin/cups-disable'.

# /usr/local/sbin/cups-enable
This script will replace OpenBSD lpd with CUPS

edit cupsd in /etc/cups
allow lan printers

Upload ppd file through cups web interface

From:
http://www.owlfish.com/thoughts/winipp-cups-2003-07-20.html
Create a class
The major configuration change I had to make under CUPS was adding a class. Based on feedback I've received it seems that only older combinations of CUPS and Windows require this (e.g. Debian Woody and Windows 2000), and newer versions do not.
I could not make Win2K talk to my printer directly, but it was able to work with a class that held that printer. To do this go to the CUPS admin screen on the Unix machine(e.g. http://localhost:631/admin) and select "Add Class". Enter a name, location and description as prompted and select continue. Next select the printer you wish to share as a member of this group. Select continue to save the class.
Granting permission
For an IPP client to be able to connect to CUPS it must have permission. On Debian systems, and probably others, the default is for only local connections (i.e. those from 127.0.0.1) to be allowed. To allow connections from across the network alter the directive in the cupsd.conf file (found in /etc/cups/). For example to enable both local connections, and those from clients in the 192.168.0.* range use:
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.*
</Location>
To give permission for all clients from all network connections replace 192.168.0.* with All.
In theory Windows should be able to connect to an IP address, however I never managed to get this to work, but it could successfully use a hostname. To set a mapping between your CUPS hostname and its IP address you need to put an entry in the Windows hosts file. Under Win2k the host file is: C:\WINNT\SYSTEM32\DRIVERS\ETC\HOSTS. The format is simple:
# Example hosts entry
192.168.0.3 rock
Now you can set up the new network printer. In the Control Panel select "Add Printer", "Network Printer", and then "Connect to printer on the Internet or your intranet". The URL I use is:
http://rock:631/classes/Home
Replace 'rock' with the hostname of your Linux server, and replace 'Home' with the name of the class that you defined earlier.
Depending on your configuration of CUPS you will probably be prompted to install a printer driver for the network printer. Doing this is the final step, after that you should be able to print from Windows directly to a CUPS printer using IPP!

  • Log in to post comments

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Fri, 03/30/2007 - 12:46pm

Cynics regarded everybody as equally corrupt... Idealists regarded everybody as equally corrupt, except themselves.

—

Robert Anton Wilson

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • Namecheap SSL Reissue bug
  • PhpBB, WebCal, and Bower Studios Genealogy program on Apache with MySQL
  • how-do-i-search-for-elements-whose-collection-contains-another-element-in-grails
  • Import OpenSSL certificate into java keystore on Ubuntu
  • Change fonts size for SquirrelSql and other Java Swing Apps for hidpi monitors

Copyright 2021 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About