aws / aws/aws-lambda-base-images
Xvfb fails with "XKB: Failed to compile keymap" in Lambda container images Environment
- Dominant language
- No language data
- Stars
- 777
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
- Lambda container image based on public.ecr.aws/lambda/nodejs:20
- Amazon Linux 2023
- Xvfb from xorg-x11-server-Xvfb
Issue: Running Xvfb directly in Lambda fails with:
```
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
Fatal server error: Failed to activate virtual core keyboard: 2
```
Root Cause: Lambda's read-only filesystem prevents xkbcomp from writing compiled keymaps to /var/lib/xkb. Even with xkeyboard-config and xkbcomp installed, Xvfb cannot initialize because XKB compilation fails. Workaround: Using xvfb-run wrapper instead of direct Xvfb invocation works, as it handles XKB setup internally. Request: Please provide either:
1. A Lambda layer with pre-configured Xvfb/XKB support
2. Documentation for headless GL rendering in Lambda containers
3. Allow /var/lib/xkb to be writable or support XKB_OUTPUT_DIR environment variable
Contributor guide
Assessment
This issue has not been assessed yet.