Table of Contents

Create a Program Launcher for Giocoso, Accessing Music Player Remotely

The Script Editor allows you to create Apple Scripts. Click New Document and paste this lot in:

do shell script "/opt/local/bin/bash -c '/opt/local/bin/wezterm -e ssh -Y -t hjr@frank \"tmux new-session -A -s giocoso \"/usr/bin/giocoso3.sh\"\"'"

File → Save and then give it a name, save in the Applications folder, and be sure to select File Format = Application.

Note that that's the version for Macports on older versions of macOS. On the latest, greatest Tahoe, the path to wezterm and bash (having been installed by Homebrew) are different. The command there would be:

do shell script "/opt/homebrew/bin/bash -c '/opt/homebrew/bin/wezterm -e ssh -Y -t hjr@frank \"tmux new-session -A -s giocoso \"/usr/bin/giocoso3.sh\"\"'"

In either case, the script says “launch Wezterm terminal then ssh to my music player PC and use tmux to create an uninterruptible session in which Giocoso will run”.

If you wanted to run the program locally, you'd simply do:

set myCommand to "/opt/homebrew/bin/bash -l -c /usr/local/bin/giocoso3.sh"

-- Calling the binary with just the command arguments skips the 'default' window logic
do shell script "/opt/homebrew/bin/wezterm start -- " & myCommand & " > /dev/null 2>&1 &"

delay 0.5 -- Give it a heartbeat to spawn
tell application "WezTerm" to activate

Replace mention of “giocoso3.sh” with, for example, “semplice2.sh” to get other bits of my software running locally, too.

To assign the new application a program icon, right-click its icon in Applications, select Get Info. Drag the required program icon to the top-left of the resulting panel:

Get the little icon correct in the top-left corner and the big icon in the lower part of the panel will come right, too. Once it is, close the panel and the launcher in Applications will look correct, too.

Configure Wezterm Terminal to look nice

Wezterm Terminal can be installed with Homebrew or MacPorts:

brew install wezterm

…or…

sudo port install wezterm

WezTerm will tend to want open by default using a small window with small fonts: I suggest you would want to change that up a bit. The way you do that is to issue these commands:

cd
nano .wezterm.lua

Paste into the new file the following:

local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.initial_cols = 103
config.initial_rows = 28

config.colors = {
    -- The default text color
    foreground = 'green',
    -- The default background color
    background = 'black', 
}

config.font = wezterm.font("Courier New", {weight="Regular", stretch="Normal", style="Normal"})
config.font_size = 16

wezterm.on('format-window-title', function(window, pane, tabs, panes, config)
    return "Giocoso : The Classical Music Player"
end)

return config

Save the modified file. Hopefully, most of this is self-explanatory: it tells WezTerm to open at an initial 103 columns by 28 rows; to use the built-in Courier font at 16pt size, and to auto-launch Giocoso when it itself launches.

Note that if you have alternative fonts available, simply swap their name (eg, “Luxi Mono” for “Courier New” in the above script, leaving everything else the same.

Some Apps

Firefox can be downloaded with Safari! Visit their website and download it directly.

Proper file system navigation: install Commander One. Same deal: direct download from their website. On the other hand, it pays to learn to set up Finder's left-hand navigation pane correctly (with placeholders for your home folder, etc) and then Finder is plausibly usable.

Nice text editor: Geany, also directly-downloadable from their website.

Rectangle for Windows snapping (Monterey doesn't do it natively, I think).

Virt-Manager is installable via Macports and/or Homebrew (See, for example, this article). Looks revolting, with terrible screen resolution and fuzzy appearance, but it works sufficiently, though GUI connections to the guest desktop will fail frequently (but can be restarted as necessary). Note that I've always found Virt-Manager an awkward tool to use and have thus recently given up trying to do KVM on a Linux server altogether. These days, I use Proxmox for all my Intel CPU virtualisation requirements and interface with it via a standard browser on my physical PC: the looks and resolution are perfectly fine in that environment.

UTM is installable for free and is a nice virtual machine hypervisor, in the same way as VirtualBox is (but without coming from the House of Oracle). Works nicely for Windows and Linux VMs and, on the lastest M4 iMacs, it will virtualise macOS environments too. One word of warning: if you're virtualising macOS in UTM, you may well find that terminals like Kitty and WezTerm won't launch because they depend on an accelerated graphics processor -and UTM doesn't pass through your physical PC's graphics hardware. I've found, however, that iTerm2 can be installed (e.g., brew install iterm2) and will run successfully and it can display sixel graphics correctly, so Giocoso displays album art perfectly fine in it. Note that UTM doesn't do snapshots of VMs. Tools that claim to provide a wrapper around qemu to do this rely on finding qemu in a Homebrew-specific location, so won't work if you're using Macports… :-(

CrystalFetch ISO Downloader works with UTM in a synergistic manner to enable the easy downloading and creation of Windows 10 and 11 ISOs.

Homebrew

First install the tools needed to compile new software:

xcode-select --install

After that, follow the instructions at their website.

Once installed:

echo >> /Users/hjr/.zprofile
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/hjr/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

These commands are shown to you at the end of the installation anyway, so just do them as provided: the “hjr” bit of the above is obviously specific to me!

To get Giocoso installation script downloaded, you're going to need the wget utility and a modern version of Bash, so my suggestion for your first test of Homebrew is to issue the command:

brew install wget bash

It will take an age to compile. Just be patient…

Installing Macports

The alternative to Homebrew for installing new packages on macOS is Macports, which has the advantage over Homebrew of running on older macOS versions (Homebrew won't support installing things on Monterey, for example, though it will still work for the most part: there's just no support for getting it to work).

Do not use both Macports and Homebrew: it's one or the other, but never both at the same time. All hell lets loose when you mix your package managers!

To install Macports:

First install the software compiler toolchain:

xcode-select --install

After that, download the appropriate package for your version of macOS:

https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-26-Tahoe.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-15-Sequoia.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-14-Sonoma.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-13-Ventura.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-12-Monterey.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-11-BigSur.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-10.15-Catalina.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-10.14-Mojave.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-10.13-HighSierra.pkg
https://github.com/macports/macports-base/releases/download/v2.11.6/MacPorts-2.11.6-10.12-Sierra.pkg

These URLs are obviously version-dependent and the versions shown are only correct at the time of writing (December 2025). Check the Macports website for the actual versions current at the time you want to install. There are versions available for macOS releases earlier than Sierra, but installing Giocoso on such ancient operating systems is definitely not supported at all, so be my guest but you're on your own for them!

You will need wget and a modern version of Bash to be installed before you can obtain the Giocoso installer:

sudo port install wget bash

After that, wget software.bbritten.com/gioinst.

NFS Mounts

They work much as in Linux, but with one key extra mount option required:

ben:/bulkdata/music /private/netmusic nfs rw,resvport,hard,intr,rsize=131072,wsize=131072,timeo=14

The trailing “0 0” you stick on such mounts in Linux are not required in macOS

Giocoso Playback Issues

There is no ability to pause play in Giocoso on macOS. Pausing the ffmpeg process doesn't pause whatever the macOS audio subsystem is up to in the background (unfortunately), so that when you resume play, the audio subsystem says “Oy, real time clock was at Y but is now at Z, catch up”… and ffmpeg does what it's told. The only workaround would be to literally kill ffmpeg with a note of where it was up to and then resume with the ss starting switch. Clunky and I'm not up for coding that as yet… For now, the pause/resume buttons have been removed if macOS is detected as the operating system in use.

ImageMagick Issues

Installing ImageMagick in a Homebrew setting is an absolute nightmare (without which, Giocoso cannot show album art and instead shows error messages). The 'brew install imagemagick' fails on my Monterey macOS, because it tries to check for Unicode support, can't find the relevant library and thus gives up (the error is “ICU support no…”).

A very awkward workaround is possible:

brew install icu4c@78 pkg-config autoconf automake libtool
cd /tmp
curl -LO https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
tar xzf ImageMagick.tar.gz
cd ImageMagick-*
./configure \
  --with-icu \
  CPPFLAGS="-I/usr/local/opt/icu4c@78/include" \
  LDFLAGS="-L/usr/local/opt/icu4c@78/lib"
  
make -j4
sudo make install    

I mean, it works:

You can see the ghastly software compilation in the background, resulting in Giocoso in the foreground having no problem displaying album art… but it's a heck of a way to get to the desired destination!

An entirely different error stymies ImageMagick's installation on Catalina, too: this time, the problem will be that libzip can't be installed. The fix here is to issue these commands:

  cd
  cd Downloads
  wget https://imagemagick.org/archive/binaries/ImageMagick-x86_64-apple-darwin20.1.0.tar.gz
  tar -xzf ImageMagick-x86_64-apple-darwin20.1.0.tar.gz
  sudo mv ImageMagick-7.0.10 /usr/local/ImageMagick

Next:

  sudo nano /etc/paths
  At the top of the file, add a new line reading: /usr/local/ImageMagick/bin
  sudo cp -R /usr/local/ImageMagick/lib/* /usr/local/lib
  sudo cp -R /usr/local/ImageMagick/bin/* /usr/local/bin

Which is to say, download a quite old binary version of the program and manually copy it into places that the system will discover it exists.

Tweaks

Helios Screensaver: https://helios.macupdate.com/

Shortcuts

Command + Shift + 4, then spacebar : Screenshot a particular window
Command + Shift + 4 : Screenshot a rectangular region
Command + Shift + 3 : Screenshot the whole screen

Command + H : Hide a window
Command + Q : Quit an application
Command + Tab : Cycle through open applications

Command + Shift + . (fullstop) : View hidden files/folders in Finder

Compose Key

OMG. This is much harder than it is in Linux! Well, not harder exactly, but a lot more fiddly to set up. Once it's set up, though, it works very much as it would on Linux, so there's that!

First: download and obtain a (free!) copy of Karabiner Elements, suitable for the version of macOS you're using, from here. The version on the big download button is only suitable for more recent macOS versions, so click the little down-arrow button to grab versions suitable for, say, Monterey or Catalina.

Once downloaded, do the usual “double-click to install” routine and step through the wizard.

Next, click here and copy the content of the weird-looking code in its entirety. It is an extremely long piece of code: over 4000 lines. Make sure you copy ALL of it, no exceptions.

Then in a terminal session, type:

cd
mkdir -p /Users/hjr/Library/KeyBindings (replace "hjr" with your own username, of course)
nano /Users/hjr/Library/KeyBindings/DefaultKeyBinding.dict

Paste into the new file the entire contents of the previously copied key binding code. Save.

The important thing to note about that code is how it starts:

{
    "\UF710" = {
        "\U0020" = {
            "\U0020" = ("insertText:", "\U00A0"); /* Compose, SPACE, SPACE: NO-BREAK SPACE */
            "\U0027" = ("insertText:", "\U0027"); /* Compose, SPACE, APOSTROPHE: APOSTROPHE */
          

That “\UF710” is the Unicode binding for F13. The file is basically saying, “When you see F13 pressed, do the following textual substitutions for whatever is typed next”… and then goes on to list something like 4000 possible substitutions to do! The trouble is that if your Apple Magic Keyboard is like mine, it won't have an F13 key. That, however, is where Karabiner Elements comes into effect: you run the program and create a new Simple Modification that maps the right-Command button to F13:

You're essentially saying “if I type right-command, interpret that as me pressing F13”. They keybinding file created earlier then kicks in and says, “F13 has just been pressed, what do I now do?” …and at that point, we're off to the races!

Be aware that Karabiner Elements will need all sorts of permissions to run effectively to provide this key remapping capability. In particular:

So, that's General → Login Items & Extensions: grant both parts of Karabiner those rights. Additionally:

Both parts of Karabiner need to be granted the ability to do input monitoring. You may need to grant additional privileges as well, if Karabiner asks for them.

Now, close down your text editor if it's open (really close it down by quitting, don't just hide it), then re-open it from scratch and type Right-Cmd + ' + e and you'll see é; type Right-Cmd + = + e and you'll get €; type Right-Cmd + + u and you'll get ü… and so on. The point is: you have to re-launch programs that were already open at the time you installed Karabiner Elements in order to get the new keybindings picked up by applications. Once it's working, the Right-Cmd button essentially acts as the equivalent of the Linux “compose key” and all the usual key combinations apply.

SuperDrive Eject CD

On Apple Magic Keyboards version 2, there is a TouchID button where the old physical eject button used to be. So how do you eject a CD without a suitable button to press? Well, you could use Karabiner to re-define an existing key to act as though it were the old eject key. But it can also be done by adding an eject icon to the top-right of your permanent menu bar.

The Eject icon (a chevron with a line under it) will instantly appear in your menu bar:

It's the third icon from the left!

Virtual Desktop Ordering

MacOS has an intensely annoying habit of deciding that your virtual desktops (what it calls 'spaces') should be re-ordered according to how recently you used them. Which is extremely aggravating if you're the kind of person that thinks to themselves “Office is on desktop 2 and Giocoso is on desktop 4”, for example.

Fortunately, this is only macOS's default behaviour and you can switch it off:

That's in System SettingsDesktop & DockAutomatically rearrange Spaces based on most recent use. Turn that toggle switch off and your virtual desktops will remain in the order you thought they should be in!