私的メモ:LPRで印刷できるようにする

そういや、*BSDとかLinuxとかSolarisとかから印刷ってした事が無かった(汗 まぁマカーだし、オレ。
んな訳で、「SolarisからPostScriptプリンタで取り敢えず出せるだけ」な状態を設定することに。
以下、基本的に初歩的なことだろうから私的メモってことで。

・/etc/inet/hosts にプリンタ foo を追記
$ sudo vi /etc/inet/hosts

・プリンタ foo の登録
$ sudo lpadmin -p foo -v /dev/null -m netstandard -o dest=foo -T PS -I postscript
$ sudo enable foo
$ sudo accept foo
$ lpstat -p foo
(状況を確認)

$ lp -d foo hoge.txt 
UX:lp: ERROR: There is no filter to convert the file content.
      TO FIX: Use the lpstat -p -l command to find a
              printer that can handle the file type
              directly, check your filters using lpfilter -f all -l, or
              consult with your system
              administrator.
(filterが無いと怒られている)

・フィルタ jpostscript の用意
$ sudo lpfilter -f all -l
(何も登録されてないので、jpostscriptを登録する)

$ cd /etc/lp/fd
$ sudo cp jpostprint.fd jpostprint.fd.orig
$ sudo vi jpostprint.fd

	Printers:  を
	Printers: any に書き換え

$ sudo lpfilter -f jpostprint -F /etc/lp/fd/jpostprint.fd

・印刷
$ lp -d foo ~/hoge.txt 

以上。
まぁ「バナーページが出ちゃう」とか「デフォルトプリンタの設定すれば“-d foo”が不要」とかは取り敢えず置いといて。
出たのでOKとする。
参考にしたのは、以下。