
Ubuntu日本語フォーラム

ログインしていません。
初めて投稿させていただきます。
初心者ながら色々なところを参考にさせていただき10.04LTSの環境を構築しています。
今回は Airplay, AirprintをUbuntu環境で実現しようと四苦八苦しております。
参考にしたサイトは
http://hartlessbydesign.com/blog/view/197-airprint-with-ubuntu-1010
http://gyttja.wordpress.com/2010/11/11/airprint-on-ubuntu/
などです。CUPSで印刷は普通に出てます。しかしiPadから「プリンタを選択」としても
「プリンタが見つかりません」と出ます。
avahiのログは以下なので、サービスは動いているように見えます。
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9369]: Got SIGTERM, quitting.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9369]: Leaving mDNS multicast group on interface eth0.IPv4 with address 116.64.118.44.
Feb 13 00:56:36 Ubuntu-server init: avahi-daemon main process (9369) terminated with status 255
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Found user 'avahi' (UID 104) and group 'avahi' (GID 111).
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Successfully dropped root privileges.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: avahi-daemon 0.6.25 starting up.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Successfully called chroot().
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Successfully dropped remaining capabilities.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Loading service file /services/printer.service.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Joining mDNS multicast group on interface eth0.IPv4 with address 116.64.118.44.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: New relevant interface eth0.IPv4 for mDNS.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.0.1.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: IP_ADD_MEMBERSHIP failed: No buffer space available
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Network interface enumeration completed.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Registering new address record for ***.***.***.*** on eth0.IPv4.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Registering new address record for 192.168.0.1 on eth1.IPv4.
Feb 13 00:56:36 Ubuntu-server avahi-daemon[9410]: Registering HINFO record with values 'I686'/'LINUX'.
Feb 13 00:56:37 Ubuntu-server avahi-daemon[9410]: Server startup complete. Host name is Ubuntu-server.local. Local service cookie is 1194243616.
Feb 13 00:56:38 Ubuntu-server avahi-daemon[9410]: Service "Canon-iP4500-series" (/services/printer.service) successfully established.
/etc/avahi/services/printer.serviceは以下です。
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name>Canon-iP4500-series</name>
<service>
<type>_ipp._tcp</type>
<subtype>_universal._sub._ipp._tcp</subtype>
<port>631</port>
<txt-record>txtver=1</txt-record>
<txt-record>qtotal=1</txt-record>
<txt-record>rp=printers/Canon-iP4500-series</txt-record>
<txt-record>ty=Canon-iP4500-series</txt-record>
<txt-record>adminurl=http://192.168.0.1:631/printers/Canon-iP4500-series</txt-record>
<txt-record>note=Canon-iP4500-series</txt-record>
<txt-record>priority=0</txt-record>
<txt-record>product=virtual Printer</txt-record>
<txt-record>printer-state=3</txt-record>
<txt-record>printer-type=0x801046</txt-record>
<txt-record>Transparent=T</txt-record>
<txt-record>Binary=T</txt-record>
<txt-record>Fax=F</txt-record>
<txt-record>Color=T</txt-record>
<txt-record>Duplex=T</txt-record>
<txt-record>Staple=F</txt-record>
<txt-record>Copies=T</txt-record>
<txt-record>Collate=F</txt-record>
<txt-record>Punch=F</txt-record>
<txt-record>Bind=F</txt-record>
<txt-record>Sort=F</txt-record>
<txt-record>Scan=F</txt-record>
<txt-record>pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf</txt-record>
<txt-record>URF=W8,SRGB24,CP1,RS600</txt-record>
</service>
</service-group>
Firewallかと思い、631を開放しましたが変わりません。しかしDaemonログに以下のようなものが出ます。
Feb 13 01:28:54 Ubuntu-server dhcpd: DHCPREQUEST for 192.168.0.6 from **:**:**:**:**:** via eth1
Feb 13 01:28:54 Ubuntu-server dhcpd: DHCPACK on 192.168.0.6 to **:**:**:**:**:** via eth1
なぜか無線LANの基地局からは
ポート 80,8000,8080,3389,21の接続要求が出るので一度開放してみましたが変わりませんでした。
AirPlayは以下よりpluginを入手し、pluginを有効にしましたが、なぜかiPad側のアプリにAirplayのためのアイコンが出ません。
http://cgit.sukimashita.com/totem-plugin-airplay.git/
どう見てもiPadからUbuntuが見えていない様子です。
あと、どこをいじればいいのかどなたか経験のある方教えてください。
オフライン
自己レスです。
http://l-w-i.net/t/fedora/avahi_002.txt
を見ると、
avahi-browse -a -t
とやっても返事が来ないので、Firewallと思い、
http://ubuntuforums.org/showthread.php?t=1139470
を見て
/etc/firestarter/user-pre
に
$IPT -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
を加え、
sudo /etc/init.d/firestarter restart
したところ、
avahi-browse -a -t
+ eth0 IPv4 Canon-iP4500-series Internet Printer local
+ eth0 IPv4 Ubuntu-server [**:**:**:**:**:**] Workstation local
と表示されるようになりました。
しかし依然、Airprintにプリンタが表示されません。。Airvideoは上記のサービスに表示されなくていいのでしょうかね。
オフライン
また自己レスです。
https://help.ubuntu.com/community/HowToZeroconf
のとおりにリモートアクセスしようとしたら、
IPアドレスではVNC接続できますが、ホスト名の
Ubuntu-server.local
とやって接続しようとしても全く接続できないので、 Avahiが問題と分かって来ました。
$ sudo /etc/init.d/firestarter stop
でFirestarterを止めても状況同じです。
/etc/avahi/avahi-daemon.conf は以下です。
#host-name=Ubuntu-server
以外はいじってません。
# $Id$
#
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
# See avahi-daemon.conf(5) for more information on this configuration
# file!
[server]
#host-name=Ubuntu-server
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=no
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
[wide-area]
enable-wide-area=yes
[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
#publish-hinfo=yes
#publish-workstation=yes
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no
[reflector]
#enable-reflector=no
#reflect-ipv=no
[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=300
rlimit-stack=4194304
rlimit-nproc=3
$ ps aux |grep avahi-daemon すると、
avahi 14546 0.0 0.0 2928 1664 ? S 03:16 0:00 avahi-daemon: running [Ubuntu-server.local]
avahi 14547 0.0 0.0 2928 544 ? Ss 03:16 0:00 avahi-daemon: chroot helper
tkameda 16376 0.0 0.0 2892 908 pts/1 S+ 03:33 0:00 grep --color=auto avahi-daemon
tkameda@Ubuntu-server:~$
と出ていてAvahi-daemonが動いているように思えます。
しかし、
$ping Ubuntu-server.local
とすると、自分へのPingでも
ping: unknown host Ubuntu-server.local
と出てしまいます。
$avahi-browse -a -t
は先ほど書き込んだような表示が出ます。
無線LANが悪いのかなと思い、バッファローの「マルチキャスト制御」をOFFにしましたが変わりませんでした。
オフライン
私も初めて投稿させていただきます。
ご回答になるかわかりませんが、10.10で下記を実行することでAirPrintは実行可能になりました。
1.プリンタを印刷可能にしておく
2.下記を実行
sudo add-apt-repository ppa:hughescih/ppa && sudo apt-get update && sudo apt-get install airprint-daemon
3.システム管理→印刷→サーバ→設定→このシステムに接続されている…→インターネットからの印刷許可のチェックを入れる
<参考>
http://gtk-apps.org/content/show.php/Apple+AirPrint+Support+for+Ubuntu?content=136756
上記でiPhone3GS(iOS4.2.1)からはAirPrintが可能になりました。9.04でも動作可能なようなので、おそらく10.04でも動作可能だと思います。
オフライン
早速のご返答ありがとうございます。
ご指摘いただいた方法もあることは認識していたのですが、アプリケーションを入れなければならない点、
インターネットからの接続も許可をするのでセキュリティが大丈夫なのか不安なので試してませんでした。
試したのですが、やはりうまくいきません。
実は手前のiPadはGreenpois0n RC5でJBしてまして、それが悪いのかもしれません。
AirVideoからはBonjourにつながっているの関係しているのか分かりませんが。
iPadを一度初期化してから改めて再度挑戦したいと思います。ありがとうございました。
オフライン
ところで、現在の環境で、Ubuntuサーバーや他のPCから
$ ping ホスト名.local
となるとどうなりますか。
当方の環境では未だ
ping: unknown host ホスト名.local
と出ます。貴殿の環境ではただしくpingが帰ってくるのでしょうか。
オフライン
AirPrint解決しました。
やはりAvahiでした。
/etc/nsswitch.conf
を、
hosts: files dns
から
# hosts: files dns
hosts: files mdns4_minimal [NOTFOUND=return] dns
にして再起動したところ、無事にAvahiで参照できるようになり、Airprintが動き出しました。
目的だった Totem Airplay はまだ動きませんが、iPadにAirplayのメニューも出るようになったので
ボチボチがんばりたいとおもいます。
ありがとうございました。
オフライン