implement vncspawner; include "sys.m"; sys: Sys; include "draw.m"; Context: import Draw; include "bufio.m"; bufio : Bufio; Iobuf: import bufio; include "cmd.m"; cmds : Cmds; Cmd : import cmds; vncspawner : module { init: fn(nil: ref Context, nil: list of string); }; init(nil: ref Context, nil: list of string) { sys = load Sys Sys->PATH; cmds = load Cmds Cmds->PATH; cmds->init(nil, nil); c := cmds->new_cmd(); c.wctl("exec vncserver :2"); sys->print("response %s", c.in.gets('\n')); }