@intuned/runtime-dev 1.1.6-vnc.0 → 1.1.6-vnc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -268,7 +268,7 @@ async function startVncServer() {
268
268
  await fs.writeFile("/tmp/vnc_startup.sh", vncStartupScript, {
269
269
  mode: 0o755
270
270
  });
271
- const vncServerProcess = (0, _child_process.spawn)("vncserver", [":99", "-localhost", "yes", "-rfbauth", "~/.vnc/passwd", "-rfbport", "5900", "-geometry", "1280x720"]);
271
+ const vncServerProcess = (0, _child_process.spawn)("vncserver", [":99", "-localhost", "yes", "-rfbauth", "/root/vnc/passwd", "-rfbport", "5900", "-geometry", "1280x720"]);
272
272
  processes.push(vncServerProcess);
273
273
  while (true) {
274
274
  if (await fs.exists("/tmp/.X11-unix/X99")) {
@@ -278,6 +278,20 @@ async function startVncServer() {
278
278
  }
279
279
  const noVncProcess = (0, _child_process.spawn)("/opt/bin/noVNC/utils/launch.sh", ["--listen", "6080", "--vnc", "localhost:5900"]);
280
280
  processes.push(noVncProcess);
281
+ for (const process of processes) {
282
+ process.stdout?.on("data", data => {
283
+ console.log(`Process ${process.pid} stdout: ${data}`);
284
+ });
285
+ process.stderr?.on("data", data => {
286
+ console.error(`Process ${process.pid} stderr: ${data}`);
287
+ });
288
+ process.on("error", error => {
289
+ console.error(`Process ${process.pid} error: ${error}`);
290
+ });
291
+ process.on("exit", (code, signal) => {
292
+ console.log(`Process ${process.pid} exited with code ${code} and signal ${signal}`);
293
+ });
294
+ }
281
295
  }
282
296
  async function stopVncServer() {
283
297
  for (const process of processes.reverse()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.1.6-vnc.0",
3
+ "version": "1.1.6-vnc.2",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",