README-main 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. $OpenBSD: README-main,v 1.16 2015/07/07 14:33:34 ajacoutot Exp $
  2. +-----------------------------------------------------------------------
  3. | Running ${FULLPKGNAME} on OpenBSD
  4. +-----------------------------------------------------------------------
  5. Adding and/or configuring CUPS printers can be done with lpadmin(8), but
  6. for a quick and easy (graphical) setup, after starting the CUPS daemon,
  7. point your browser to:
  8. https://localhost:631
  9. Alternatively, adding and/or configuring CUPS printers can be done with
  10. lpadmin(8) (the foomatic tools may be needed as well, to create the
  11. corresponding PPD file see below).
  12. Printer drivers are available as separate packages. The Foomatic
  13. framework provides most of them (see the foomatic-db-engine package
  14. documentation for more information and creating PPD files;
  15. ${LOCALBASE}/share/doc/pkg-readmes/foomatic-db-engine-*).
  16. Printer backends are also available as packages.
  17. e.g. cups-bjnp, hpcups/hplip, ptouch-driver, splix...
  18. To be able to use CUPS printers from GTK+ applications, the gtk+2-cups and/or
  19. gtk+3-cups packages need to be installed.
  20. USB
  21. ===
  22. Since USB printing will be handled by libusb, you need to allow the
  23. _cups user access to the corresponding USB endpoint. To do so, find
  24. where your printer is attached to using:
  25. # usbdevs -vd
  26. then change the ownerships accordingly.
  27. e.g.
  28. Controller /dev/usb3:
  29. addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
  30. uhub3
  31. port 1 powered
  32. port 2 addr 2: full speed, self powered, config 1, USB MFP(0x082f), EPSON(0x04b8), rev 1.00, iSerialNumber L83010704250947490
  33. ugen0
  34. # chown _cups /dev/ugen0.* /dev/usb3
  35. The reason we are changing the user and not the group is that it will
  36. allow for multi-function devices to work for both printing and scanning
  37. (e.g. by being owned by _cups:_saned).
  38. To preserve your changes after a system update, use rc.local(8).
  39. e.g. for a multi-function printer/scanner add the following lines:
  40. chown _cups:_saned /dev/ugen0.* /dev/usb1
  41. Alternatively, hotplugd(8) attach/detach scripts can automate this.
  42. *** WARNING ***
  43. ulpt(4) needs to be disabled in the kernel (see config(8)) or the printer
  44. will not be available to libusb.
  45. Printer Sharing using mDNS
  46. ==========================
  47. Browsing for shared printers can be done with multicast DNS (mDNS) using
  48. the avahi daemon.
  49. On the client side, "avahi-daemon" (from the avahi package) and
  50. "cups-browsed" (from the cups-filters package) must be running by
  51. adding "avahi_daemon" and "cups_browsed" to pkg_scripts in rc.conf.local(8).
  52. One the server side, "avahi-daemon" must be running by adding
  53. "avahi_daemon" to pkg_scripts in rc.conf.local(8). Then
  54. printer sharing can be activated using the CUPS web interface or running
  55. the following commands as root or a member of the wheel group:
  56. cupsctl --share-printers
  57. lpadmin -p <printer_name> -o printer-is-shared=true
  58. Printer Sharing across subnets using DNS-SD
  59. ===========================================
  60. In general multicast DNS can only advertise shared printers on the local
  61. subnet. This can be problematic if some clients are on a different
  62. segment (e.g. wireless tablet devices).
  63. Also some users may prefer to avoid the multicast traffic generated by
  64. mDNS or prefer not to rely on avahi.
  65. In such cases 'wide area' DNS service discovery (DNS-SD) can provide an
  66. elegant solution. The administrator simply adds specially-formatted
  67. static records to the DNS server used by the clients, that advertise the
  68. address and capabilities of the print server. See http://www.dns-sd.org
  69. for details.
  70. DNS service discovery involves only the DNS records - there is no need
  71. for the print server to run Avahi or for mDNS to be implemented. DNS-SD
  72. and mDNS may however be used simultaneously if desired.
  73. Sample extract from a DNS zone file:
  74. ; zone file for the 'wlan' sub-domain of 'example.com.'
  75. ;
  76. $ORIGIN wlan.example.com.
  77. $TTL 1h
  78. @ IN SOA nameserver.example.com. admin.example.com. (
  79. 1304061 ; zone file serial number
  80. 3h ; slave refresh 3 hours
  81. 1h ; slave retry 1 hour
  82. 7d ; slave expire 1 week
  83. 1h ; max caching time in case of failed lookups 1 hour
  84. )
  85. @ IN NS nameserver.example.com.
  86. ;=========================
  87. ; DNS-SD resource records
  88. ;=========================
  89. ; DNS-SD domain enumeration
  90. ; these records invite clients to browse this domain
  91. ;
  92. b._dns-sd._udp IN PTR @ ; b = browse domain (b._dns-sd._udp.wlan.example.com)
  93. lb._dns-sd._udp IN PTR @ ; lb = legacy browse domain (lb._dns-sd._udp.wlan.example.com)
  94. ; DNS-SD named service entities
  95. ; these records list the services we want clients to be able to discover
  96. ;
  97. _cups._sub._ipp._tcp IN PTR Samsung\032Laser._printer._tcp
  98. _universal._sub._ipp._tcp IN PTR Samsung\032Laser._printer._tcp
  99. ; DNS-SD srv and txt records
  100. ; these describe each service entity listed above
  101. ;
  102. Samsung\032Laser._printer._tcp IN SRV 0 0 631 printserver.example.com.
  103. IN TXT ( "txtvers=1"
  104. "qtotal=1"
  105. "Transparent=T"
  106. "URF=DM3"
  107. "rp=printers/CLP-500"
  108. "note=Samsung colour laser"
  109. "product=(GPL Ghostscript)"
  110. "printer-state=3"
  111. "printer-type=0x82305c"
  112. "pdl=application/octet-stream,application/pdf,application/postscript,image/gif,image/jpeg,image/png,image/tiff,image/urf,text/html,text/plain,application/vnd.adobe-reader-postscript,application/vnd.cups-command,application/vnd.cups-pdf" )
  113. [... regular resource records ...]
  114. Note: the fields and values encoded in the TXT record replicate those
  115. that would appear in the mDNS announcement for the CUPS shared printer
  116. - these can be determined for example with Tim Fontaine's
  117. 'airprint-generate' script. Using "URF=DM3" appears to provide the best
  118. support for Apple iOS clients such as the iPad.