Loading...

2010-08-15

OpenSolaris Tips: CUPS - OpenSolaris Printing Howto on my Notebook PC


  My Notbook PC の OpenSolaris snv_134 な環境で、CUPS を動作させて、プリンタ出力する試み。

  ここから CUPS の設定方法の情報を得て、手持ちのプリンタを設定し、出力することができた。
  ↓
  Community Group printing: Documentation > Using CUPS in the Solaris OS:
  http://hub.opensolaris.org/bin/view/Community+Group+printing/Using+CUPS+in+the+Solaris+OS


  システム・ハードウェア環境:


  Environment:
   baian@saturn:~$ uname -a
   SunOS saturn 5.11 snv_134 i86pc i386 i86pc Solaris

  Platform:
   Dell Latitude D410: Intel Pentium M730(1.6GHz), Intel 915GM,
   LCD 12.1inch, SODIMM PC2-5300(533MHz) 2048MB, HDD 100GiB/160GiB
   NIC(Wired): Broadcom NetXtreme BCM5751 Gigabit Ethernet PCI Express
   NIC(Wireless): Intel PRO/Wireless 2200BG Network Connection (802.11b/g)


  # OpenSolaris 次期リリースでは、CUPS がデフォルトの print service になるそうだったのだが、混迷中?なので・・・


 設定手順

  Step-01: My Notbook PC の snv_134 な環境で、CUPS を動作させるに必要なパッケージのインストール:

  # インストール済みの関連パッケージは次のとおり。

  $ pkg list |grep cups

  library/desktop/gtk2/gtk-backend-cups       0.5.11-0.134   インストール済み -----
  library/print/cups-libs                     1.4.2-0.134   インストール済み -----
  library/python-2/pycups                    1.9.46-0.134   インストール済み -----
  print/cups                                  1.4.2-0.134   インストール済み -----
  print/cups/filter/foomatic-db          0.20080903-0.134   インストール済み -----
  print/cups/filter/foomatic-db-engine   0.20080903-0.134   インストール済み -----
  print/cups/hal-cups-utils                  0.6.19-0.134   インストール済み -----
  print/cups/system-config-printer           0.5.11-0.134   インストール済み -----

  $ pkg list |grep hplip

  print/filter/hplip                          3.9.8-0.134   インストール済み -----

  Step-02: アクティブなプリントサービスの確認(クエリ):

  # print-service -q
  active print service: lp ・・・ default で LP が動作中。
  (active print service: cups ・・・ CUPSが動作中。)

  Step-03: プリントサービスを CUPS に切り替える。※ 参照:man print-service(1M)

  # print-service -s cups

  # print-service -q
  active print service: cups   ・・・ # CUPS に切り替わった。


  Step-04: ここで、二つのSMFサービス/デーモンが有効になっていることを確認する。

  # svcs -v svc:/application/cups/scheduler
  # svcs -v svc:/application/cups/in-lpd


  Step-05: CUPS Web interface : http://localhost:631/ からアクセスして、手持ちプリンタの設定を完了させる。

Fig-01: CUPS Web Interface

  Step-06: テストプリントを出力。日本語表記部分が文字化け(豆腐)している。

             実際の日本語文書の出力は問題ない。

  Step-07: 利用可能なプリンタ名を一覧表示させる。

  $ lpstat -p

  プリンター Canon_LBP3800 は待機中です。2010年08月10日 18時39分41秒 以来有効です
  Ready to print.(Default Printer: 100BASE-TX I/F)
  プリンター Photosmart-C5200-series は 2010年08月10日 10時46分25秒 から無効です -
  Unplugged or turned off : Local USB 接続時に使用
  プリンター Photosmart_C5280_LAN は待機中です。2010年08月10日 11時03分34秒 以来有効です
  プリントの準備ができています : プリントサーバ(USB/100BASE-TX)経由、常用。

  # Default Printer: Canon LBP3800(LIPS IV) は GS で出力.

Fig-02: Default Printer: Canon LBP3800(LIPS Ⅳ)

"Dynamic Printer Detection":

CUPS uses the Hardware Abstraction Layer (HAL) to detect directly attached USB printers. For the detection of network printers, CUPS...
CUPS broadcasts the printers that are available on the local system to every system that is on the network.

"Printing to a Windows Hosted Printer From CUPS":

To print to a Windows hosted printer from CUPS, use the following command to create a print queue:

# lpadmin -p queue-name -v smb:~/~/windows-host/queue...

Or, access the CUPS Web interface: http://localhost:631/

The CUPS print service uses smbspool(1M) from Samba to communicate with the Windows SMB print server./print-service


"How to Add a New Attached Printer From the Desktop (GUI)":

Select "System" -> "Administration" -> "Print Manager" from the gnome menus

Fig-03: Print Manager from Gnome menus

Fig-04: Printer Property; Canon LBP3800(LAN-connection)


"Tasks That You Can Perform by Using CUPS":

Common tasks that you can perform by using the CUPS GUI or the Web interface include:
  • Adding a new USB attached printer
  • Adding a new network-attached printer
  • Modifying the properties of an existing print queue
  • Deleting a print queue


  Reference:

  CUPS:

  HPLIP:

  print-service:
  • The print-service command provides a mechanism for switching between LP and CUPS print services.
    Changing the active print service requires that it be run as the root user or a user with "Printer Management" privileges.
    For more information, see the print-service(1M) man page.


0 Comments::