iBaa / PlexConnect

Plex @ aTV - think different...
Other
1.9k stars 626 forks source link

OSX Ventura Deamon not working? #613

Open cferron opened 1 year ago

cferron commented 1 year ago

Just upgraded to Ventura and it seems that the daemon autorun at startup feature does not work. Were you aware of that? Plexconnect is working fine when I start it manually, but not once I hit Ctrl+C to quit it and install the daemon. What is weird is that I see the process when doing "sudo launchctl list | grep plexconnect". Any idea for me to troubleshoot the issue.

Thanks

pbrena commented 1 year ago

me too.

any changes since posted?

moodyblue commented 1 year ago

Try the following: edit line 83 in PlexConnect_daemon.bash replacing darwin by ventura

cferron commented 1 year ago

@moodyblue I tried your suggestion. No luck. I tried "Ventura" and "ventura" in case it was case sensitive. Once modification was made, I stopped, uninstall and re-installed the deamon, no luck. I have to manually start Plex in the terminal (and keep the terminal opened) to have it to work.

Software:

System Software Overview:

  System Version: macOS 13.5.1 (22G90)
  Kernel Version: Darwin 22.6.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled
  Time since boot: 40 minutes et 4 secondes
pbrena commented 1 year ago

I guess a quick and dirty work around might be to launch a script at login time or automate with iterm2.

@cferron, Did you try/succeed installing Pil/Pillow (in the case you are running on apple silicon) ?

moodyblue commented 1 year ago

Found this, maybe it can help: https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac

pbrena commented 1 year ago

Found this, maybe it can help: https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac

mmmhhh.... that link is about launching deamons like the one is failing for us, the work around I meant is to use a bash or zsh script to issue the command as if typed in the terminal, I remember having include one in the login items for another project a few years ago, I will try in a few days and post if it worked.

cferron commented 1 year ago

Awesome. This is definitely out of my expertise :-| I can change a line of code... writing one.... meh.

Thanks for looking into it :)

Claude

On Wed, Aug 30, 2023 at 5:30 PM pbrena @.***> wrote:

Found this, maybe it can help: https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac

mmmhhh.... that link is about launching deamons like the one is failing for us, the work around I meant is to use a bash or zsh script to issue the command as if typed in the terminal, I remember having include one in the login items for another project a few years ago, I will try in a few days and post if it worked.

— Reply to this email directly, view it on GitHub https://github.com/iBaa/PlexConnect/issues/613#issuecomment-1699869093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOXNA2Z2KF4YWH3BM3J4TXX6WHHANCNFSM6AAAAAAS2UHLAI . You are receiving this because you were mentioned.Message ID: @.***>

-- Claude Ferron

pbrena commented 1 year ago

As a temporary workarround to the unresponsive LaunchDeamon for Macos Ventura, the following steps allowed me to automatically run Plexconnect.py at login time with iterm2, YMMV.

a) allow PlexConnect.py to be called by sudo wihout asking password

sudo visudo

Then, press I, and at the bottom insert:

username ALL= NOPASSWD: /path/to/PlexConnect.py

Here, you need to change the username for the user who is supposed to run the command without having to type a password. Also, change the path to your executable

Press Esc, then write :wq, then Enter.

b) I created a script named templexcon.zsh whose contents is the single line:

sudo /path/to/PlexConnect.py

then change it to be executable with command

chmod +x templexcon.zsh

c) (see *Update bellow) I changed the user preferences to open the above script at login time.

System Preferences->General-> Login Items

click add and follow the open finder window to select your script.

d) at longin time Macos will open the script, in my user it is opened by default by iterm2 in a new window, where all PlexConnect.py output will be displayed. The first time, iterm2 asked if templexcon.zsh should be allowed to run, but gave an option (flag) to never ask again.

Hope it helps someone.