I worked around this by running the command line app using launchctl asuser 501 xxx
Topic:
App & System Services
SubTopic:
Core OS
Tags: