Making the Drawterm experience on macOS a little less unbearable.

1. Working with Drawterm as an app

You can run Drawterm from the command line like any other program, but if you also wish to have it as an app that lives in your Applications along with other apps, you can.

$ CONF=osx-cocoa make
$ cp drawterm gui-cocoa/drawterm.app/
$ cp -r gui-cocoa/drawterm.app /Applications

By default, Drawterm gets the remote user ID from the USER environment variable, which is set to the current user on macOS and may not be what you want for authenticating. Applying the following patch to the source code and rebuilding Drawterm will disable the environment variables and ask you for the username on every session:

Alternatively, you may set up the environment Drawterm starts with by adding the LSEnvironment property to /Applications/drawterm.app/Info.plist:

<key>LSEnvironment</key>
<dict>
	<key>USER</key>
	<string>glenda</string>
</dict>

You may set up additional variables by adding their key-value pairs to the <dict>. The only ones Drawterm recognizes are USER, PASS, cpu, and auth. See drawterm(1) for more details.

Update 2024-09-30: The USER variable doesn't seem to be overridable on macOS Sequoia 15. Change the user = getenv("USER"); line in cpu.c to get the user from a different variable (e.g. “DRAWTERM_USER”) and set that up in the LSEnvironment instead. Thanks, Apple.

Update 2024-11-01: As of macOS Sequoia 15.1, the Info.plist doesn't seem to allow an LSEnvironment at all. Thanks, Apple.

If you need command line arguments, you'll have to run the app from the actual command line:

open -a drawterm --args -r $HOME

2. Upscaling the Drawterm window

On somewhat recent versions of macOS, Drawterm renders too small compared to the rest of the UI. There are at least two ways to upscale it.

2.1. Magnified mode

A quick & dirty solution is to add the following key-value pair to the Info.plist:

<key>NSHighResolutionCapable</key>
<false/>

Note that this will require you to run Drawterm as an app (see above). In case you don't find that particularly appealing, or if the default linear magnification filter is not crispy enough, you may enjoy the second method instead.

2.2. Native high resolution

Apply this custom patch to the source code:

Build as usual and run with your preferred method.

3. Hiding the title bar

If you enjoy the minimal look of the No Title Bar window style from iTerm2, applying this patch will get you something similar in Drawterm.

Set NSWindowShouldDragOnGesture on your system and hold Control+Command to drag the window. Close with Command+Q.