tamga-vdesktop 1.1.4 → 1.1.6
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.
- package/dist/cli.js +44 -14
- package/dist/helpers/x11_bridge.py +1 -1
- package/dist/helpers/x11_streamer.py +3 -3
- package/dist/server.js +44 -14
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -381,17 +381,25 @@ var LinuxAppManager = class {
|
|
|
381
381
|
if (path2.isAbsolute(iconName) && fs2.existsSync(iconName)) return iconName;
|
|
382
382
|
const safe = path2.basename(iconName).replace(/[^a-z0-9._-]/gi, "");
|
|
383
383
|
if (!safe) return null;
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
384
|
+
const aliasMap = {
|
|
385
|
+
chrome: ["google-chrome", "chromium", "chromium-browser"],
|
|
386
|
+
mousepad: ["org.xfce.mousepad", "mousepad"],
|
|
387
|
+
vscode: ["com.visualstudio.code", "vscode", "visual-studio-code"]
|
|
388
|
+
};
|
|
389
|
+
const candidates = Array.from(/* @__PURE__ */ new Set([safe, ...aliasMap[safe] || []]));
|
|
390
|
+
for (const name of candidates) {
|
|
391
|
+
const searchPaths = [
|
|
392
|
+
`/usr/share/icons/hicolor/128x128/apps/${name}.png`,
|
|
393
|
+
`/usr/share/icons/hicolor/64x64/apps/${name}.png`,
|
|
394
|
+
`/usr/share/icons/hicolor/48x48/apps/${name}.png`,
|
|
395
|
+
`/usr/share/icons/hicolor/scalable/apps/${name}.svg`,
|
|
396
|
+
`/usr/share/pixmaps/${name}.png`,
|
|
397
|
+
`/usr/share/pixmaps/${name}.svg`,
|
|
398
|
+
`/usr/share/pixmaps/${name}.xpm`
|
|
399
|
+
];
|
|
400
|
+
for (const p of searchPaths) {
|
|
401
|
+
if (fs2.existsSync(p)) return p;
|
|
402
|
+
}
|
|
395
403
|
}
|
|
396
404
|
return null;
|
|
397
405
|
}
|
|
@@ -2656,6 +2664,14 @@ var LinuxAppSession = class {
|
|
|
2656
2664
|
let finalCmd = this.command;
|
|
2657
2665
|
const baseBin = path6.basename(finalCmd.split(/\s+/)[0] || "");
|
|
2658
2666
|
if (baseBin === "firefox" || baseBin === "firefox-esr") {
|
|
2667
|
+
if (!extraNewWindow) {
|
|
2668
|
+
for (const stale of [".startup-incomplete", ".parentlock", "lock"]) {
|
|
2669
|
+
try {
|
|
2670
|
+
fs6.rmSync(path6.join(profileDir, stale), { force: true });
|
|
2671
|
+
} catch {
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2659
2675
|
const userJsPath = path6.join(profileDir, "user.js");
|
|
2660
2676
|
fs6.writeFileSync(
|
|
2661
2677
|
userJsPath,
|
|
@@ -2667,6 +2683,8 @@ var LinuxAppSession = class {
|
|
|
2667
2683
|
'user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);',
|
|
2668
2684
|
'user_pref("datareporting.policy.dataSubmissionEnabled", false);',
|
|
2669
2685
|
'user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);',
|
|
2686
|
+
'user_pref("toolkit.startup.max_resumed_crashes", -1);',
|
|
2687
|
+
'user_pref("browser.sessionstore.resume_from_crash", false);',
|
|
2670
2688
|
'user_pref("browser.startup.homepage", "https://www.google.com");',
|
|
2671
2689
|
'user_pref("browser.tabs.inTitlebar", 0);',
|
|
2672
2690
|
'user_pref("general.smoothScroll", false);',
|
|
@@ -2687,6 +2705,14 @@ var LinuxAppSession = class {
|
|
|
2687
2705
|
);
|
|
2688
2706
|
finalCmd = extraNewWindow ? `${finalCmd} -profile "${profileDir}" --new-window about:home` : `${finalCmd} -profile "${profileDir}" --width=${this.width} --height=${this.height}`;
|
|
2689
2707
|
} else if (this.needsNoSandbox || ["code", "antigravity", "chromium", "chromium-browser", "google-chrome", "google-chrome-stable"].includes(baseBin)) {
|
|
2708
|
+
if (!extraNewWindow) {
|
|
2709
|
+
for (const stale of ["SingletonLock", "SingletonCookie", "SingletonSocket"]) {
|
|
2710
|
+
try {
|
|
2711
|
+
fs6.rmSync(path6.join(profileDir, stale), { force: true });
|
|
2712
|
+
} catch {
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2690
2716
|
const extraFlags = [];
|
|
2691
2717
|
if (isRoot && !finalCmd.includes("--no-sandbox")) {
|
|
2692
2718
|
extraFlags.push("--no-sandbox");
|
|
@@ -2789,10 +2815,14 @@ var LinuxAppSession = class {
|
|
|
2789
2815
|
],
|
|
2790
2816
|
{
|
|
2791
2817
|
env: this.baseEnv,
|
|
2792
|
-
stdio: ["pipe", "pipe", "
|
|
2818
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
2793
2819
|
}
|
|
2794
2820
|
);
|
|
2795
2821
|
view.streamerProc = proc;
|
|
2822
|
+
proc.stderr?.on("data", (err) => {
|
|
2823
|
+
const msg = err.toString("utf-8").trim();
|
|
2824
|
+
if (msg) console.error(`[x11_streamer ${this.displayStr}/${view.viewId}]`, msg);
|
|
2825
|
+
});
|
|
2796
2826
|
let acc = Buffer.alloc(0);
|
|
2797
2827
|
proc.stdout?.on("data", (chunk) => {
|
|
2798
2828
|
if (this.closed || !this.views.has(view.viewId)) return;
|
|
@@ -3015,7 +3045,7 @@ var LinuxAppSession = class {
|
|
|
3015
3045
|
fs6.rmSync(this.tempDir, { recursive: true, force: true });
|
|
3016
3046
|
} catch {
|
|
3017
3047
|
}
|
|
3018
|
-
},
|
|
3048
|
+
}, 1200);
|
|
3019
3049
|
if (this.pulseSinkName) {
|
|
3020
3050
|
try {
|
|
3021
3051
|
execSync2(
|
|
@@ -3389,7 +3419,7 @@ var VSCodeServerManager = class {
|
|
|
3389
3419
|
};
|
|
3390
3420
|
|
|
3391
3421
|
// server/index.ts
|
|
3392
|
-
var TAMGA_VERSION = "1.1.
|
|
3422
|
+
var TAMGA_VERSION = "1.1.6";
|
|
3393
3423
|
var MIME_MAP = {
|
|
3394
3424
|
html: "text/html; charset=utf-8",
|
|
3395
3425
|
htm: "text/html; charset=utf-8",
|
|
@@ -149,7 +149,7 @@ def main() -> None:
|
|
|
149
149
|
off_y = max(0, int(sys.argv[7]) if len(sys.argv) > 7 else 0)
|
|
150
150
|
|
|
151
151
|
dpy = None
|
|
152
|
-
for _ in range(
|
|
152
|
+
for _ in range(80):
|
|
153
153
|
dpy = libX11.XOpenDisplay(display_str.encode("utf-8"))
|
|
154
154
|
if dpy:
|
|
155
155
|
break
|
|
@@ -258,8 +258,8 @@ def main() -> None:
|
|
|
258
258
|
try:
|
|
259
259
|
cmd = json.loads(s.decode("utf-8"))
|
|
260
260
|
if cmd.get("type") == "resize":
|
|
261
|
-
width = max(
|
|
262
|
-
height = max(
|
|
261
|
+
width = max(240, min(1920, int(cmd.get("width", width))))
|
|
262
|
+
height = max(180, min(1080, int(cmd.get("height", height))))
|
|
263
263
|
dirty = True
|
|
264
264
|
elif cmd.get("type") == "refresh":
|
|
265
265
|
dirty = True
|
package/dist/server.js
CHANGED
|
@@ -2175,17 +2175,25 @@ var LinuxAppManager = class {
|
|
|
2175
2175
|
if (path5.isAbsolute(iconName) && fs5.existsSync(iconName)) return iconName;
|
|
2176
2176
|
const safe = path5.basename(iconName).replace(/[^a-z0-9._-]/gi, "");
|
|
2177
2177
|
if (!safe) return null;
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2178
|
+
const aliasMap = {
|
|
2179
|
+
chrome: ["google-chrome", "chromium", "chromium-browser"],
|
|
2180
|
+
mousepad: ["org.xfce.mousepad", "mousepad"],
|
|
2181
|
+
vscode: ["com.visualstudio.code", "vscode", "visual-studio-code"]
|
|
2182
|
+
};
|
|
2183
|
+
const candidates = Array.from(/* @__PURE__ */ new Set([safe, ...aliasMap[safe] || []]));
|
|
2184
|
+
for (const name of candidates) {
|
|
2185
|
+
const searchPaths = [
|
|
2186
|
+
`/usr/share/icons/hicolor/128x128/apps/${name}.png`,
|
|
2187
|
+
`/usr/share/icons/hicolor/64x64/apps/${name}.png`,
|
|
2188
|
+
`/usr/share/icons/hicolor/48x48/apps/${name}.png`,
|
|
2189
|
+
`/usr/share/icons/hicolor/scalable/apps/${name}.svg`,
|
|
2190
|
+
`/usr/share/pixmaps/${name}.png`,
|
|
2191
|
+
`/usr/share/pixmaps/${name}.svg`,
|
|
2192
|
+
`/usr/share/pixmaps/${name}.xpm`
|
|
2193
|
+
];
|
|
2194
|
+
for (const p of searchPaths) {
|
|
2195
|
+
if (fs5.existsSync(p)) return p;
|
|
2196
|
+
}
|
|
2189
2197
|
}
|
|
2190
2198
|
return null;
|
|
2191
2199
|
}
|
|
@@ -2647,6 +2655,14 @@ var LinuxAppSession = class {
|
|
|
2647
2655
|
let finalCmd = this.command;
|
|
2648
2656
|
const baseBin = path6.basename(finalCmd.split(/\s+/)[0] || "");
|
|
2649
2657
|
if (baseBin === "firefox" || baseBin === "firefox-esr") {
|
|
2658
|
+
if (!extraNewWindow) {
|
|
2659
|
+
for (const stale of [".startup-incomplete", ".parentlock", "lock"]) {
|
|
2660
|
+
try {
|
|
2661
|
+
fs6.rmSync(path6.join(profileDir, stale), { force: true });
|
|
2662
|
+
} catch {
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2650
2666
|
const userJsPath = path6.join(profileDir, "user.js");
|
|
2651
2667
|
fs6.writeFileSync(
|
|
2652
2668
|
userJsPath,
|
|
@@ -2658,6 +2674,8 @@ var LinuxAppSession = class {
|
|
|
2658
2674
|
'user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);',
|
|
2659
2675
|
'user_pref("datareporting.policy.dataSubmissionEnabled", false);',
|
|
2660
2676
|
'user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);',
|
|
2677
|
+
'user_pref("toolkit.startup.max_resumed_crashes", -1);',
|
|
2678
|
+
'user_pref("browser.sessionstore.resume_from_crash", false);',
|
|
2661
2679
|
'user_pref("browser.startup.homepage", "https://www.google.com");',
|
|
2662
2680
|
'user_pref("browser.tabs.inTitlebar", 0);',
|
|
2663
2681
|
'user_pref("general.smoothScroll", false);',
|
|
@@ -2678,6 +2696,14 @@ var LinuxAppSession = class {
|
|
|
2678
2696
|
);
|
|
2679
2697
|
finalCmd = extraNewWindow ? `${finalCmd} -profile "${profileDir}" --new-window about:home` : `${finalCmd} -profile "${profileDir}" --width=${this.width} --height=${this.height}`;
|
|
2680
2698
|
} else if (this.needsNoSandbox || ["code", "antigravity", "chromium", "chromium-browser", "google-chrome", "google-chrome-stable"].includes(baseBin)) {
|
|
2699
|
+
if (!extraNewWindow) {
|
|
2700
|
+
for (const stale of ["SingletonLock", "SingletonCookie", "SingletonSocket"]) {
|
|
2701
|
+
try {
|
|
2702
|
+
fs6.rmSync(path6.join(profileDir, stale), { force: true });
|
|
2703
|
+
} catch {
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2681
2707
|
const extraFlags = [];
|
|
2682
2708
|
if (isRoot && !finalCmd.includes("--no-sandbox")) {
|
|
2683
2709
|
extraFlags.push("--no-sandbox");
|
|
@@ -2780,10 +2806,14 @@ var LinuxAppSession = class {
|
|
|
2780
2806
|
],
|
|
2781
2807
|
{
|
|
2782
2808
|
env: this.baseEnv,
|
|
2783
|
-
stdio: ["pipe", "pipe", "
|
|
2809
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
2784
2810
|
}
|
|
2785
2811
|
);
|
|
2786
2812
|
view.streamerProc = proc;
|
|
2813
|
+
proc.stderr?.on("data", (err) => {
|
|
2814
|
+
const msg = err.toString("utf-8").trim();
|
|
2815
|
+
if (msg) console.error(`[x11_streamer ${this.displayStr}/${view.viewId}]`, msg);
|
|
2816
|
+
});
|
|
2787
2817
|
let acc = Buffer.alloc(0);
|
|
2788
2818
|
proc.stdout?.on("data", (chunk) => {
|
|
2789
2819
|
if (this.closed || !this.views.has(view.viewId)) return;
|
|
@@ -3006,7 +3036,7 @@ var LinuxAppSession = class {
|
|
|
3006
3036
|
fs6.rmSync(this.tempDir, { recursive: true, force: true });
|
|
3007
3037
|
} catch {
|
|
3008
3038
|
}
|
|
3009
|
-
},
|
|
3039
|
+
}, 1200);
|
|
3010
3040
|
if (this.pulseSinkName) {
|
|
3011
3041
|
try {
|
|
3012
3042
|
execSync2(
|
|
@@ -3380,7 +3410,7 @@ var VSCodeServerManager = class {
|
|
|
3380
3410
|
};
|
|
3381
3411
|
|
|
3382
3412
|
// server/index.ts
|
|
3383
|
-
var TAMGA_VERSION = "1.1.
|
|
3413
|
+
var TAMGA_VERSION = "1.1.6";
|
|
3384
3414
|
var MIME_MAP = {
|
|
3385
3415
|
html: "text/html; charset=utf-8",
|
|
3386
3416
|
htm: "text/html; charset=utf-8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamga-vdesktop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "TamgaVDesktop — Self-hostable Linux Virtual Desktop OS platform with native web shell, real Linux terminal, and seamless native Linux GUI apps (Firefox, VS Code, Antigravity).",
|