MacOS can not save local settings

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?

Hello @tedde59

Is this the dialog you are seeing?
Screenshot from 2023-08-31 08-42-02

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

Kind regards,
Martin

Yes, this is correct.

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

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

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

https://www.cendio.com/resources/docs/tag/client_config.html#alternative-files

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.

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

Regards,
Martin

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

/Ted