Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/appl/cmd/vncspawner.b

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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'));
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.