wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Wezterm flatpak fails to run using XWayland

Open abdmoh123 opened this issue 1 year ago • 0 comments

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

Linux Wayland

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

I'm using Gnome with Wayland on Fedora Silverblue 42.

WezTerm version

20240203-110809-5046fc22

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

I think this problem is related to the flatpak installation, not Wezterm itself. I can install and run wezterm nightly in a fedora container but that might be because the container sets up xwayland properly.

When I entered the wezterm flatpak environment, running the command resulted in the app failing to find a display when config.enable_wayland is set to false. The DISPLAY env variable was empty instead of a value like :0, which other flatpak apps like Steam seem to have set. I tried manually setting the DISPLAY env variable to :0 but that didn't do anything.

If wayland is enabled, then wezterm launches fine, but then I don't get curved corners, due to wezterm not being a GTK application, but that's a different issue.

To Reproduce

  1. Run Gnome in Wayland (Gnome might not be required)
  2. Install wezterm flatpak from flathub
  3. Make sure in the wezterm config that wezterm.enable_wayland is set to false
  4. Run the application
    • The app won't launch
    • To get the logs, run flatpak run --command=sh --devel org.wezfurlong.wezterm to enter the flatpak environment, and then run the wezterm command

Configuration

local wezterm = require("wezterm")
local config = wezterm.config_builder()

if wezterm.target_triple == "x86_64-unknown-linux-gnu" then
    -- this is the relevant part
    config.enable_wayland = false
end

Expected Behavior

The app should run and display a window. When I ran wezterm in a regular container, there was a GTK title bar, so I expect that would probably show up too.

Logs

Running with wayland disabled:

ls: cannot access '/etc/shells': No such file or directory
16:41:04.558  INFO   logging > lua: 
ls: cannot access '/etc/shells': No such file or directory
16:41:04.565  INFO   logging > lua: 
16:41:04.571  INFO   logging > lua: Using bash as default shell
16:41:04.724  ERROR  wezterm_gui > XOpenDisplay failed to open a display. Check the $DISPLAY env var; terminating

Running with wayland enabled (launches successfully):

ls: cannot access '/etc/shells': No such file or directory
16:52:13.910  INFO   logging > lua: 
ls: cannot access '/etc/shells': No such file or directory
16:52:13.920  INFO   logging > lua: 
16:52:13.926  INFO   logging > lua: Using bash as default shell
ls: cannot access '/etc/shells': No such file or directory
16:52:14.087  INFO   logging > lua: 
ls: cannot access '/etc/shells': No such file or directory
16:52:14.093  INFO   logging > lua: 
16:52:14.099  INFO   logging > lua: Using bash as default shell
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1661:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1662:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1663:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1664:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1665:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1661:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1662:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1663:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1664:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1665:1: unrecognized keysym "dead_hamza" on left-hand side

Anything else?

Here is how the flatpak version looks like when wayland is enabled:

Image

Here is how the nightly rpm version looks like when wayland is enabled:

Image

Here is how the nightly rpm version looks like when wayland is disabled:

Image

Please let me know if you need any more information.

abdmoh123 avatar Oct 18 '25 16:10 abdmoh123