# MacOS can not save local settings

**URL:** <https://community.thinlinc.com/t/macos-can-not-save-local-settings/689>\
**Category:** Community Support\
**Tags:** tlclient\
**Created:** [27 August 2023 16:40 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689 "2023-08-27T16:40:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedde59](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tedde59](https://community.thinlinc.com/u/tedde59)\
**Post date:** [27 August 2023 16:40 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/1 "2023-08-27T16:40:57Z")

</div>

This concerns the MacOS client. For several versions and I think MacOS versions, each time I connect I get a warning message (I am running in Swedish, but the translation should be (or very close to) “can not save local settings”), which has to be clicked OK each time.  
I have the problem with several different Macs and logins to different Linux systems.  
I remember have commented or even reported this as a bug a few years ago (in the old system), but nothing happened.  
Does anybody else see this error with Mac? Is there is “local fix”, something in the Mac to be changed?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/martin/32/41_2.png) [@martin](https://community.thinlinc.com/u/martin)\
**Post date:** [31 August 2023 06:43 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/2 "2023-08-31T06:43:11Z")

</div>

Hello @tedde59

Is this the dialog you are seeing?  
 ![Screenshot from 2023-08-31 08-42-02](https://europe1.discourse-cdn.com/flex005/uploads/thinlinc/original/1X/495bc90e2e1b6d3a4e9141db6ee9bd5cc752bc0a.png)

But localised to “Kunde inte spara lokala inställningar!” ?

Kind regards,  
Martin

---

<div class="post-metadata">

**Author:** ![tedde59](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tedde59](https://community.thinlinc.com/u/tedde59)\
**Post date:** [31 August 2023 07:55 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/3 "2023-08-31T07:55:46Z")

</div>

Yes, this is correct.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/martin/32/41_2.png) [@martin](https://community.thinlinc.com/u/martin)\
**Post date:** [31 August 2023 08:07 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/4 "2023-08-31T08:07:21Z")

</div>

Thank you.

The ThinLinc client will write its configuration to ~/.thinlinc/tlclient.conf, so you’d need to verify that you have correct permissions to write to this file.

Kind regards,  
Martin

---

<div class="post-metadata">

**Author:** ![tedde59](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tedde59](https://community.thinlinc.com/u/tedde59)\
**Post date:** [31 August 2023 14:44 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/5 "2023-08-31T14:44:05Z")

</div>

Hi, I remember getting this tip long time ago and checked with no success.

And tested again:  
~/.thinlinc/ has the drwxr-xr-x permission  
tlclient.conf has -rw-r–r–  
I also tested with change a simple setting in the client before connecting with the client (manually, see below). The file date was changed and settings were stored correctly.

The problems appears when I am running the thinlinc client through a script. The “problem I want to solve” is that there is no list of servers/passwords top level “app” (connection book). I am using thinlinc to connect to three different Linux computers with different user names, address, password, and SSH-ports, and it is really annoying to update all this data when connecting to another thinlinc server.

So I have created a shell script using the mac script editor. The command line runs fine in a shell, but not using the script (the script behaves like an app on the mac, very easy to just double-click to connect to another machine), then the warning message appears.

I also tested if in the script there is a problem with reading/writing the conf file, adding " -C ~/.thinlinc/tlclient.conf" to force using this file, but with the same effect.

But I can see that after starting with different machines using scripts that tlclient.conf is untouched, so it appears that the warning message is correct. This is also true with the -C argument as used above.

I think it boils down to “How to make the tlclient.conf writeable when using a Mac script”.

In the long run, adding a “connection book”, such as used in e.g. ftp client, would be useful.

/Ted

---

<div class="post-metadata">

**Author:** ![samuel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/samuel/32/335_2.png) [@samuel](https://community.thinlinc.com/u/samuel)\
**Post date:** [31 August 2023 20:27 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/6 "2023-08-31T20:27:23Z")

</div>

I would recommend checking out “.tlclient” files, they work well as a replacement for profiles or a “connection book”.

> [@New ThinLinc Versions / Development Roadmap](https://community.thinlinc.com/t/new-thinlinc-versions-development-roadmap/636/7):
>
> Hi @blacksnow! While this might not be precisely what you are looking for, I think it might help; you can create shortcut files with separate configurations for different hostnames. The files could, for example, be server1.tlclient and server2.tlclient and effectively work as different profiles. Files ending with .tlclient are associated with the ThinLinc client. Create an empty file with the suffix “.tlclient” (\*). Double click it to open the ThinLinc client. Make any changes you want to th…

[https://www.cendio.com/resources/docs/tag/client\_config.html#alternative-files](https://www.cendio.com/resources/docs/tag/client_config.html#alternative-files)

---

<div class="post-metadata">

**Author:** ![tedde59](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tedde59](https://community.thinlinc.com/u/tedde59)\
**Post date:** [31 August 2023 22:40 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/7 "2023-08-31T22:40:19Z")

</div>

Thanks, good tip and it works. However, I really want to pass the password to the thinlinc client so I can log in with just one click and I can not find out if this is possible in this way.

I spent more time debugging and it appears to be a sandboxing problem with MacOS. I am running tlclient from the script (inside the App as /Applications/Kommunikation/ThinLinc.app/Contents/MacOS/tlclient) and then write permissions are restricted. It is not a user problem, the permissions must be given to the App, and I can not find out if this is possible.

It is evident form the tlclient.log:  
2023-09-01T00:27:46: Error: Couldn’t open config to file ‘xxx:5881’ for writing  
where xxx.5581 is the server:port address.

And this is why it works still directly from a command line, because then it is executed with the user’s permission.

So until finding a workaround for the sandbox limitation, either I can continue with the script and click ‘OK’ at each start up. Or using the xxx.tlclient file and give the password each time.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/martin/32/41_2.png) [@martin](https://community.thinlinc.com/u/martin)\
**Post date:** [1 September 2023 06:01 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/8 "2023-09-01T06:01:05Z")

</div>

> [@tedde59](#):
>
> So until finding a workaround for the sandbox limitation, either I can continue with the script and click ‘OK’ at each start up. Or using the xxx.tlclient file and give the password each time.

Could public key authorization be an option instead of passing passwords around on the command line?

Regards,  
Martin

---

<div class="post-metadata">

**Author:** ![tedde59](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@tedde59](https://community.thinlinc.com/u/tedde59)\
**Post date:** [1 September 2023 06:36 UTC](https://community.thinlinc.com/t/macos-can-not-save-local-settings/689/9 "2023-09-01T06:36:51Z")

</div>

Another good tip! I will look into that, probably yes.

/Ted
