giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.34k stars 457 forks source link

brew install on Mac doesn't have enough rights for saving the config #2317

Open netweaver1970 opened 1 year ago

netweaver1970 commented 1 year ago

Version, Operative system MacOS Ventura 13.4.1

Describe the bug

geertsteyaert@Geerts-MBP ~ % whereis cherrytree
cherrytree: /opt/homebrew/bin/cherrytree
geertsteyaert@Geerts-MBP ~ % /opt/homebrew/bin/cherrytree
[2023-07-20 10:50:23.696] [   ] [warning] Could not create config dir /Users/geertsteyaert/.config/cherrytree
[2023-07-20 10:50:23.696] [   ] [warning] /Users/geertsteyaert/.config/cherrytree/config.cfg missing
[2023-07-20 10:50:23.696] [   ] [warning] Could not create config dir /Users/geertsteyaert/.config/cherrytree/styles
[2023-07-20 10:50:23.696] [   ] [warning] Could not create config dir /Users/geertsteyaert/.config/cherrytree/styles
[2023-07-20 10:50:23.889] [   ] [debug] autosave is started
[2023-07-20 10:50:57.459] [gtk] [critical] 
unhandled exception (type Glib::Error) in signal handler:
domain: g-file-error-quark
code  : 2
what  : Failed to create file β€œ/Users/geertsteyaert/.config/cherrytree/config.cfg.tmp.IKMK81”: Permission denied

^C[2023-07-20 10:51:08.819] [   ] [debug] kill_callback_handler 2
libc++abi: terminating due to uncaught exception of type Glib::FileError
zsh: abort      /opt/homebrew/bin/cherrytree
geertsteyaert@Geerts-MBP ~ % 

it seems all related to the inability to write to the .config folder. I see that one is indeed very restricted, probably for very good reason:

drwx------   3 root           staff     96 Sep 29  2022 .config

I could start changing ownership, adding extra rights to group, etc... but I do can install and run other apps via brew, such as KeepassXC, without problems or unix level rights adjustments. So things must be possible in this restrictive context. And I don't want to run cherrytree with sudo.

Any solution/advice? I'm rather new to the MacOS ecosystem, so forgive me if there's something 'standard' I'm forgetting.

To Reproduce as detailed above

Screenshots as detailed above

netweaver1970 commented 1 year ago

to answer my own request, I found this link: https://apple.stackexchange.com/questions/320682/ownership-of-the-config-folder-in-home-directory

But I still have the same question, how do other brew installed apps then manage to work fine?

netweaver1970 commented 1 year ago

after changing the owner of the .config folder, I removed and re-installed via brew the cherrytree app. Now no warnings anymore when starting via the CLI. But still no link in the Launchpad. I created an Automator script in the Applications folder, which kind of works, but I don't think that's the official way to get it working?

dehesselle commented 1 year ago

When installing the program, no symlink is made to the Applications folder, so it can only be started via CLI

The Homebrew formula only provides an unbundled version of CherryTree. If you prefer to have an app, you can give this a try: https://gitlab.com/dehesselle/cherrytree_macos/-/releases

netweaver1970 commented 1 year ago

When installing the program, no symlink is made to the Applications folder, so it can only be started via CLI

The Homebrew formula only provides an unbundled version of CherryTree. If you prefer to have an app, you can give this a try: https://gitlab.com/dehesselle/cherrytree_macos/-/releases

thanks, that did the trick. Very nice, painless install and working fine. @giuspen Maybe worth mentioning this release also on the original release page, maybe with a disclaimer that you didn't built it yourself, support only by the app provider etc ...

Thanks both for putting all the effort into it!

giuspen commented 1 year ago

Hi @netweaver1970 the release installer from @dehesselle for mac is the very first in the list of packages advertised for mac os just after the apple icon https://www.giuspen.net/cherrytree/#downl I'm not sure where else you advise to link it

netweaver1970 commented 1 year ago

Hi @netweaver1970 the release installer from @dehesselle for mac is the very first in the list of packages advertised for mac os just after the apple icon https://www.giuspen.net/cherrytree/#downl I'm not sure where else you advise to link it

Ah, I must have been blind and stupid at the same time 😁 sometimes it happens... Luckily not too often.

Probably this whole Mac thing was troubling my vision.

Thanks.

giuspen commented 1 year ago

No worries @netweaver1970 I will advertise also in the GitHub cherrytree readme anyway πŸ˜‰