From d9a83d8fd98177a4f26c4fe1c559e7c936427f83 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 2 May 2026 15:51:55 -0700 Subject: [PATCH] Add missing electronjs file + small fixes --- .gitignore | 1 + desktop/main.js | 6 ++++++ desktop/package.json | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 desktop/package.json diff --git a/.gitignore b/.gitignore index bd69c941..b869ffe4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ venv cert.pem key.pem package.json +!desktop/package.json package-lock.json Thumbs.db wandb diff --git a/desktop/main.js b/desktop/main.js index b3427c70..aea14ba9 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -20,6 +20,12 @@ const userArgs = dashIdx >= 0 ? argv.slice(dashIdx + 1) : argv; app.setName(TITLE); +// chrome-sandbox needs SUID root, which the unzipped portable build can't ship. +// Safe to disable here — we only load our own localhost server, no untrusted content. +if (process.platform === "linux") { + app.commandLine.appendSwitch("no-sandbox"); +} + let serverProcess = null; let mainWindow = null; let portCheckInterval = null; diff --git a/desktop/package.json b/desktop/package.json new file mode 100644 index 00000000..2d1770e1 --- /dev/null +++ b/desktop/package.json @@ -0,0 +1,4 @@ +{ + "name": "textgen", + "main": "main.js" +}