lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symlinks replaced by applications (for Library/Preferences)

jonasdiemer opened this issue · comments

Hi,

I noticed that applications like BetterTouchTool and iTerm2 replace the symlinks created by mackup in ~/Library/Preferences/ with physical copies of the config files.

Is this expected? Would mackup restore still allow me to sync preferences to a device?

Regards
Jonas

I don't think it's expected, but I know there have been issues with some applications where they manually override the symbolic link.

I don't think we've found a way to fix this as it's the application doing it, which we have no control over.

@lra any suggestions? We'll probably want to do some tests before deciding what to do.

For anyone facing the same issue with iTerm2, a quick workaround would be to say iTerm2 to store the configuration in a custom folder, e.g. ~/.config/iterm2. Then, use a custom iterm2-ext-config.cfg :

[application]
name = iTerm2-ext-config

[xdg_configuration_files]
iterm2

Unfortunately, this approach works only for iTerm, and if an app keeps replacing a symbolic link with a file in, and there's no way to isolate that file in a separate folder, I'm afraid there's nothing can be done here.

Found some discussions on how to approach it here: https://apple.stackexchange.com/questions/385102/how-to-properly-symlink-files-in-the-library-preferences

One option might be to lock the file (chflags nouchg).

I've also had this with a number of applications,

  • Spotify
  • Telegram
  • Apple Terminal
  • Transmit (non-MAS version)
  • Raycast
  • IINA (media player)

Whenever I launch any of those on either of the two machines I am syncing, the alias to the plist in ~/Library/Preferences is deleted and replaced with a plist.

I'm using iCloud as a storage destination. Curious whether anyone else in this thread is also using iCloud?

This behavior has nothing to do with the storage destination (iCloud or whatever), as the symlink that is overwritten lies on the "source storage".

I imagine iCloud adds some quirks given that iCloud files can be changed to online-only automatically. I don't know much about how apps interface with .plists but I was wondering if the apps listed might be deleting aliases to online-only files and replacing with new .plists.

No, the symlinks that are put in place of the plist files have nothing to do with the storage destination - they simply point to another path in the filesystem (AFAIK).

I am seeing the same issue with using GitHub (i.e. folder) destination.

Is it fair to assume this might lead to Mackup being obsolete?

Is it fair to assume this might lead to Mackup being obsolete?

If every application and OS decide to throw away the POSIX concept of file linking, yes. But before it happens, the strategy has always been to remove support for those impacted applications in Mackup.

This seems like something that already is quite common. Are these suggestions valid?

Found some discussions on how to approach it here: https://apple.stackexchange.com/questions/385102/how-to-properly-symlink-files-in-the-library-preferences

One option might be to lock the file (chflags nouchg).

I really want to help on this but I don't know any python. I am tempted to see if I could build a node version that works with mackup's cfg files but it would be a huge investment just to get to the point I could even try addressing this issue so I'm going to fight the urge!

This appears to me to be specific to MacOS Ventura (13) - I don't appear to observe this issue on older releases

This appears to me to be specific to MacOS Ventura (13) - I don't appear to observe this issue on older releases

I was having this issue on Monterey

This appears to me to be specific to MacOS Ventura (13) - I don't appear to observe this issue on older releases

If it would be as easy as adding that chflags nouchg operation, then I hope it will be added soon :)

Is there anything in place for donating or sponsoring this to be worked on?

Owner of Raycast start to remove sync options without anybody notice because of this issue: #1980 (comment)
@gridsystem have right. Applications may have they own solution that block copy operation but it seams that is system issue. Maybe is there change in apple ecosystem about handling settings