Pi Gibberish trying to write to Desktop

Eugene, you solved my initial problem of not being able to write to a file on the Pi, but it looks like I may still have a fonts problem, as your version of my test still generates gibberish. But using your path to the Desktop, my much more complicated original program is writing the data I want to the desktop, so my problem is solved. The test version gibberish remains a mystery, but is no longer a problem for me. But I’ll provide details below if anyone is interested.

I had hoped Tim may have revealed why MBS Chartdirector won’t display any text on graphs in my original program, but still no luck there. Maybe this needs a new thread. I tried his suggestions:

cd /usr/share/fonts/truetype ’ had to add cd
Install ttf-mscorefonts-installer ’ Pi responds with bash: Install: command not found
sudo apt-get install ttf-mscorefonts-installer ’ does appear to install dozens of fonts
fc-list ’ lists dozens of fonts
fc-cache -fv 'lists multiple font families, and reports succeeded

Eugene’s code still generates gibberish, says ELF is not found. Google tells me ELF is Executable and Linkable Format, suggesting the Xojo compilation is the problem. So I went back to 2018 r1.1, and got different gibberish, but apparently ELF is not the problem this time. The first line was:

Xojo 2018 r2:
./RPtext: 1: ./RPtext: ?F@z#@8@@@@@@????@?@@@??^^pF?F^^: not found

Xojo 2018 r1.1:
./RPtext: 1: ./RPtext: ELF: not found
./RPtext: 4: ./RPtext: .IL?
??: not found
./RPtext: 2: ./RPtext:
?\Kd?: not found
./RPtext: 4: ./RPtext: ?+N?????
?G!9: not found
./RPtext: 10: ./RPtext: PB2K?FTVh
??G????: not found
./RPtext: 11: ./RPtext: Syntax error: “)” unexpected