Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
Hi all,

I use ServeToMe as a streaming server with my Mac.

The tool works very fine.

But I would like to start the application automatically with the system. So ServeToMe can start without manually launch it or start automatically with a login.

A try to create a .plist file under /Library/LaunchDaemons

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
	<string>ServeToMe</string>
    <key>ProgramArguments</key>
	<array>
	    <string>/Applications/ServeToMe.app/Contents/MacOS/ServeToMe</string>
	</array>
    <key>RunAtLoad</key>
	<true/>
    <key>KeepAlive</key>
	<true/>
</dict>
</plist>

But it seems that ServeToMe is not started as I can't connect to the server using StreamToMe.

Do you have a solution for me?

Regards
 

justperry

macrumors G5
Aug 10, 2007
12,558
9,750
I'm a rolling stone.
Hi all,

I use ServeToMe as a streaming server with my Mac.

The tool works very fine.

But I would like to start the application automatically with the system. So ServeToMe can start without manually launch it or start automatically with a login.

A try to create a .plist file under /Library/LaunchDaemons

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
	<string>ServeToMe</string>
    <key>ProgramArguments</key>
	<array>
	    <string>/Applications/ServeToMe.app/Contents/MacOS/ServeToMe</string>
	</array>
    <key>RunAtLoad</key>
	<true/>
    <key>KeepAlive</key>
	<true/>
</dict>
</plist>

But it seems that ServeToMe is not started as I can't connect to the server using StreamToMe.

Do you have a solution for me?

Regards

I am pretty sure it must be in Alphabetical order, screenshots to show you the difference of two .plist files.

One is yours and one is a working from LittleSnitch
 

Attachments

  • Screen Shot 2013-03-24 at 22.07.30.png
    Screen Shot 2013-03-24 at 22.07.30.png
    104.1 KB · Views: 252

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
Thanks for your answer.

But I think it's not the good way.
As when I try to start the plist manually using

launchctl load -w /Library/LaunchDaemons/ServeToMe.plist

ServeToMe start as the GUI is displayed and when I try to close the app, it is restarted automatically as I've specified in my .plist file

However when I restart my macOS, it seems not working :'(

I'll try to modify my .plist with your order
 

justperry

macrumors G5
Aug 10, 2007
12,558
9,750
I'm a rolling stone.
Thanks for your answer.

But I think it's not the good way.
As when I try to start the plist manually using

launchctl load -w /Library/LaunchDaemons/ServeToMe.plist

ServeToMe start as the GUI is displayed and when I try to close the app, it is restarted automatically as I've specified in my .plist file

However when I restart my macOS, it seems not working :'(

I'll try to modify my .plist with your order

As I said before, I am almost 100% sure it needs to be in alphabetical order.
Also, How did you make the plist, did you use a regular text editor, I have Developer tools installed and that what I use, but you can also use a text editor and then copy and paste it in an HexEditor and than safe the file as a plist file, something which also might affect it is permissions, you might set the permissions to ones similar in the Folder you place it in.
Another thing is, do you place it in the LaunchAgents or LaunchDeamons, if it does not work in the first one place it in the other one, it might just be you placed it in the wrong Launch.... Folder.

Edit: If you read the System Log while it is not loaded you might find out why it didn't, believe me, if it doesn't it will say so in the System Log.
 

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
I made tests in both Folder LaunchAgents and LaunchDaemons.

I made a chmod 644 on the file.

I don't use developer tool for a such file. I'll try to find it for free.

I'll make the test with your order now.
 

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
I made new test using this .plist generated by plisteditor

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>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>ServeToMe</string>
        <key>ProgramArguments</key>
        <array>
                <string>/Applications/ServeToMe.app/Contents/MacOS/ServeToMe</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>

I've tried in /Library/LaunchAgents and /Library/LaunchDaemons.

Both try with chmod 644 on the .plist file

Sniffff :'(
 

justperry

macrumors G5
Aug 10, 2007
12,558
9,750
I'm a rolling stone.
Many other try without success :-/

What if you put the Application in the startup Folder together with the .plist file?
But, you then need to change the path in the plist file, you also need to set the correct permissions on the Application.

If you do this the path in the plist file should be:

/Library/StartupItems/ServeToMe.app/Contents/MacOS/ServeToMe

Edit: Be careful, it also might be case sensitive.

Example, if I want to kill the finder in Terminal killall finder does not work while killall Finder does!
 

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
Oh yes good idea.

I'll try this evening when I'm back from work.

But can I create a SH script called:

Start_ServeToMe.sh
That will point to the application:
/Applications/ServeToMe.app/Contents/MacOS/ServeToMe

Then on the StartupItems, I'll put only the script instead of the executable with the .plist file.

It's just to keep the .app on the /Applications folders.


Thanks for your help and suggestion!
 

justperry

macrumors G5
Aug 10, 2007
12,558
9,750
I'm a rolling stone.
Oh yes good idea.

I'll try this evening when I'm back from work.

But can I create a SH script called:

Start_ServeToMe.sh
That will point to the application:
/Applications/ServeToMe.app/Contents/MacOS/ServeToMe

Then on the StartupItems, I'll put only the script instead of the executable with the .plist file.

It's just to keep the .app on the /Applications folders.


Thanks for your help and suggestion!

That's another option.
 

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
So... I'll cancelled this Idea... it's not working, I've headaches.

I don't understand :-/
 

danje

macrumors newbie
Original poster
Mar 24, 2013
8
0
I received answer from the ceator of the soft:

Hi Frank,

With the current version of ServeToMe, starting on log in is the only way to start the server automatically. The ServeToMe application requires an active user log in to operate so it will fail if run from launchd.

We are a week or two away from releasing a beta of ServeToMe 4. This version will be a launchd "PrivilegedHelperTools" daemon and will run without an active user log in by default.

Keep an eye on the ServeToMe page here:

http://projectswithlove.com/streamtome/servetome.html

Regards,
Matt Gallagher.
 

justperry

macrumors G5
Aug 10, 2007
12,558
9,750
I'm a rolling stone.
I received answer from the ceator of the soft:

Hi Frank,

With the current version of ServeToMe, starting on log in is the only way to start the server automatically. The ServeToMe application requires an active user log in to operate so it will fail if run from launchd.

We are a week or two away from releasing a beta of ServeToMe 4. This version will be a launchd "PrivilegedHelperTools" daemon and will run without an active user log in by default.

Keep an eye on the ServeToMe page here:

http://projectswithlove.com/streamtome/servetome.html

Regards,
Matt Gallagher.

No poop.

So, now you know.

Just have to wait 2 more weeks, at least it is solved.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.