Bug 5659 - Add support for global configuration file on Mac OS X
Summary: Add support for global configuration file on Mac OS X
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: 4.3.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.5.0
Assignee: Henrik Andersson
URL:
Keywords: relnotes, samuel_tester
Depends on:
Blocks: 5601
  Show dependency treegraph
 
Reported: 2015-09-29 14:32 CEST by Henrik Andersson
Modified: 2016-12-05 11:17 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2015-09-29 14:32:39 CEST
The correct place for system wide application specific data / configuration files are under "/Library/Application Support". The main problem here is that we cannot distribute files to this directory due to we do not use a installer system on Mac OS X which is another problem. However we should try reading a configuration file from this place to support reading a configuration file which applies system wide, just as Linux client reads /etc/opt/thinlinc/tlclient.conf...

"If the resources apply to all users on the system, such as document templates,  place them in /Library/Application Support. To get the path to this directory use the NSApplicationSupportDirectory search path key with the NSLocalDomainMask domain. If the resources are user-specific, such as workspace configuration files, place them in the current user’s ~/Library/Application Support directory. To get the path to this directory use the NSApplicationSupportDirectory search path key with the NSUserDomainMask domain."

Reference: http://developer.apple.com/library/mac/documentation/General/Conceptual/MOSXAppProgrammingGuide/AppRuntime/AppRuntime.html
Comment 3 Henrik Andersson cendio 2015-09-30 13:43:25 CEST
We should also read ssh_known_hosts from this directory.
Comment 5 Samuel Mannehed cendio 2015-10-02 10:35:09 CEST
Verified that documentation looks good and that /Library/Application\ Support/ThinLinc\ Client/tlclient.conf is read when no ~/.thinlinc/tlclient.conf is present (Build 4904 on OS X 10.10).
Comment 6 Samuel Mannehed cendio 2015-10-02 15:33:17 CEST
I have verified that values in ~/.thinlinc/tlclient.conf overrides values in /Library/Application\ Support/ThinLinc\ Client/tlclient.conf. I have also verified that if ~/.thinlinc/tlclient.conf doesn't exist or is missing values for some settings, /Library/Application\ Support/ThinLinc\ Client/tlclient.conf is used instead. Working as intended.

With regards to known_hosts, I have verified the following:
* removing a host from ~/.thinlinc/known_hosts gives the "unknown host" warning in the client when connecting
* adding the host to /Library/Application\ Support/ThinLinc\ Client/ssh_known_hosts causes the client to connecting without warning

Note You need to log in before you can comment on or make changes to this bug.