NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support macOS v
1 2 3 4 Next »
mac os

 
  • 0 Vote(s) - 0 Average
mac os
sdennis91
Offline

Junior Member

United States
Posts: 9
Threads: 1
Joined: Jan 2023
#1
2023-01-30, 01:02 PM
I read the instructions to install on mac os. It says native, come to find out this is not true. The install consist of a zip with windows files in it. No where near native to mac. Everything runs good though for not being native, except nextpvr will not start on system boot, I have to run dotnet ./NextPVRServer.dll every time I wanna use nextpvr on mac. Again not native. Also the terminal window has to stay open while nextpvrserver is running. Again its not a native app. Could you make a native app for mac os that will run on boot. I use nextpvr on windows and use the kodi pvr addon. It was updated to use 2 or more servers at one time. I was gonna use my mac to reduce the load on my windows pc while watching and recording a show. Since mac don't have a native app for nextpvr, I can't do that.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,845
Threads: 954
Joined: May 2006
#2
2023-01-30, 01:08 PM
Netcore is native, but Microsoft cross-platform runtime file naming is Windows-like. There are a few native binaries too.

You are right though, no one has created wiki instructions on how to auto start the server on macOS or run it as a service. Feel free to contribute this information.

Martin
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,666
Threads: 767
Joined: Nov 2003
#3
2023-01-31, 02:24 AM
As Martin said, it is .NET app, which runs under the native runtimes on x64 and M1/M2 Macs. These file names are just the way the Microsoft .Net compiler works. It uses these same .dll etc names for Linux.

It is a command line app on Mac though, which is not so user-friendly, and we haven't provided a mechanism to start at startup. There are various Mac utilities like LaunchControl and Lingon that help the user setup things like running scripts at startup etc.

The mac community here is very small, so not a lot of time is spent focusing on these mac specific things.
timbo3344
Offline

Junior Member

Canada
Posts: 38
Threads: 5
Joined: Mar 2021
#4
2023-02-01, 03:48 AM
I'm a Mac user and love NextPVR and it's just a habit now that on a reboot I go to terminal and run NextPVR. If there was ever a way to run it at startup that would be awesome! But to be honest, I'm just super glad it works on a Mac!
pkscout
Offline

Senior Member

USA
Posts: 464
Threads: 50
Joined: May 2014
#5
2023-02-01, 10:51 AM
(2023-02-01, 03:48 AM)timbo3344 Wrote: I'm a Mac user and love NextPVR and it's just a habit now that on a reboot I go to terminal and run NextPVR.  If there was ever a way to run it at startup that would be awesome!  But to be honest, I'm just super glad it works on a Mac!

I know I'm about to link to a 14 year old answer, but it is still the "right" answer.

https://superuser.com/questions/229773/r...792#229792

That link also links to an app sub mentioned (Lingdon) that will do all the heavy lifting for you.  It is a paid app, but $17 one time isn't really much if you don't want to hassle with doing the command line stuff yourself.  The app seems to be current and has been tested on the newest versions of OSX.
sdennis91
Offline

Junior Member

United States
Posts: 9
Threads: 1
Joined: Jan 2023
#6
2023-02-01, 01:51 PM
I have gotten nextpvr to run on boot. I had to write a script to launch the command and hide the terminal window. After which I had to create a agent to get it to load on login. Before I release instructions on this, I would like some opinions as to what folder I should put the script. Reason I am asking is I want to make it as simple as I can for people who want to use nextpvr on a mac. Right now I am running the script out of my home downloads folder. The way I did it requires no further downloads, just some code to be entered into a couple document files and named correctly.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,845
Threads: 954
Joined: May 2006
#7
2023-02-01, 02:08 PM
There are 3 folders that need to be considered in the documentation.

The install folder where it gets uinzipped, the folder for the data folder and the initial folder for recordings and Live TV.

The data folder uses the environment variable NEXTPVR_DATADIR_USERDATA=.... On Linux and macOS that defaults to ~/.NPVR-data so you would need to edit it.

Martin
sdennis91
Offline

Junior Member

United States
Posts: 9
Threads: 1
Joined: Jan 2023
#8
2023-02-02, 06:13 AM
So you recommend that I place my script into the program folder where it gets unzipped. If so I would recommend that npvr get unzipped into the applications folder. Add my script to that folder and tell agent plist to use my script from the applications/npvr folder. This will allow anyone even a novice userto set up nextpvr to run at boot.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,845
Threads: 954
Joined: May 2006
#9
2023-02-02, 12:52 PM
/Applications makes sense but since dotnet apps can't run from Finder it isn't critical. it might make updating and uninstalling the app more normal than using another like /Library. Consider naming the actually folder to unzip to nextpvr instead of npvr since there are other applications called npvr and NextPVR is the program's name.

Martin
sdennis91
Offline

Junior Member

United States
Posts: 9
Threads: 1
Joined: Jan 2023
#10
2023-02-03, 12:13 AM
Well everyone here I am to post the instructions to load nextpvr on boot and running hidden. This will require creating a few files and pasting some code that I will post per file.

First things first install nextpvr into /Applications/NextPVR which is crucial for the code to work.

Next create a text file and name it nextpvr.sh which will be a script file thats used to to launch nextpvr. Open this file with text editor and paste the following code:

# Start up server Nextpvr
Osascript -e 'tell application "Terminal"
do script "dotnet /Applications/NextPVR/NextPVRServer.dll"
tell application "Terminal" to set visible of every window to false
end tell'

Place the file nextpvr.sh into the folder at /Applications/NextPVR after that you will need to make the script executable. So open a terminal at /Applications/NextPVR and run chmod a+x /Applications/NextPVR/nextpvr.sh this will allow the script to execute the command. Make sure that you have terminal set as default to open script files. To do this right click the script and select get info, on the window that pops up look for open with and see if terminal is set in the drop down. We are now done with this phase. Now we need to make another file to launch this script at login.

Now create another file and name it com.nextpvr.plist open this file in text edit and paste the following code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AssociatedBundleIdentifiers</key>
<array>
<string>com.nextpvr</string>
</array>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.nextpvr.sh</string>
<key>LimitLoadToSessionType</key>
<array>
<string>LoginWindow</string>
<string>Aqua</string>
</array>
<key>ProcessType</key>
<string>Interactive</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/NextPVR/nextpvr.sh</string>
<string>-RunAsAgent</string>
<string>YES</string>
<string>-Module</string>
<string>Full</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/Applications/NextPVR</string>
</dict>
</plist>

Place this file into /Library/LaunchAgents now go to terminal and Run launchctl load /Library/LaunchAgents/com.Nextpvr.plist and log out/in and it should load nextpvr server. To make sure its working go to http://127.0.0.1:8866/settings.html and you should be able to login.

Alternatively you can double click on nextpvr.sh and run the server as well or run launchctl start com.nextpvr.plist in the terminal to test.

I hope this helps everyone whos been wanting to use nextpvr on a mac at boot.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode