Checking HOSTNAME in an ipelet

Dmitriy Morozov <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
I know nothing about Lua, so this question is probably stupid, but
that just means someone can answer it easily.

I'm trying to customize window size and autosave_filename depending on
the HOSTNAME set in the environment. I have a my_prefs.lua ipelet that
tries to do something like

if os.getenv("HOSTNAME") == "cole" then
    prefs.window_size = { 2000, 1600 }
    prefs.autosave_filename = "..."
else
    prefs.autosave_filename = "..."
    prefs.window_size = { 1024, 768 }
end

but that gives an error: "attempt to index global 'os' (a nil value)".

How can I access the HOSTNAME variable from an ipelet?

Thanks.
Dmitriy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.