Bug 5659

Summary: Add support for global configuration file on Mac OS X
Product: ThinLinc Reporter: Henrik Andersson <hean01>
Component: ClientAssignee: Henrik Andersson <hean01>
Status: CLOSED FIXED    
Severity: Normal CC: astrand, samuel
Priority: P2 Keywords: relnotes, samuel_tester
Version: 4.3.0   
Target Milestone: 4.5.0   
Hardware: PC   
OS: Unknown   
Acceptance Criteria:
Bug Depends on:    
Bug Blocks: 5601    

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