[Ipe-discuss] Checking HOSTNAME in an ipelet
Otfried Cheong
otfried at ipe.airpost.net
Tue Nov 9 05:59:03 CET 2010
On 11/09/2010 08:47 AM, Dmitriy Morozov wrote:
>>> if os.getenv("HOSTNAME") == "cole" then
>>
>> Ipelets run in a protected environment.
>>
>> Use _G.os.getenv to access the getenv function.
>
> _G.os.getenv("HOSTNAME") returned nil, whereas from within Lua
> interpreter it returns the actual hostname.
Perhaps because you ran lua from a shell that sets HOSTNAME, and Ipe is
not run from the shell?
I don't know what your system is like, but on my Ubuntu system there is
no HOSTNAME environment variable.
I guess Ipe could provide the screen geometry to the lua environment,
then you wouldn't have to play such tricks. Or set a dedicated
environment variable (IPEWINDOWSIZE) on the machines where you want the
window to be big?
Otfried
More information about the Ipe-discuss
mailing list