Fix terminal rendering and sandbox errors on Linux

- Pass --no-sandbox to Electron dev script to work around Linux namespace restrictions
- Switch restty renderer from hardcoded 'webgpu' to 'auto' for WebGL2 fallback
- Add Linux font fallbacks (DejaVu Sans Mono, Liberation Mono, Ubuntu Mono, monospace)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matheus Nogueira
2026-03-19 16:38:14 -03:00
co-authored by Claude Opus 4.6
parent 34e3ba1d26
commit b077a2663f
3 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"dev": "electron-vite dev -- --no-sandbox",
"build": "npm run typecheck && electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
+6 -1
View File
@@ -245,6 +245,11 @@ function buildTerminalFontSources(fontFamily: string) {
type: 'local' as const,
label: 'Menlo',
matchers: ['menlo', 'menlo regular']
},
{
type: 'local' as const,
label: 'Monospace fallback',
matchers: ['dejavu sans mono', 'liberation mono', 'ubuntu mono', 'monospace']
}
]
}
@@ -615,7 +620,7 @@ export default function TerminalPane({
restty.closePane(id)
}
return {
renderer: 'webgpu',
renderer: 'auto',
fontSize: currentSettings?.terminalFontSize ?? 14,
fontSizeMode: 'em',
alphaBlending: 'native',
+15 -1
View File
@@ -70,7 +70,21 @@ export function buildTerminalFontMatchers(fontFamily: string): string[] {
const trimmed = fontFamily.trim()
const normalized = trimmed.toLowerCase()
const matchers = trimmed ? [trimmed, normalized] : []
return Array.from(new Set([...matchers, 'sf mono', 'sfmono-regular', 'menlo', 'menlo regular']))
return Array.from(
new Set([
...matchers,
// macOS
'sf mono',
'sfmono-regular',
'menlo',
'menlo regular',
// Linux
'dejavu sans mono',
'liberation mono',
'ubuntu mono',
'monospace'
])
)
}
export function clampNumber(value: number, min: number, max: number): number {