Installing You Need a Budget 4 (YNAB) on Arch Linux

We only want to advertise YNAB for platforms that we can enthusiastically proclaim, “This will work great for you! We promise! If it doesn’t, we’ll work until it does.” The fact is, we can’t do that for Linux anymore. YNAB & Linux, 2011

Life events have me experimenting with You Need a Budget, software for planning and tracking budgets. I like that it has an opinionated plan that balances prudent buffers and real-world complexity. Unfortunately YNAB 4 was built on Adobe AIR, which no longer runs on Linux.

It took a bit of tinkering to get it running in Wine, the program for running Windows apps on Linux, so I wanted to write up my notes to save anyone else some hassle.

YNAB on Linux

First, I installed wine and some needed libraries:

 
$ pacman -S wine 
$ pacman -S lib32-lcms lib32-lcms2
$ pacman -S samba wine-mono wine_gecko lib32-gnutls lib32-mpg123 lib32-ncurses

Then, I downloaded YNAB and installed it by running wine with a WINEARCH because I heard YNAB might be flaky in 64 bits (I didn’t try to check this) and WINEPREFIX to isolate it from any other wine installs:

 
$ WINEARCH=win32 WINEPREFIX=~/.wine-YNAB wine ~/Downloads/YNAB\ 4_4.3.656_Setup.exe

This installed fine, and I made a little shell script named ynab to run the app:

 
#!/bin/bash
 
WINEARCH=win32 WINEPREFIX=~/.wine-YNAB wine C:\Program\ Files\YNAB\ 4\YNAB\ 4.exe

After I had YNAB running I noticed that tooltips were displayed as a series of boxes because of a missing font, which some searching said winetricks would install. I installed winetricks-git from the AUR and embarked on some yak-shaving.

At first whenever winetricks called wget to download the corefonts it failed with an error about not finding libgnutls.so.26. After installing libgnutls26 from AUR it was fine.

After that was fixed it happily downloaded files but failed to verify the downloads:

 
$ WINEPREFIX=/home/pushcx/.wine-YNAB WINEARCH=win32 winetricks corefonts
Executing w_do_call corefonts
Executing load_corefonts
Executing mkdir -p /home/pushcx/.cache/winetricks/corefonts
Downloading http://downloads.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe to /home/pushcx/.cache/winetricks/corefonts
--2015-04-30 20:32:59--  http://downloads.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
    # Try download twice
    checksum_ok=""
    tries=0 
Location: http://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download?use_mirror=superb-dca2 [following]
--2015-04-30 20:32:59--  http://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download?use_mirror=superb-dca2
Resolving sourceforge.net (sourceforge.net)... 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14566 (14K) [text/html]
Saving to: âarial32.exeâ
 
100%[==========================================================================================================================================================================>] 14,566      --.-K/s   in 0.02s   
 
2015-04-30 20:33:00 (591 KB/s) - âarial32.exeâ saved [14566/14566]
 
------------------------------------------------------
Checksum for /home/pushcx/.cache/winetricks/corefonts//home/pushcx/.cache/winetricks/corefonts/arial32.exe did not match, retrying download
------------------------------------------------------
mv: cannot stat â/home/pushcx/.cache/winetricks/corefonts//home/pushcx/.cache/winetricks/corefonts/arial32.exeâ: No such file or directory
Downloading http://downloads.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe to /home/pushcx/.cache/winetricks/corefonts
--2015-04-30 20:33:00--  http://downloads.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: http://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download?use_mirror=colocrossing [following]
--2015-04-30 20:33:00--  http://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe/download?use_mirror=colocrossing
Resolving sourceforge.net (sourceforge.net)... 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 200 OK
 
    The file is already fully retrieved; nothing to do.
 
/sbin/winetricks: line 503: /home/pushcx/.cache/winetricks/corefonts//home/pushcx/.cache/winetricks/corefonts/arial32.exe: No such file or directory
------------------------------------------------------
sha1sum mismatch!  Rename /home/pushcx/.cache/winetricks/corefonts//home/pushcx/.cache/winetricks/corefonts/arial32.exe and try again.
------------------------------------------------------

I spent a while wondering why the filename at the end was doubled up, but that never actually mattered. When I looked at what had been downloaded, it was not a cab .exe (though it had that filename) but an HTML download page from Sourceforge. Sourceforge tweaked something that prevented the script from grabbing the correct file, presumably to show more ads on download pages.

Then I went to the corefonts download page and grabbed all the .exes. I tossed them into ~/.cache/winetricks/corefonts and running winetricks again installed them all. A quick rm -r ~/.cache/winetricks cleaned up the cache. To save future hassle, I put up a mirror on GitHub.

After that hassle, the ynab command brings up YNAB for hours of fun budgeting and reconciliation. Yay, adulthood!

Want more? I'm not as good at forgetting to update @pushcx on Twitter.