do you need to keep the terminal window open?

Very new to Plex, and just managed to get the system functional (almost posted a full detailed report, but figured it out, whew!).  Anyway, my main question is just what the title says.  I can't seem to get into the "movie trailers" unless the terminal window I run "sudo ./PlexConnect.py" in is still open.  Is there anyway to set it running in the background?  Do I just need to hide the window and let it run? 

 

Thanks!  Great solution and it runs great so far in my very limited testing!

Very new to Plex, and just managed to get the system functional (almost posted a full detailed report, but figured it out, whew!).  Anyway, my main question is just what the title says.  I can't seem to get into the "movie trailers" unless the terminal window I run "sudo ./PlexConnect.py" in is still open.  Is there anyway to set it running in the background?  Do I just need to hide the window and let it run? 

Thanks!  Great solution and it runs great so far in my very limited testing!

"sudo ./PlexConnect.py &"

As I said, I am new to this, and that includes anything with command line.  I don't see what that does.  Can you clarify?

I'd recommend using 'screen'. With screen, you can have multiple terminal sessions that persist even after logging-out/closing the terminal window.

1) check for screen command

# which screen
/usr/bin/screen

 
 

2) create a terminal session solely for PlexConnect; we'll call it 'plexconnect'

# screen -S plexconnect

3) run the python script

# ./PlexConnect.py

4) detach from the session w/o backgrounding or losing debug output from PlexConnect

CTRL a + d

5) reattach to the session where you left PlexConnect running

# screen -r plexconnect

As I said, I am new to this, and that includes anything with command line.  I don't see what that does.  Can you clarify?

& tells it to run the command in the "background" so it does no longer requires a running shell.

I'd recommend using 'screen'. With screen, you can have multiple terminal sessions that persist even after logging-out/closing the terminal window.

He's running OSX, not ubuntu.

He's running OSX, not ubuntu.

Its a GNU until; so it will be native on OSX. The steps are available for anyone else that comes across this thread wanting to background PlexConnect & still utilize everything it sends to STDOUT. cheers

Its a GNU until; so it will be native on OSX. The steps are available for anyone else that comes across this thread wanting to background PlexConnect & still utilize everything it sends to STDOUT. cheers

apt-gets and yum's will make it all rather confusing though....

*edited for simplicity

When I type in "sudo ./PlexConnect.py &" it says 

localhost:PlexConnect-XML_templates SpOnkey$ sudo ./PlexConnect.py &

[1] 287
 
So I type in "sudo ./PlexConnect.py" to get it running, and then then tried to type "sudo ./PlexConnect.py &" in again and it says 
 
sudo ./PlexConnect.py &
PlexConnect : Shutting down.
WebServer : Shutting down.
DNSServer : Shutting down.
Exception in thread QueueFeederThread (most likely raised during interpreter shutdown):
[1]+  Stopped                 sudo ./PlexConnect.py
 
So all I see is that it shuts it down.  
 
As for the other stuff.  I tried entering a few of the commands but obviously wasn't quite doing it right.  I'd need really beginner directions. i.e. 1) open terminal 2) type in ______  Thanks for the help so far!  Its all very educational.  I'm glad I have plex running, and it sounds like there is a way to set it running and then not have an application and window running all the time, so I hope I can figure that out too.

The application is currently designed to shutdown as soon as you hit any buttons when the window is focused (it says this when it starts up).

We have not yet released v0.1 (soon though) so anyone running this is running an ALPHA version from source code!

There are ways to get round having to keep an open window running (if you really cannot just minimise it) e.g.:

  • on OSX using methods like the above, using automator or using the Platypus application to create a wrapper
  • on Windows creating a bat file then converting it to an exe running as ghost


    Feel free to use these methods if you know what you are doing or are prepared to research them, just be aware that we will not support them (you will need to revert back to the standard setup for that).


    When we do point releases, e.g. v0.1, we will look to release as applications to remove this issue.

Oh cool.  Thanks so much for all your help.  Works great, and I can definitely live with the window minimized for now.

Thanks jwest for the 'screen' command guidance.  

PlexConnect appears to be working straight off on my Ubuntu 12.04.2 PMS.  Just needed a steer towards something other than sending the command to the background.

If you create a shortcut in your startup folder for windows 7 to plexconnect.py and then right click it and then associate it (right click>"open with") with pythonw.exe rather than the normal python.exe file, you should be able to get it to run in the background once you restart your computer. I just tested in on my atv2 and it worked. you should see the process running in your task manager window.

When I type in "sudo ./PlexConnect.py &" it says 

localhost:PlexConnect-XML_templates SpOnkey$ sudo ./PlexConnect.py &

[1] 287
 
So I type in "sudo ./PlexConnect.py" to get it running, and then then tried to type "sudo ./PlexConnect.py &" in again and it says 
 

sudo ./PlexConnect.py &
PlexConnect : Shutting down.
WebServer : Shutting down.
DNSServer : Shutting down.
Exception in thread QueueFeederThread (most likely raised during interpreter shutdown):
[1]+  Stopped                 sudo ./PlexConnect.py
 
So all I see is that it shuts it down.  
 
As for the other stuff.  I tried entering a few of the commands but obviously wasn't quite doing it right.  I'd need really beginner directions. i.e. 1) open terminal 2) type in ______  Thanks for the help so far!  Its all very educational.  I'm glad I have plex running, and it sounds like there is a way to set it running and then not have an application and window running all the time, so I hope I can figure that out too.

After typing 

localhost:PlexConnect-XML_templates SpOnkey$ sudo ./PlexConnect.py &

[1] 287

It was running already, you shouldnt have to do anything else. 

The number just tells you the pid (I think) and thats it. 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.