Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change font size (MacOS Monterey, MBP M1) #222

Open
bill-hudacek opened this issue May 7, 2022 · 2 comments
Open

Cannot change font size (MacOS Monterey, MBP M1) #222

bill-hudacek opened this issue May 7, 2022 · 2 comments

Comments

@bill-hudacek
Copy link

I installed cask password-gorilla using brew just a few days ago, and the GUI did not display after logging in to PWG. So I downloaded "MacOSX (gorilla15372.zip)" from https://gorilla.dp100.com/downloads/

Now the GUI comes up, and I can see all the lovely passwords. But on this display 10pt font (default) is too small, so I tried to change to 12pt from preferences, and PWG promptly crashed with the prompt to report to apple, restart, etc.

It won't remember the database path unless I login, then exit normally, then restart - after that, at least the DB path i remembered. But it crashes on any attempt to change that preference.

Is this a known issue? I figure there should be many others who are running on this platform - but that's a guess.

Is there a config file on disk on macOS, that I can edit while it's not running?

Where does PWG log - or how can I debug it?

I'm a long-long-time linux guy, basically just starting out on macOS (and not having huge success at "the apple way").

@rich123
Copy link
Collaborator

rich123 commented May 7, 2022

Yes, it has been reported before (or at least "crash on font size change" has):

#122

#109

The problem seems to be (because all the Gorilla Tcl code does to request a different size font is use the Tk font command to set a different size) a problem either in the TclKit executable and/or a problem in the interface between that executable and the MacOS X11 layer.

Changing to more recent TclKit executable wrappers has, in the past, avoided it until another MacOS version bump by Apple, and then Apple changes something yet again, and similar issues arise again.

The most reliable way to avoid the issue is to download the source bundle from github, and run the Gorilla Tcl/Tk code using the Apple bundled native MacOS Tcl interpreter. Presumably that works because when Apple makes a breaking change in their windowing system, they also fix the bug they create for their installed Tcl/Tk.

Sadly, I do not know of any way to distribute a script as an Apple installable package such that the script and its supporting files install as a MacOS "app" but also make use of the Apple provided Tcl/Tk interpreter. Not having a Mac myself also makes debugging and any fixes on my part difficult if for no other reason than the debugging latency is on the order of days, not seconds or minutes.

In one of the prior issues, one Mac user did edit the font stored in the preferences file, and that worked, so the issue seems to be some bug with dynamic font changes after the UI has been fully rendered. Note that editing the preferences still means that trying to change the font at runtime will elicit a crash, running the source with Apple's provided Tcl/Tk should make runtime font size changes function as intended.

The preferences file will likely be at $HOME/Library/Preferences/gorilla.rc on your Mac, although the Gorilla code will fall back to $HOME/.gorillarc if $HOME/Library/Preferences does not exist. This file is just a simple key/value store. The line you'll want to try changing is "fontsize=##" where ## is the font size you want to try. The ## value to Tk is defined by Tk to represent points (but this does assume that MacOS reports to Tcl/Tk a proper screen DPI value to allow Tk to compute the size of a "point" on screen). You may have to experiment a bit to find the right value.

@bill-hudacek
Copy link
Author

bill-hudacek commented May 7, 2022

OK, thanks for that info. Wow, #109 was in 2013! No wonder I didn't find it...I understand now what you're facing with macOS (nee OS X).

I found te gorilla.rc in ~/Library/Preferences, just as you described. It had fontsize 10; 12 didn't really make a difference, but 14 and then 16 look much, much better.

Many thanks. Who knows, one day I might become a tester - or a developer - on mac and try to help you guys out. It's tough enough to develop & test software without the headwinds you have described here! :-/

Do you have some way to sponsor your work - getting you a recent MBP would be a goodness, but I'm not in a position to just buy you one all by myself, sorry to say!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants