this StackOverflow question. It looks like when updating TotalTerminal, the SCRIPT_NAME environment variable remains set for all new terminal windows until the computer is restarted. This breaks some webservers (gunicorn broke for me, rails for a guy on the SO question).
Restarting the computer fixes the problem.
Do you have multiple users logged in on your machine? Is your webserver running under other users?
This is what TotalTerminal installer does to restart it (effective in future version):
This file has been truncated.
# replace /Applications/TotalTerminal.app with pre-Yosemite version, if needed
TMP=`sw_vers -productVersion|grep '10\.\(8\|9\)'`
if [ $? -eq 0 ]; then
rm -rf /Applications/TotalTerminal.app
cp -a /Library/ScriptingAdditions/TotalTerminal.osax/Contents/Resources/Agent/10.9/TotalTerminal.app /Applications
TMP=`sw_vers -productVersion|grep '10\.\(8\|9\|10\)'`
if [ $? -eq 0 ]; then
# the goal here is to relaunch Terminal.app under the right user aka "Mach bootstrap namespace"
# note: we can have multiple users logged in concruently (for fast user switching), each has its own loginwindow process
# in $OUTPUT we will list all loginwindow processes and pick only the one belonging to the currently logged-in user
USERID=`id -u "$USER"`
OUTPUT=`ps -lax | grep '[l]oginwindow.app' | grep "^[ ]*$USERID "`
if [ -n "$OUTPUT" ]; then
set - $OUTPUT
This is the code in the latest release (including 1.4.6):
I think the problem is that Terminal.app gets relaunched under different user account.
Nope, just one user.
SCRIPT_NAME was set to
postinstall which makes me think it was some sort of leftover from the install process.
Perhaps something about launching TotalTerminal via launchctl after updating causes environment variables present in the install process to persist?
Just ran the update to 1.4.10 and got this taint again. Is it possible to simply run
unset SCRIPT_NAME at the end of the installer script to prevent this?
Same here, got it again. It had been just enough time for me to forget what was wrong… Lost another 15 mins or so debugging
I’m sorry for that. I just did some tests and implemented this change, which resolves the leaking environment on my 10.9.2 machine.
This change will be effective since next release (1.4.11).
Please download and install
v1.4.11. Please report back if you spot some strange environments in Terminal.app after installation.
I just installed 1.4.11 and compared the output of
/usr/bin/env before and after the install. I didn’t see anything unexpected! Looks like you fixed it! Thanks