CGI - OS X problem

Ken Ray kray at
Tue Oct 17 02:19:39 EDT 2006

On 10/17/06 12:45 AM, "Andre Garzia" <soapdog at> wrote:

> Sarah,
> CGIs will run as a special user, not the logged user, usualy they
> will run as nobody/nobody. This is a secure measure.
> You can try to trap for the shell command known as who with
> get shell("who")
> this will echo que current logged users. The current user in the GUI
> session will be logged on ttyp1. After parsing it, you can just set
> the folder to /Users/<username>/Documents

Well that'll do it! I ran it on my Mac and got:

    kenray   console  Oct 14 17:44

It wasn't ttyp1, but it is definitely parseable. I tried it on a few other
Mac servers, and it worked like a charm!

Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list