wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
18.17k stars 813 forks source link

Running in an Alpine container fails with Failed to create window: failed to get font metrics!?: FcResultNoMatch #4033

Closed voltagex closed 1 year ago

voltagex commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

X11 / OpenBox / VNC

WezTerm version

wezterm 20230712-072601-f4abf8fd

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

On starting wezterm I get ERROR wezterm_gui::frontend > Failed to create window: failed to get font metrics!?: FcResultNoMatch

I've only tried the version in your first build instructions, will try the nightly later.

I am trying to run WezTerm in a Docker image from https://github.com/jlesage/docker-baseimage-gui Yes I know this is an odd setup. I suspect I'm missing fonts or some other dependency but I thought the error message was obscure enough to report.

This image is based on Alpine 3.18 and I have installed the following dependencies: libgcc libxkbcommon xcb-util-image xcb-util libxcb libxkbcommon-x11 libx11 fontconfig wayland-libs-egl wayland-libs-client

To Reproduce

FROM alpine:3.18 as builder
RUN apk update && apk add curl

RUN curl -LO https://github.com/wez/wezterm/releases/download/20230712-072601-f4abf8fd/wezterm-20230712-072601-f4abf8fd-src.tar.gz
RUN tar -xzf wezterm-20230712-072601-f4abf8fd-src.tar.gz
RUN cd wezterm-20230712-072601-f4abf8fd && ./get-deps && cargo build --release

FROM jlesage/baseimage-gui:alpine-3.18-v4

RUN add-pkg libgcc libxkbcommon xcb-util-image xcb-util libxcb libxkbcommon-x11 libx11 fontconfig wayland-libs-egl wayland-libs-client

# Copy the start script.
COPY startapp.sh /startapp.sh

ENV HOME=/config
COPY --from=builder /wezterm-20230712-072601-f4abf8fd/target/release/wezterm /usr/bin/wezterm
COPY --from=builder /wezterm-20230712-072601-f4abf8fd/target/release/wezterm-gui /usr/bin/wezterm-gui

startapp.sh is just exec /usr/bin/wezterm

Configuration

no config

Expected Behavior

wezterm runs... slowly.

Logs

N/A

Anything else?

N/A

wez commented 1 year ago

Sounds like a font problem in that environment. See: https://wezfurlong.org/wezterm/troubleshooting.html#debugging-font-display

github-actions[bot] commented 1 year ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.