Synergy Advance 0.5b seeded to beta testers
-
Greg Hurrell
More details available here:
https://wincent.dev/a/news/archives/2007/04/synergy_advance_10.php
-
itsajeepthing111
Where are the advanced features? For example, how do i get rid of the dock icon like in v0.4? or not show the splash screen at startup?
-
Greg Hurrell
Originally Posted By: itsajeepthing111how do i get rid of the dock icon like in v0.4?
This is something that came up in an email from another user, so I am going to paste in my reply here so that you and others can see it:
The way it works in 0.4 is by altering the file:
Code:Synergy Advance.app/Contents/Info.plist
And setting the value of "LSUIElement" to 1. That's to hide the Dock icon. To unhide it it sets it back to 0.
There are a four problems with this approach:
1. Non-administrators may not have the privileges to change the setting, depending on how/where the program is installed.
2. It is impossible for different users on a machine to have different settings, because there is only one Info.plist file.
3. If two users are using the software at the same time (as may happen in a networked environment) and try to change the settings then they may enter into conflict, overwriting each other's changes or corrupting the file.
4. Apple is introducing a new feature called Code Signing in Leopard, and modifying the Info.plist file will cause that feature to break.
So problem 1 can be mitigated but only to some extent by providing a good interface which allows users to authenticate and acquire more privileges if necessary. This was the way it as done in 0.4.
There is really no solution for problems 2 and 3, other than having each user install a separate copy of the software.
Problem 4 is the real deal-breaker because there is literally nothing that can be done to workaround or mitigate the issue.
So for 0.5 I started looking for solutions that would provide equivalent functionality without having to touch the Info.plist file. Unfortunately, the rules for the Info.plist file are dictated by Apple and are external to the program, so you really do have to play by Apple's rules.
A solution that I implemented involved using Carbon to temporarily change the visibility at runtime. This itself had two problems:
1. The changes could only take place in one direction; I can't remember right now which way it was because this was a few months ago, but it was either that you could either promote an invisible Dock icon app to visible, or the other way round, but it was a one-way ticket. This is not such a big deal, but it was inconvenient because it meant that some changes would require a relaunch.
2. Apps which were transformed in this way at runtime didn't behave like apps with LSUIElement set or unset in the Info.plist; for example, an app which had a visible icon could not come to the front in response to a click on the icon, nor could it bring its preference window to the front in response to the user requesting it, and its menu bar could never become visible. In other words, the app would act like a normal app, but only in part: in many ways it was even less useful than an app with an invisible Dock icon.
That second issue was the real deal-breaker so I had to scrap that plan.
So for 0.5 the default is for the Dock icon to always be visible. If you wish to hack the Info.plist yourself you can put things back the way they were, although this will never be officially supported (unless Apple provides a non-broken way to control visibility without touching the Info.plist). This requires some familiarity with the command line.
For example, if Synergy Advance is installed in your Applications folder you could type this in the Terminal to add an LSUIElement setting to the Info.plist:
Code:defaults write /Applications/Synergy\ Advance.app/Contents/Info LSUIElement -string 1
Note that should be all on one line; if your email client wraps it onto more than one line then it's incorrect.
For this to work you must specify the absolute (not relative) path to the Info.plist file, but note also that the file is referred to as "Info" with no extension.
As another example, this command would switch the setting:
Code:defaults write /Applications/Synergy\ Advance.app/Contents/Info LSUIElement -string 0
And this command would remove the LSUIElement setting:
Code:defaults delete /Applications/Synergy\ Advance.app/Contents/Info LSUIElement
Quote:or not show the splash screen at startup?
Many settings have been and are being moved around, so the checkbox for that one is temporarily not visible but the underlying functionality is still there. You can turn it off using the command line:
Code:defaults write com.wincent.SynergyAdvance DoNotShowSplashScreen -boolean true
Or conversely to turn the splash back on:
Code:defaults write com.wincent.SynergyAdvance DoNotShowSplashScreen -boolean false
Reply
This topic is now closed.