HiDPI solution found!

Mark Sarnov's Avatar

Mark Sarnov

21 Mar, 2019 12:37 AM

Hi all,
I have been very frustrated with the HiDPI problem with Moneydance and Linux and hoped 2019.1 would be the solution.
Alas, it is not... the problem is with Java and how the JRE is called in the "Moneydance" script that is located in the /opt/Moneydance directory.
The solution is actually pretty simple.

create a backup of the Moneydance file:

$ sudo cp /opt/Moneydance/Moneydance /opt/Moneydance/Moneydance-backup

Edit /opt/Moneydance/Moneydance in your favorite text editor. I like joe but nano, xedit, gedit, kate, leafpad or whatever will do. You have to be root or sudo to edit this file.

$ sudo joe /opt/Moneydance/Moneydance

At the top of the file are these lines:

# Uncomment the following line to add additional VM parameters
# INSTALL4J_ADD_VM_PARAMS=

change them to the following:

# Uncomment the following line to add additional VM parameters
INSTALL4J_ADD_VM_PARAMS="-Dsun.java2d.uiScale=2"

close and save the file.

Then run Moneydance as you normally would (from the icon installed on your system, or if you like command lines, execute "./opt/Moneydance/Moneydance"

And Voila, FTW!

You're welcome!
Cappy

P.S. I have attached the modified Moneydance file that you can download and copy to the /opt/Moneydance directory after backing up your Moneydance file and renaming it to /opt/Moneydance/Moneydance.

  1. 1 Posted by Henry on 22 Mar, 2019 12:15 PM

    Henry's Avatar

    Hi Mark,

    Thank you for submitting your solution for HiDPI screens.
    Our lead developer suggested to create a Knowledge Base article using your solution, I was planning to include your name but I can also leave out if you prefer.

    Thank you in advance!

    Henry
    Infinite Kind Support

  2. Support Staff 2 Posted by Sean Reilly on 22 Mar, 2019 04:09 PM

    Sean Reilly's Avatar

    I just wanted to thank you for the fantastic solution. I'd been looking all over for how to do this programmatically (and will continue) but this is a great fix in the meantime!

    Also, for the record you can make the change a bit more easily by editing the Moneydance.vmoptions file and adding the following two lines anywhere in the file:

    -Dsun.java2d.uiScale=2
    -Dsun.java2d.uiScale.enabled=true
    

    Unfortunately it doesn't seem to be possible to have non-integer scaling, as with KDE which seems more flexible than Gnome WRT scaling.

    Thanks!

    Sean Reilly
    Developer, The Infinite Kind
    http://infinitekind.com

  3. 3 Posted by deerewright on 25 Mar, 2019 04:04 PM

    deerewright's Avatar

    FINALLY, THANK YOU, THANK YOU, THANK YOU!

    However ;-), Now the Menu Bar text is too big (i.e. File, Edit, View, etc).

    Is there a way to fix/adjust that?

  4. Support Staff 4 Posted by Sean Reilly on 29 Mar, 2019 02:28 PM

    Sean Reilly's Avatar

    Hi @deerewrite,
    That may be dependent upon the current colour theme that is set in the preferences. Either way, I think I have a fix for that in the next preview build of Moneydance (build 1862) which I might be able to upload to the preview site (https://infinitekind.com/preview) today.

    Thanks!
    Sean

  5. 5 Posted by Mark Sarnov on 29 Mar, 2019 03:47 PM

    Mark Sarnov's Avatar

    Hi Sean and Henry,
    Thanks for mentioning me in the knowledge base article about the workaround I provided above.
    I am not sure what you have planned, but perhaps a function call to retrieve the current resolution and then a simple decision tree to determine what scaling factor should be used when creating the Moneydance Java VM.
    a bash command in linux such as the following will yield a result such as "1920x1080"

    xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'

    This can be parsed to a text string variable and then used to assign the scale factor. (back in my day, I programmed in Pascal and would use a "case" statement!)

    I hope your solution is more elegant than mine!

    CappyCaffeine

  6. 6 Posted by Mark Sarnov on 29 Mar, 2019 03:59 PM

    Mark Sarnov's Avatar

    Oh.. and I don't know if this helps. I am not a Java developer. I just know enough to get myself into trouble!
    Cappy

    http://openjdk.java.net/jeps/263

  7. 7 Posted by deerewright on 31 Mar, 2019 01:18 AM

    deerewright's Avatar

    Has the new preview been uploaded yet? Webpage still shows build 1860.

    As an aside, have you considered naming your download files with the version in the file name? It would be much easier for the user to determine which is the latest version...

  8. 8 Posted by deerewright on 11 Apr, 2019 10:57 PM

    deerewright's Avatar

    I just tried build 1865, and it does not work with HIDPI, all the fonts are again too small.

  9. 9 Posted by Henry on 12 Apr, 2019 12:31 PM

    Henry's Avatar

    Thank you for reporting this, I have notified our lead developer and will let you know as soon as I get a response.
    To double check this happened right after 1865, correct?

    Henry
    Infinite Kind Support

  10. 10 Posted by deerewright on 12 Apr, 2019 04:12 PM

    deerewright's Avatar

    I installed 1865 to see if it addressed my earlier problem:

    However ;-), Now the Menu Bar text is too big (i.e. File, Edit, View, etc). Is there a way to fix/adjust that?

    As per @Sean Reilly:

    That may be dependent upon the current colour theme that is set in the preferences. Either way, I think I have a fix for that in the next preview build of Moneydance (build 1862) which I might be able to upload to the preview site (https://infinitekind.com/preview) today.

    To summarize build 1865 does not scale properly for HiDPI in linux. With the above additions to .vmoptions file it does scale, but still has the very large Menu bar and sub menus. See Screenshot

  11. 11 Posted by Mark Sarnov on 12 Apr, 2019 05:31 PM

    Mark Sarnov's Avatar

    Hi Deerewright,

    Looking at your screenshot, I am assuming your screen resolution is greater than 3200 x 1800. If you are using a gnome/GTK 3 based desktop/window manager, I am assuming your scaling factor is 3?
    And: what distro are you using? Looks like Elementary..

    If so.. the best workaround I can think of is this:
    Create a new user on your system; "Moneydance"
    login to "Moneydance"'s account.
    Change and force the scaling factor to 2, instead of 3 or "Auto"
    Launch Moneydance and see if the menu bar is more reasonably sized.
    From there, increase the font size from Moneydance's preferences (+1,+2,+3, etc)

    Not the cleanest solution, but if helpful, let me know.

    Cappy

  12. 12 Posted by deerewright on 12 Apr, 2019 07:43 PM

    deerewright's Avatar

    @Henry

    Thanks for the suggestion. I am actually using Pop!_os, which I think is using Gnome 3 for desktop. My res is set to 3200x1800 (max) and am scaling at 200%.

    My current set up works fine: .vmoptions scale 2, and MD font preference +2. its just a little annoying with the large menu bar. I dual-boot with windows 10, and occasionally use Moneydance in Windows. I really don't want to change my font preferences in Moneydance because what I have set works great in Windows.

    My purpose in posting was for the developers info.

    I originally purchased Moneydance years ago to get away from Quicken/Windoesn't, and because it ran on Linux. However, I have been frustrated with the recent (apparent) lack of support for Linux. I do realize that I am probably in the minority, with more users probably using Windows and Mac, but there really is no other alternative to MD on Linux. I also realize that multi-platform apps are not easy to develop, and at the time MD was created, Java was probably the only alternative. I know just enough to be dangerous, but IMHO Java has run its course.... Off my soapbox now. ;)

  13. Support Staff 13 Posted by Sean Reilly on 24 Apr, 2019 09:28 AM

    Sean Reilly's Avatar

    Hi Deerewrite,

    Could you try using the "Dark Mode" colour scheme in Moneydance's preferences and let me know if you still have the same menu bar issue?

    Thanks,
    Sean

  14. 14 Posted by deerewright on 24 Apr, 2019 04:43 PM

    deerewright's Avatar

    Thanks, "Dark Mode" does solve the Menu bar issue....

    So, what makes the difference with "Dark Mode"?

  15. 15 Posted by dwg on 24 Apr, 2019 11:11 PM

    dwg's Avatar

    I'm a fellow user.

    During beta testing a lot of issues were reported with dark mode and especially around visibility and readability, as a result as I understand it dark mode works somewhat differently to the other themes with a lot more hard coding used.

  16. 16 Posted by Mark Sarnov on 25 Apr, 2019 12:42 AM

    Mark Sarnov's Avatar

    HI Sean and Henry,
    Ok.. I just installed 2019.2 (1868) and the preview of 2019.3 (1870) and the fonts look like crap (in English). This includes the menu bar and the fonts in the register, etc.
    The problem started with 1868 and I installed the 1870 preview to see if it was resolved.
    It is not.
    Is there anyway to have 2019.1 downloadable again so I may revert to it?
    Thank you,
    Cappy

    Update: Never mind.. found the library! https://infinitekind.com/stabledl/

  17. 17 Posted by Jim on 27 Apr, 2019 09:05 PM

    Jim's Avatar

    FYI the bad fonts started with 1860, see here for details:
    https://infinitekind.tenderapp.com/discussions/problems/53241-bad-s...

  18. 18 Posted by deerewright on 28 Jun, 2019 11:15 PM

    deerewright's Avatar

    ANY update on this? ANY plan to implement the fix into the install?

  19. 19 Posted by Henry on 02 Jul, 2019 11:49 AM

    Henry's Avatar

    Hi All,

    I apologize for the late response.
    Do you see the same bad font issues with 2019.3 (1880)?
    The latest version 2019.3 (1880) is available from here:
    https://infinitekind.com/download-moneydance-personal-finance-software

    --
    Henry, Infinite Kind Support

  20. 20 Posted by deerewright on 13 Jul, 2019 02:55 PM

    deerewright's Avatar

    @Henry

    The OP was about HiDPI, not the bad fonts. That was also my reference:

    ANY update on this? ANY plan to implement the fix into the install?

    Any update on HiDPI?

    Maybe the posts should be split into two separate topics.

  21. System closed this discussion on 12 Oct, 2019 03:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac