<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Drahgon</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Drahgon"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Drahgon"/>
	<updated>2026-04-20T07:31:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12678</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12678"/>
		<updated>2011-01-15T18:20:58Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Current Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, use novacom to access the Pre and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I have detailed a solution by running Avahi with root privileges however an approach which allow it to run after dropping root privileges is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12677</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12677"/>
		<updated>2011-01-15T18:20:37Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Current Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, use novacom to access the Pre and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I have detailed a solution by running the avahi with root privileges however an approach which allow it to run after dropping root privileges is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12676</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12676"/>
		<updated>2011-01-15T18:19:10Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, use novacom to access the Pre and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12675</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12675"/>
		<updated>2011-01-15T18:16:48Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12674</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12674"/>
		<updated>2011-01-15T18:16:08Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link to from to palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12673</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12673"/>
		<updated>2011-01-15T18:15:19Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is however to allow Avahi with dbus support by creating a symbolic link to from to palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12672</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12672"/>
		<updated>2011-01-15T18:14:47Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
It is possible to enable allow Avahi to run with with dbus support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is however to allow Avahi with dbus support by creating a symbolic link to from to palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12671</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=12671"/>
		<updated>2011-01-15T18:14:02Z</updated>

		<summary type="html">&lt;p&gt;Drahgon: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
It is possible to enable allow Avahi to run with with dbus support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is however to allow Avahi with dbus support by creating a symbolic link to from to palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Drahgon</name></author>
	</entry>
</feed>