[TxMt] TM_USERNAME is null on Leopard

John Hunter john at johnhunter.info
Thu Nov 29 13:20:48 UTC 2007

Since upgrading to OS X 10.5 the TM_USERNAME variable used in bundles  
has been unset.

The following command is the problem:

TM_USERNAME=`niutil -readprop / /users/\$USER realname`

Seems that the niutil command has been dropped from 10.5 onwards and  
replaced by the dscl command.

The following gets the current users real name but prepends it with  
the property key:

dscl . -read /Users/$USER RealName

  John Hunter

I'm not sure how you get the value without the key.

Has anyone got a solution to this? It affects most of the templates.

Apologies if its been covered before.


More information about the textmate mailing list