Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.
Buying anything on Amazon? Please use the Geekzone Amazon aff link.




1967 posts

Uber Geek
+1 received by user: 19

Trusted
Subscriber

Topic # 142542 16-Mar-2014 19:47 Send private message

I'm sure I'm just not typing the right keywords in Google. In Ubuntu I use synergy, which I have automatically starting after the user desktop has been started to ensure the application correctly processes the desktop dimensions. I want to do the same for the Mac, however, when I add the script to the login items the Mac opens it as a document instead of executing it. When I search for start-up scripting the material refers to system level (root) starting, what I believe to be the same as run level starting in other Linux distributions.

Create new topic
213 posts

Master Geek
+1 received by user: 26

Subscriber

  Reply # 1006854 16-Mar-2014 20:19 Send private message





Geoff E



1967 posts

Uber Geek
+1 received by user: 19

Trusted
Subscriber

  Reply # 1006860 16-Mar-2014 20:45 Send private message

Excellent, thanks. I had made it executable (chmod +x) and I had placed the shebang in the first line, but I had not called it .command. I renamed the script (mv autoSynergy.sh autoSynergy.command), added it to my login items, rebooted and it started successfully.

I returned to the user login items and changed it to hide at start, but it does not want to hide, but that is not so important, it is automatically running which is great.

Thanks.

239 posts

Master Geek
+1 received by user: 62


  Reply # 1006861 16-Mar-2014 20:47 Send private message

You can cheat, wrap the script into an Automator action or Applescript saved as an Application
that way you can simply put the Application into the login items in the Users and Groups system preference.




1967 posts

Uber Geek
+1 received by user: 19

Trusted
Subscriber

  Reply # 1006879 16-Mar-2014 21:00 Send private message

Will that make it hide? Thanks for the terminology, will help my google searching.

213 posts

Master Geek
+1 received by user: 26

Subscriber

  Reply # 1006896 16-Mar-2014 21:18 Send private message

Depends on the script if it does not terminate. Then the automator program will also not quit.

In any case you could add "&" to the end of your command in the script and then add exit to the end of the script. you will also then need to make sure terminal will exit on the exit command. You can do this by doing the following. Terminal > Preferences > Settings > Shell: > When the shell exits: -> Close if the shell exited cleanly





Geoff E



1967 posts

Uber Geek
+1 received by user: 19

Trusted
Subscriber

  Reply # 1006921 16-Mar-2014 21:32 Send private message

Setting the terminal to exit works a treat, thanks (the program I'm invoking from the script already performed the spawning so I didn't have to manually background it).

Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

Netflix officialy launching in NZ in March
Created by jarj, last reply by tdgeek on 21-Nov-2014 19:08 (97 replies)
Pages... 5 6 7


Gull Employment Dispute.
Created by networkn, last reply by richms on 23-Nov-2014 23:05 (71 replies)
Pages... 3 4 5


Which one is right for me? M8, Z3, S5 or other?
Created by makiomoto, last reply by makiomoto on 20-Nov-2014 13:52 (40 replies)
Pages... 2 3


Free 1gb data with $19 combo until end of Jan 2015 (1.5gb total)
Created by eXDee, last reply by Shoes2468 on 23-Nov-2014 23:01 (16 replies)
Pages... 2


Slingshot line speed
Created by Frankiej45, last reply by Frankiej45 on 20-Nov-2014 14:38 (14 replies)

Little Wins labour Leadership
Created by MikeAqua, last reply by Aredwood on 21-Nov-2014 18:47 (53 replies)
Pages... 2 3 4


Orcon: Why did you cancel my email account without telling me??
Created by old3eyes, last reply by old3eyes on 21-Nov-2014 17:03 (13 replies)

My connection is too fast
Created by ckc, last reply by Geektastic on 20-Nov-2014 11:30 (25 replies)
Pages... 2



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.