Skip to content

Commit 8253560

Browse files
committed
feat(computer): improve Linux headless display quality
- Increase Xvfb resolution from default 1920x1080 to 2560x1440x24 - Add fluxbox window manager for proper window decorations - Install GTK themes (adwaita, gnome-themes-extra) for native UI styling - Add Noto CJK fonts for proper CJK character rendering - Add dbus-x11 for GTK application support
1 parent 4190529 commit 8253560

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/computer-electron-demo.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
push:
1818
branches:
1919
- main
20-
- feat/computer-electron-demo
2120
paths:
2221
- 'computer/electron-demo/**'
2322
- '.github/workflows/computer-electron-demo.yaml'
@@ -63,7 +62,12 @@ jobs:
6362
libnotify4 \
6463
libsecret-1-0 \
6564
libxss1 \
66-
xdg-utils
65+
xdg-utils \
66+
fluxbox \
67+
adwaita-icon-theme \
68+
gnome-themes-extra \
69+
fonts-noto-cjk \
70+
dbus-x11
6771
6872
- name: Download Obsidian AppImage
6973
working-directory: computer/electron-demo

computer/electron-demo/demo.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,20 @@ function launchApp(
103103
aiActionContext:
104104
'You are interacting with Obsidian, a note-taking desktop application. ' +
105105
'If any dialog or popup appears, dismiss it by clicking the close button or pressing Escape.',
106+
xvfbResolution: '2560x1440x24',
106107
});
107108

109+
// --- Start window manager for proper window decorations on headless Linux ---
110+
if (process.platform === 'linux' && process.env.DISPLAY) {
111+
const fluxbox = spawn('fluxbox', [], {
112+
detached: true,
113+
stdio: 'ignore',
114+
});
115+
fluxbox.unref();
116+
console.log('Fluxbox window manager started');
117+
await sleep(1000);
118+
}
119+
108120
// --- Launch Obsidian AFTER Xvfb is ready (DISPLAY is now set) ---
109121
const child = launchApp(binaryPath, VAULT_DIR);
110122
console.log(`Obsidian launched (pid: ${child.pid})`);

0 commit comments

Comments
 (0)