Startup script on osx?


Recommended Posts

Ive just got synergy working accross my mac and pc and now I'd like to get synergy starting when I start up the machines.

The pc bit is easy and already sorted but Im a bit stuck on the mac, ive had a look at the instuctions here but Im not getting anywhere when I try to follow the steps.

Basically I need the following to run each time the mac boots up

/Applications/Utilities/synergy-1.3.1/synergyc -f 192.168.2.5

Can anyone point me in the right direction?

Link to comment
https://www.neowin.net/forum/topic/600655-startup-script-on-osx/
Share on other sites

  • 2 weeks later...
The pc bit is easy and already sorted but Im a bit stuck on the mac, ive had a look at the instuctions here but Im not getting anywhere when I try to follow the steps.

Scroll to 1. Create a System Level Startup Item on that page.

Open up Terminal. According to http://www.macdevcenter.com/pub/a/mac/2001...rminal_one.html "Mac OS X?s Terminal application... sits in your Utilities folder"

Follow the directions outlined i1. Create a System Level Startup Itemi>

Using a text editor, such as nano -- or just use your favorite graphicatext editorb>, create a filSynergyi> in the folder specified. Copy the contents as described on the page.

All you need to do is edit the following line in that file

run=(/usr/local/bin/synergyc -n $(hostname -s) -1 -f synergy-server)

by replacinsynergy-serveri> with that of your own (it seems to be 192.168.2.5 from what you pasted). so:

run=(/usr/local/bin/synergyc -n $(hostname -s) -1 -f 192.168.2.5)

Most likely /Applications/Utilities/synergy-1.3.1/synergyc (from the line you pasted) is symlinked to /usr/local/bin/synergyc -- so don't worry about that.

Then just follow the rest of the Mac OS X directions (onl1. Create a System Level Startup Itemi> is necessary) on the page. Including making the shell script executable (chmod +x Synergy -- or do it their way) and creating and modifying StartupParameters.plist. Then start Synergy via the script that you just created (./Synergy start -- or do it their way). When you reboot Synergy will start automatically.

Since Mac OS X doesn't use init, like traditional Unices. It is more complicated to configure executables to run on start up. If you were using another operating system like Linux or BSD you wouldn't have to create two files to be able to start things automatically -- In fact, BSD systems don't even require you to create a new file. You can just append a line similar to that you pasted to /etc/rc.local (of course you'd want to drop root privileges --in some way-- afterwards.)

  • 8 months later...

hi, I am somewhat new to mac as well. I am running the synergy server on the mac. when I try to run my startup script, I get the following error: line 37: $1: unbound variable

I copied and pasted the script on the synergy autostart page, and changed the run line to:

run=(/usr/local/bin/synergys -f --/usr/local/bin/synergy.conf)

Line 37, which it is saying is the error is the RunService line:

RunService "$1"

Can anyone help me? I can manually start the synergy server script and run a windows pc as the client and everything works great. But I need to get the server script to auto start on the mac for the sake of the other people who use this computer. Thanks!

BTW, I am running OSx 10.5.4.

  • 3 months later...
hi, I am somewhat new to mac as well. I am running the synergy server on the mac. when I try to run my startup script, I get the following error: line 37: $1: unbound variable

I copied and pasted the script on the synergy autostart page, and changed the run line to:

run=(/usr/local/bin/synergys -f --/usr/local/bin/synergy.conf)

Line 37, which it is saying is the error is the RunService line:

RunService "$1"

Can anyone help me? I can manually start the synergy server script and run a windows pc as the client and everything works great. But I need to get the server script to auto start on the mac for the sake of the other people who use this computer. Thanks!

BTW, I am running OSx 10.5.4.

Change '/usr/local/bin/synergys' portion of the run line to match where you've copied the synergy folder. The notes on the site say "Copy it anywere" for OSX, but fail to mention that you have to modify the script to match. Since there is no installer per say for OSX you have to specify the path. Otherwise you will have to create the folder /local and /bin in teh /usr directory as they do not exist in OSX by default.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Still 3x what it should cost. So, it seems the trick is to increase price by 6x so that a reduction in price back to 4x looks like a steal. "You savvy shoppers win again!" I'm glad I'm not in a desperate spot to actually even need this overpriced crap. Hopefully, it comes back down by the time for when (or if) I ever do.
    • Although AI is great and has it's use cases they likely have massively overhyped it and it has not delivered as per their expectations. I fully expect them to start saying the same things again when it does get to a certain level of intelligence!
    • Microsoft wants to end printer driver headaches with Windows Ready Print by Usama Jawad A few days ago, Microsoft released Windows 11 Experimental build 26300.8553, bringing a ton of enhancements such as Start menu customization, search improvements, Taskbar polish, and other minor UI tweaks. Another relatively major enhancement snuck deep within the change log was related to upgrades to the Windows printing experience. Now, Microsoft has shared more details about these benefits. For starters, Microsoft has renamed its Modern Print Platform to Windows Ready Print. The company believes that this name highlights its shift in strategy, which now focuses on modernizing, securing, and streamlining the printing experience for Windows devices. Some of the upgrades present in Windows Ready Print have already been seeded to customers and partners. This includes ending support for third-party printer drivers via Windows Update and transitioning towards the Internet Printing Protocol (IPP) and the native Windows IPP printer driver. In line with these changes, new printer installations will default to Windows Ready Print on eligible devices starting from July 2026. However, Microsoft recognizes that not all environments will be able to migrate to this platform immediately, so it will allow users to choose between installing the printer via Windows Ready Print or the traditional OEM process. Users will be able to toggle this configuration through Settings > Bluetooth & Devices > Printers & Scanners > Printer preferences. This control applies only to new printer installations, and its functionality can also be modified via Group Policy as follows: Launch Group Policy Editor Navigate to Local Computer Policy -> Administrative Templates -> Printers Find and select 'Configure Windows Ready Print driver ranking' -> double click to open it Select 'Enabled' (if you wish to enable Windows Ready Print driver selection) or 'Disabled' (if you wish to explicitly disable Windows Ready Print driver selection). Select Apply Select OK Similarly, if you set up Windows protected print mode through the same setting in Windows 11, it will also default to using Windows Ready Print exclusively. Microsoft hopes that these improvements will help eradicate dependency on OEM-specific driver installation processes and simplify printer installations. We'll likely find out more about other tangible benefits in the coming months.
    • Hey what's about the proton vpn firefox extension ? It's not working today
  • Recent Achievements

    • One Year In
      Primer1st earned a badge
      One Year In
    • Experienced
      JayZJay went up a rank
      Experienced
    • Reacting Well
      Sir_Timbit earned a badge
      Reacting Well
    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      513
    2. 2
      PsYcHoKiLLa
      229
    3. 3
      Edouard
      137
    4. 4
      ATLien_0
      87
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!