# Using PlexConnect\_daemon

**URL:** <https://forums.plex.tv/t/using-plexconnect_daemon/56750>\
**Category:** Apps & Creations\
**Created:** [February 7, 2014, 5:58am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750 "2014-02-07T05:58:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 7, 2014, 5:58am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/1 "2014-02-07T05:58:52Z")

</div>

I'll be the first to admit that I don't know much about anything when it comes to Linux. &nbsp;Using Ubuntu 10.04, python 2.7 (one of a two versions installed)

&nbsp;

When I execute:

sudo ./PlexConnect\_daemon.bash start

&nbsp;

i get a message indicating that it was successful. &nbsp;When I use the status command, I'm told that it is running. &nbsp;But when I click the trailers app on my ATV, it fails to load ("Trailers is unavailable.") &nbsp;Since python 2.7 isn't the default version of python installed, I assume that it's trying to use 2.6 and this is causing problems (as this is the last problem I was having with getting Plexconnect to work at all.)&nbsp;

&nbsp;

How do I get it to use python 2.7?

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![wahlman.j](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/wahlman.j/32/6441_2.png) [@wahlman.j](https://forums.plex.tv/u/wahlman.j)\
**Post date:** [February 7, 2014, 6:11am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/2 "2014-02-07T06:11:32Z")

</div>

Not Ubuntu but maybe this will help.  
  
[https://forums.plex.tv/topic/97010-plexconnect-on-archlinux/](https://forums.plex.tv/topic/97010-plexconnect-on-archlinux/)  
  
  
Also this which has Ubuntu:  
  
[https://forums.plex.tv/topic/71220-linux-install-for-plex-connect/](https://forums.plex.tv/topic/71220-linux-install-for-plex-connect/)

---

<div class="post-metadata">

**Author:** ![bwynants](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bwynants/32/102771_2.png) [@bwynants](https://forums.plex.tv/u/bwynants)\
**Post date:** [February 7, 2014, 8:03am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/3 "2014-02-07T08:03:01Z")

</div>

Start with then none deamon version and watch the output

---

<div class="post-metadata">

**Author:** ![simplify](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@simplify](https://forums.plex.tv/u/simplify)\
**Post date:** [February 7, 2014, 10:31am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/4 "2014-02-07T10:31:53Z")

</div>

add the following line to /etc/rc.local

python /usr/lib/PlexConnect/PlexConnect\_daemon.py

save and restart - nothing more to do. &nbsp;Obviously change the path to your PlexConnect installation to reflect your own installation. &nbsp;I have this running on Lubuntu as a VM running on Vmware ESXI 5.5

Cheers,

Darren

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 8, 2014, 2:46am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/5 "2014-02-08T02:46:26Z")

</div>

> Not Ubuntu but maybe this will help.  
>   
> [https://forums.plex.tv/topic/97010-plexconnect-on-archlinux/](https://forums.plex.tv/topic/97010-plexconnect-on-archlinux/)  
>   
> Also this which has Ubuntu:  
>   
> [https://forums.plex.tv/topic/71220-linux-install-for-plex-connect/](https://forums.plex.tv/topic/71220-linux-install-for-plex-connect/)

Refering to the 2nd post, I have already done everything leading up to the "create init script" section. &nbsp;So I create the script /etc/init.d/plexconnect as directed (using the Ubuntu script provided) and chown, chmod and update-rc.d

And then I go to start the service....and there's no service named plexconnect (?) &nbsp;

```
tom@HouseMedia:~$ sudo chown root:root /etc/init.d/plexconnect
tom@HouseMedia:~$ sudo chmod 755 /etc/init.d/plexconnect
tom@HouseMedia:~$ sudo update-rc.d plexconnect defaults
update-rc.d: warning: plexconnect start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (3 4 5)
 Adding system startup for /etc/init.d/plexconnect ...
   /etc/rc0.d/K20plexconnect -> ../init.d/plexconnect
   /etc/rc1.d/K20plexconnect -> ../init.d/plexconnect
   /etc/rc6.d/K20plexconnect -> ../init.d/plexconnect
   /etc/rc2.d/S20plexconnect -> ../init.d/plexconnect
   /etc/rc3.d/S20plexconnect -> ../init.d/plexconnect
   /etc/rc4.d/S20plexconnect -> ../init.d/plexconnect
   /etc/rc5.d/S20plexconnect -> ../init.d/plexconnect
tom@HouseMedia:~$ sudo /sbin/service plexconnect start
sudo: /sbin/service: command not found
 
```

Although I am able to start it using: $sudo service plexconnect start

(I'm not sure if there is a difference between the two command line entries though)

The trailers app is still telling me that "Trailers is unavailable" and when I check on the status of plexconnect, I'm told it's not running

```
tom@HouseMedia:/var/run$ sudo service plexconnect start 
* Starting the process PlexConnect
tom@HouseMedia:/var/run$ sudo service plexconnect status
 * PlexConnect process is not running
```

---

<div class="post-metadata">

**Author:** ![wahlman.j](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/wahlman.j/32/6441_2.png) [@wahlman.j](https://forums.plex.tv/u/wahlman.j)\
**Post date:** [February 8, 2014, 3:54am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/6 "2014-02-08T03:54:08Z")

</div>

Im not sure to be honest with you. I would look through the Ubuntu link quite a bit to try to see what you may be missing. There are a number of sucessful attempts at getting plexconnect to load at boot on Ubuntu in there. I have used a ton of flavors of linux but I have never installed plexconnect on any of them. Its been a number of years since I have used linux, I currently run OSX all day.

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 8, 2014, 5:23am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/7 "2014-02-08T05:23:52Z")

</div>

> add the following line to /etc/rc.local
> 
> python /usr/lib/PlexConnect/PlexConnect\_daemon.py
> 
> save and restart - nothing more to do. &nbsp;Obviously change the path to your PlexConnect installation to reflect your own installation. &nbsp;I have this running on Lubuntu as a VM running on Vmware ESXI 5.5
> 
> Cheers,
> 
> Darren

I like this and I gave this a go; no luck. &nbsp;I ensured the execution bit was set on /etc/rc.local as well.&nbsp;

---

<div class="post-metadata">

**Author:** ![simplify](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@simplify](https://forums.plex.tv/u/simplify)\
**Post date:** [February 9, 2014, 1:09pm UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/8 "2014-02-09T13:09:19Z")

</div>

> I like this and I gave this a go; no luck. &nbsp;I ensured the execution bit was set on /etc/rc.local as well.&nbsp;

what are the error messages you are getting? &nbsp;anything in the logs?

---

<div class="post-metadata">

**Author:** ![simplify](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@simplify](https://forums.plex.tv/u/simplify)\
**Post date:** [February 9, 2014, 1:10pm UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/9 "2014-02-09T13:10:28Z")

</div>

> I like this and I gave this a go; no luck. &nbsp;I ensured the execution bit was set on /etc/rc.local as well.&nbsp;

also what do you see if you go to terminal and simply type in&nbsp;python /usr/lib/PlexConnect/PlexConnect.py

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 10, 2014, 2:52pm UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/10 "2014-02-10T14:52:33Z")

</div>

as the others wrote, start the python PlexConnect app manually and see the output first.

After that, create a symlink to /etc/init.d/plexconnect with full path to the bash init script and add it to upstart, thats actually it

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 14, 2014, 5:25am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/11 "2014-02-14T05:25:21Z")

</div>

> as the others wrote, start the python PlexConnect app manually and see the output first.
> 
> After that, create a symlink to /etc/init.d/plexconnect with full path to the bash init script and add it to upstart, thats actually it

I'm confused by your suggestion. &nbsp;

What path do I create the symlink (that points to /etc/init.d/plexconnect) in? &nbsp;What "full path to bash init script" are you referring to? &nbsp;Doesn't upstart require an entire script and not just a command?

My apologies for not including the details of my log / output when I run plexconnect manually, see below:

```
19:45:55 PlexConnect: started: 19:45:55
19:45:55 PlexConnect: Version: 0.3.1+
19:45:55 PlexConnect: Python: 2.7.5 (default, Feb 6 2014, 21:23:43)
[GCC 4.4.3]
19:45:55 PlexConnect: Host OS: linux2
19:45:55 Settings: getsetting enable_plexconnect_autodetect=True
19:45:55 PlexConnect: IP_self: 192.168.0.111
19:45:55 Settings: getsetting hosttointercept=trailers.apple.com
19:45:55 Settings: getsetting port_webserver=80
19:45:55 Settings: getsetting enable_dnsserver=True
19:45:55 DNSServer: started: 19:45:55
19:45:55 Settings: getsetting port_dnsserver=53
19:45:55 Settings: getsetting ip_dnsmaster=208.122.23.23
19:45:55 Settings: getsetting prevent_atv_update=True
19:45:55 DNSServer: ***
19:45:55 DNSServer: DNSServer: Serving DNS on 192.168.0.111 port 53.
19:45:55 DNSServer: intercept: ['trailers.apple.com'] => 192.168.0.111
19:45:55 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
19:45:55 DNSServer: forward other to higher level DNS: 208.122.23.23
19:45:55 DNSServer: ***
19:45:55 WebServer: started: 19:45:55
19:45:55 Settings: getsetting port_webserver=80
19:45:55 WebServer: ***
19:45:55 WebServer: WebServer: Serving HTTP on 192.168.0.111 port 80.
19:45:55 WebServer: ***
19:45:55 ATVSettings: init class CATVSettings
19:45:55 ATVSettings: load settings
19:45:55 Settings: getsetting enable_webserver_ssl=True
19:45:55 WebServer: started: 19:45:55
19:45:55 Settings: getsetting port_ssl=443
19:45:55 Settings: getsetting certfile=./assets/certificates/trailers.pem
19:45:55 Settings: getsetting certfile=./assets/certificates/trailers.pem
19:45:55 WebServer: ***
19:45:55 WebServer: WebServer: Serving HTTPS on 192.168.0.111 port 443.
19:45:55 WebServer: ***
19:46:07 DNSServer: DNS request received!
19:46:07 DNSServer: Source: ('192.168.0.164', 54767)
19:46:07 DNSServer: Domain: itunes.apple.com
19:46:07 DNSServer: ***forward request
19:46:07 DNSServer: -> DNS response from higher level
19:46:07 DNSServer: DNS request received!
19:46:07 DNSServer: Source: ('192.168.0.164', 53778)
19:46:07 DNSServer: Domain: EVSecure-ocsp.verisign.com
19:46:07 DNSServer: ***forward request
19:46:07 DNSServer: -> DNS response from higher level
19:46:08 DNSServer: DNS request received!
19:46:08 DNSServer: Source: ('192.168.0.164', 51238)
19:46:08 DNSServer: Domain: e5153.b.akamaiedge.net
19:46:08 DNSServer: ***forward request
```

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 14, 2014, 9:20am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/12 "2014-02-14T09:20:28Z")

</div>

as far as I can tell it is working correctly.&nbsp;

You need to do the following :&nbsp;

```
ln -s /etc/init.d/plexconnect /path/to/plexconnect/PlexConnect_daemon.bash
```

and then&nbsp;

```
sudo update-rc.d plexconnect defaults
```

That should actually do it

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 15, 2014, 5:10am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/13 "2014-02-15T05:10:48Z")

</div>

> as far as I can tell it is working correctly.&nbsp;
> 
> You need to do the following :&nbsp;
> 
> ```
> ln -s /etc/init.d/plexconnect /path/to/plexconnect/PlexConnect_daemon.bash
> ```
> 
> and then&nbsp;
> 
> ```
> sudo update-rc.d plexconnect defaults
> ```
> 
> That should actually do it

No luck.

```
tom@HouseMedia:~/PlexConnect-master$ ln -s /etc/init.d/plexconnect /home/tom/PlexConnect-master/PlexConnect_daemon.bash
ln: creating symbolic link`/home/tom/PlexConnect-master/PlexConnect_daemon.bash': File exists
tom@HouseMedia:~/PlexConnect-master$ sudo update-rc.d plexconnect defaults
[sudo] password for tom:
update-rc.d: warning: plexconnect start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (3 4 5)
 System start/stop links for /etc/init.d/plexconnect already exist.
```

And then I restart the system and have a look at what's happening...

```
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect status
 * PlexConnect process is not running
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect start
 * PlexConnect process is not running
 * Starting the process PlexConnect
tom@HouseMedia:~/PlexConnect-master$ sudo service plexconnect status
 * PlexConnect process is not running
```

the log doesn't show anything new having happened and nothing on the ATV (including trailers) seems to be able to see the network. &nbsp;I then start plexconnect manually and the ATV (including plexonnect) &nbsp;works as it should again. &nbsp;Even with PlexConnect clearly running (everything works) the plexconnect service insists that it has not been started.

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 15, 2014, 9:34am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/14 "2014-02-15T09:34:15Z")

</div>

if you already have a /etc/init.d/plexconnect file you can't create a symlink there.&nbsp;

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 16, 2014, 12:15am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/15 "2014-02-16T00:15:14Z")

</div>

> if you already have a /etc/init.d/plexconnect file you can't create a symlink there.&nbsp;

Looking up[&nbsp;how the ln command works](http://askubuntu.com/questions/56339/how-to-create-a-soft-or-symbolic-link), it appears that you're asking me to create a symlink named, "/PlexConnect-master/PlexConnect\_daemon.bash" that references the location "/etc/init.d/plexconnect" &nbsp; Is that what you're asking me to do?

Or should I be creating a symlink in /etc/init.d/plexconnect that references the PlexConnect\_daemon.bash ???

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 16, 2014, 4:10pm UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/16 "2014-02-16T16:10:35Z")

</div>

it seems you're not dumb, you can figure this one out! :P I didn't look it up, just wrote how I remembered it. Just try it.&nbsp;

But as I said, it seems you had a init script there already, your errors before said so

---

<div class="post-metadata">

**Author:** ![antiartist](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@antiartist](https://forums.plex.tv/u/antiartist)\
**Post date:** [February 17, 2014, 2:26am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/17 "2014-02-17T02:26:53Z")

</div>

> it seems you're not dumb, you can figure this one out! :P I didn't look it up, just wrote how I remembered it. Just try it.&nbsp;
> 
> But as I said, it seems you had a init script there already, your errors before said so

Yep, not dumb, just confused. &nbsp;

I have deleted the existing /etc/init.d/plexconnect file and create the symlink but then I get this strange error doing update-rc.d:&nbsp;

```
tom@HouseMedia:/etc/init.d$ sudo ln -s /path/to/plexconnect/PlexConnect_daemon.bash /etc/init.d/plexconnect
tom@HouseMedia:/etc/init.d$ sudo update-rc.d plexconnect defaults              
update-rc.d: /etc/init.d/plexconnect: file does not exist
tom@HouseMedia:/etc/init.d$ ls
alsa-mixer-save lm-sensors sendsigs
anacron lxdm single
apache2 mediatomb skeleton
apparmor mgetty-fax smbd
atd module-init-tools spamassassin
avahi-daemon mt-daapd ssh
bacula-director mysql stop-bootlogd
bacula-fd networking stop-bootlogd-single
bacula-sd network-interface sysstat
bluetooth network-interface-security tightvncserver
bootlogd network-manager transmission-daemon
calibre nmbd udev
clamav-daemon ntp udev-finish
clamav-freshclam ondemand udevmonitor
console-setup plexconnect udevtrigger
cron plexmediaserver ufw
cups plymouth umountfs
dbus plymouth-log umountnfs.sh
dmesg plymouth-splash umountroot
dns-clean plymouth-stop unattended-upgrades
dropbox postfix urandom
failsafe-x powernowd vboxautostart-service
fancontrol powernowd.early vboxballoonctrl-service
forked-daapd.dpkg-new pppd-dns vboxdrv.dpkg-bak
grub-common procps vboxweb-service
halt rc virtualbox-ose
hostname rc.local webmin
hsf rcS wpa-ifupdown
hwclock README x11-common
hwclock-save reboot xdm
hylafax rsync xinetd
irqbalance rsyslog yum-updatesd
killprocs screen-cleanup
```

But as you can see, /etc/init.d/plexconnect does indeed exist.

wtf....

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 17, 2014, 7:37am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/18 "2014-02-17T07:37:01Z")

</div>

yea, you created a symlink to /path/to/plexconnect/ which of course does not exist :D

You should replace that path with /home/tom/PlexConnect-master/PlexConnect\_daemon.bash

a&nbsp;

```
ls -la
```

command in /etc/init.d/ will show that you basically directed that link to a nonexistent file. It does of course now exist but it doesnt point to anything so it actually does not exist :)

---

<div class="post-metadata">

**Author:** ![Azathoth](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/azathoth/32/138610_2.png) [@Azathoth](https://forums.plex.tv/u/Azathoth)\
**Post date:** [February 17, 2014, 11:12am UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/19 "2014-02-17T11:12:17Z")

</div>

> It does of course now exist but it doesnt point to anything so it actually does not exist :)

Very Schrödinger'esque ;)

---

<div class="post-metadata">

**Author:** ![shapethelola](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@shapethelola](https://forums.plex.tv/u/shapethelola)\
**Post date:** [February 17, 2014, 12:26pm UTC](https://forums.plex.tv/t/using-plexconnect_daemon/56750/20 "2014-02-17T12:26:36Z")

</div>

yea sure, but why not :P

[Next page](https://forums.plex.tv/t/using-plexconnect_daemon/56750.md?page=2)
