I want a perl script to check if a particular server volume is mounted on my machine (I’ll get more complicated once this is cracked!). I am using perl as it is fundamentally a web application and I’d like to access a database down the line. I’m trying to set a variable as follows:
osascript -e 'list disks';
but the variable ends up empty and my system.log shows the follwing error:
WindowServer: _CGXGetDisplayShmem: Unauthorized user
osascript: kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
WindowServer: _CGXNewConnectionPort : Unauthorized user
osascript: kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
Running a similar command in Terminal works perfectly. Anyone got any idea what these errors mean and how to work around it?
Thanks in advance.