Jump to content


Photo

Disable Media Manager Autostart in Mac OS X


  • Please log in to reply
18 replies to this topic

#1 mooner

mooner

    Member

  • Members
  • PipPip
  • 17 posts

Posted 04 September 2010 - 05:12 PM

So for some reason the media manager autostarts when I statup my mac (I assume on login) but its not in my login items, etc.
I would like it to start when I start Plex (and maybe even quit when I quit the app!) but not when I just login to the machine. Can anyone shed some light on how to do this?

Thanks!

#2 Raindancing

Raindancing

    Plex Star

  • Members
  • PipPipPipPipPipPip
  • 1533 posts
  • Location: Austin, Texas, USA

Posted 04 September 2010 - 05:27 PM

Inside Plex, go to Preferences > System > Media Server and disable the "Always Running" option.

#3 mooner

mooner

    Member

  • Members
  • PipPip
  • 17 posts

Posted 04 September 2010 - 05:36 PM

Inside Plex, go to Preferences > System > Media Server and disable the "Always Running" option.

Aha, perfect! I thought that meant I would have to manually start / stop it.

Thanks!

#4 Raindancing

Raindancing

    Plex Star

  • Members
  • PipPipPipPipPipPip
  • 1533 posts
  • Location: Austin, Texas, USA

Posted 04 September 2010 - 05:40 PM

Nope-- it will start and stop on its own, but it does take a little bit of time to start, so just expect a tiny bit a lag time before your sections show up.

#5 Bennsen

Bennsen

    Member

  • Members
  • PipPip
  • 20 posts

Posted 08 January 2011 - 04:31 AM

Thanks!
Apple TV 2G
iOS 4.2.1

#6 Graeme Hayes

Graeme Hayes

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 13 August 2011 - 06:32 AM

I'm running OS X Lion on a late 2008 MacBook Pro and have the issue above. I've tried ALL the fixes mentioned in the thread but STILL have the problem of Plex Media Server starting on boot. It's easy enoogh to quit the application once the laptop starts but it's annoying that it starts despite Plex having been uninstalled. Any further suggestions?

#7 Chris C

Chris C

    Plex Employee

  • Plex Employee
  • PipPipPipPipPipPip
  • 8494 posts
  • Location: Austin, TX

Posted 13 August 2011 - 05:56 PM

I'm a bit confused here, Graeme. If you did actually uninstall Plex correctly, then there would be nothing that could start up because the app wouldn't exist anymore. So, if you are trying to uninstall Plex fully, then please make sure you take a look at the uninstall instructions in the wiki.

If you didn't actually mean "uninstall" and you want to keep Plex but just stop the Plex Media Server (PMS) from starting on boot, that's something different. So, let's explain the two options available in the Plex Mac desktop client under Preferences > System > Media Server first:

- Mode: Enabled/Disabled controls whether the PMS runs at all. For the great majority of users, you will want this to be "Enabled" (even if you're running Plex solely as a "client" on another machine).

- Always Running: This is what controls whether the PMS launches when the OS user logs in. If turned on, then the PMS will launch after the user account logs in. If turned off (and assuming the previous setting is Enabled), then the PMS will start and stop alongside the desktop client.


I've seen a couple of reports where for one reason or another, these settings seem to just sort of "stop working". However, going in and toggling them also seems to resync stuff and get things working again. So, my recommendation:

1. Open your client, put it in windowed mode (CMD-F or "\" key) so you can see the OS X menubar, and go into Preferences > System > Media Server.

2. Toggle the Mode to disabled and then back to enabled. Wait each time and watch the OS X menubar to make sure the PMS quits / finishes restarting.

3. Toggle the Always Running Off/On/Off (basically, toggle at least twice and end up with the desired setting).


If you chose to turn Always Running "Off", then you can go check that the ~/Library/LaunchAgents/com.plexapp.mediaserver.plist file doesn't exist - it should only exist if that setting is "On".

Edited by Chris C, 14 October 2011 - 05:06 PM.
Clarification of "system boot" vs "OS user logging in"

Need help? Having trouble?
» Visit our Support Site for documentation, guides, and more - including the Getting Started section!
» Provide Log Files when reporting issues // Name and Organize your content correctly for best results
 
(please, no private messages unless requested)


#8 dynedain

dynedain

    Member

  • Members
  • PipPip
  • 13 posts

Posted 05 October 2011 - 03:05 PM

Plex really should appear in the Accounts Startup list like other well-behaved OSX apps. There's a bunch of other places where Plex breaks OSX GUI guidelines and does things in a confusing inconsistent way.

#9 diamondsw

diamondsw

    "Vitriolic yet well-intentioned"

  • Members
  • PipPipPipPipPip
  • 848 posts
  • Location: Chicagoland

Posted 05 October 2011 - 04:49 PM

Plex really should appear in the Accounts Startup list like other well-behaved OSX apps. There's a bunch of other places where Plex breaks OSX GUI guidelines and does things in a confusing inconsistent way.


I completely agree with this. As Plex Media Server is a standard app, there's no reason it should be using launchd or other methods to start itself when a simple addition to login items will accomplish the same task, and be much more transparent to the user.

#10 JoToFoSho

JoToFoSho

    Plex Star

  • Plex Ninja
  • PipPipPipPipPipPip
  • 2882 posts
  • Location: Dayton OH

Posted 05 October 2011 - 06:08 PM

It's probably a bit trickier to program but I agree this would be more ideal. Sounds like a good feature request! :D

EDIT: I do feel the need to point out that there are a lot of menu bar items and other programs that run in the background much like PMS which aren't added to login items so I can understand why the developers took this route and it may be a deliberate design decision. Fixing the bug where disabling PMS doesn't remove the launch agent file and doing something to make it clearer that "always running" will cause pms to launch on startup may be another way to address this issue. Either way it doesn't hurt to ask!
~John T.

New here? Read the wiki and watch the screencast! You'll save yourself a lot of time and frustration! :) If that didn't help, posting log files can help us track down your issue.

#11 Chris C

Chris C

    Plex Employee

  • Plex Employee
  • PipPipPipPipPipPip
  • 8494 posts
  • Location: Austin, TX

Posted 05 October 2011 - 06:24 PM

My hunch is that the current method was done at least partially* because of how the Plex client and PMS are "bundled together" currently on the Mac. On the Mac right now, the .app that launches the client is located in your Applications folder like other normal apps are. However, the PMS .app is actually tucked away inside "~/Library/Application Support/Plex/" after it's copied there when Plex is first run. It's certainly a little confusing and unintuitive.

Now, if you look at the Windows or Linux platforms, the PMS is obviously distributed as a standalone app (since there isn't a client app for those platforms). I think it's fairly likely that the Mac side of things might switch from the "bundled together" to the "clearly separate apps" approach at some point, following how it's currently done on the other two platforms. 'Course, I couldn't say for sure if/when that might happen, but if it does then it also seems quite possible that the auto-startup method for the PMS could be altered at the same time. /shrug


* I know some people have also reported problems when they try to handle PMS startup themselves by adding the "Plex Media Server.app" to their Login Items and bypass the standard method in some specific circumstances. So that may have been one reason the current approach was chosen, too.

Need help? Having trouble?
» Visit our Support Site for documentation, guides, and more - including the Getting Started section!
» Provide Log Files when reporting issues // Name and Organize your content correctly for best results
 
(please, no private messages unless requested)


#12 diamondsw

diamondsw

    "Vitriolic yet well-intentioned"

  • Members
  • PipPipPipPipPip
  • 848 posts
  • Location: Chicagoland

Posted 06 October 2011 - 01:22 AM

Agreed - there may be more to it than meets the eye, although I'll admit that I'm hard-pressed to see what. All that launchd file does is launch the Plex Media Server with no arguments, so it's functionally identical to launching it manually or from login items.

Furthermore, while launchd relies on hardcoded paths, a login item I *believe* can use aliases, so it doesn't break if you move the application. This could allow the Plex Media Server and related apparatus to live inside the Plex app itself - something many programs do for subprocesses. Or it could be spun out from the client entirely for folks who only need the server on one machine, and the client on another. No reason to bundle it anymore, unless there are legacy code dependencies.

#13 RobE

RobE

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 October 2011 - 10:23 AM

Hi *,

if I understand your post correctly than the PMS should launch at boot time without any other intervention by the user. In my case it only launches after I log in and it quits whenever I log out. This is what I expected (but do not want) because the plist-file is in the Library folder in the respective user's directory. In order to launch at startup shouldn't plex place it in /Library/LaunchAgents/ rather than ~/Library/LaunchAgents/ ?

I would like to follow it up with another question. I have my Mac mini connected to my hifi system and tv in order to stream music and videos. Once I log in I can connect to the server and start streaming to an external device like an iPhone but I cannot use my sound system connected to the Mac. Is there a way to start the client at boot up as well so I slip to log in first and then start the client as well ?

Tks
Rob

- Always Running: This is what controls whether the PMS launches at system boot. If turned on, then the PMS launches at boot. If turned off (and assuming the previous setting is Enabled), then the PMS will start and stop alongside the desktop client.

If you chose to turn Always Running "Off", then you can go check that the ~/Library/LaunchAgents/com.plexapp.mediaserver.plist file doesn't exist - it should only exist if that setting is "On".



#14 JoToFoSho

JoToFoSho

    Plex Star

  • Plex Ninja
  • PipPipPipPipPipPip
  • 2882 posts
  • Location: Dayton OH

Posted 14 October 2011 - 01:15 PM

Chris was inaccurate. It launches PMS on login as one would expect when in the ~/Library directory. AFAIK it's currently designed such that it requires a user logged in and I have to assume there's a good reason for that. You can make a request here in the forums and on lighthouse and maybe that can be changed in the future. For now you can make a plex account (or leave it on the current account) and have that automatically log in on boot. You can add the plex client to the login items for that user as well if you desire or have that start with an apple/harmony remote press.
~John T.

New here? Read the wiki and watch the screencast! You'll save yourself a lot of time and frustration! :) If that didn't help, posting log files can help us track down your issue.

#15 diamondsw

diamondsw

    "Vitriolic yet well-intentioned"

  • Members
  • PipPipPipPipPip
  • 848 posts
  • Location: Chicagoland

Posted 14 October 2011 - 06:36 PM

if I understand your post correctly than the PMS should launch at boot time without any other intervention by the user. In my case it only launches after I log in and it quits whenever I log out. This is what I expected (but do not want) because the plist-file is in the Library folder in the respective user's directory. In order to launch at startup shouldn't plex place it in /Library/LaunchAgents/ rather than ~/Library/LaunchAgents/ ?


That won't change things; all LaunchAgents are opened on login, and closed on logout. The only difference between your user's LaunchAgents and the system-level one is the system-level one will work for any user, whereas yours obviously only affects your user. Only really an issue if you have multiple users that should have Plex up and running.

As for keeping PMS running when logged out, that would be the purpose of LaunchDaemons, not LaunchAgents. However. that's not possible as there's no way to run a GUI process while not logged in - there's no WindowServer to attach to.

Now, if PMS were rearchitected so PMS could run as a daemon and only the Media Management GUI ran as a LaunchAgent, then you could achieve what you want. For now, the best option would be to create a second user that's always logged in running PMS, and just leave it in the background. Kludgy, but it will work.

#16 JoToFoSho

JoToFoSho

    Plex Star

  • Plex Ninja
  • PipPipPipPipPipPip
  • 2882 posts
  • Location: Dayton OH

Posted 14 October 2011 - 07:38 PM

Thanks for laying down the geek knowledge, diamondsw! :D
~John T.

New here? Read the wiki and watch the screencast! You'll save yourself a lot of time and frustration! :) If that didn't help, posting log files can help us track down your issue.

#17 prophetizer

prophetizer

    Dedicated Member

  • Members
  • PipPipPip
  • 323 posts

Posted 03 November 2011 - 08:23 PM

- Mode: Enabled/Disabled controls whether the PMS runs at all. For the great majority of users, you will want this to be "Enabled" (even if you're running Plex solely as a "client" on another machine).



Why would i want to keep it enabled even if the machine only uses the client, and the server portion is run on another machine?
Posted Image

#18 diamondsw

diamondsw

    "Vitriolic yet well-intentioned"

  • Members
  • PipPipPipPipPip
  • 848 posts
  • Location: Chicagoland

Posted 03 November 2011 - 09:11 PM

Looks like this thread is pretty much moot, since 0.9.5 no longer has the "Enable/Disable" option in Plex client to control the server, and to my knowledge, Plex Media Server no longer uses launched to run itself.

Sometimes it's the little things that make me happy. :)

#19 JoToFoSho

JoToFoSho

    Plex Star

  • Plex Ninja
  • PipPipPipPipPipPip
  • 2882 posts
  • Location: Dayton OH

Posted 03 November 2011 - 09:14 PM

Why would i want to keep it enabled even if the machine only uses the client, and the server portion is run on another machine?


Because prior to 9.5, the desktop clients couldn't stream plugins aside from itunes/iphoto/aperture. Thus you'd need a local PMS running to run plugins like hulu/netflix/daily show/etc. Even with 9.5 I'd personally want to run these locally instead of having them transcoded and streamed from the PMS machine if possible. Not sure how it works now.
~John T.

New here? Read the wiki and watch the screencast! You'll save yourself a lot of time and frustration! :) If that didn't help, posting log files can help us track down your issue.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users