wez / wezterm

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

background is not set with the flatpak version #3162

Closed huyhoang160593 closed 1 year ago

huyhoang160593 commented 1 year ago

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

Linux Wayland

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

Fedora GNOME 43

WezTerm version

wezterm 20221119-145034-49b9839f

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 have try to set the _window_backgroundimage but the image is not showing in the terminal. I have check the path and they are good, but the image still not load :(. The terminal can still print the image if I use imagecat with it image

To Reproduce

No response

Configuration

local wezterm = require 'wezterm'

return {
  font = wezterm.font 'JetBrainsMono Nerd Font',
  window_background_image = '/home/the99spuppycat/Picture/Wallpapers/wallpaper_01.png',
  window_background_image_hsb = {
    -- Darken the background image by reducing it to 1/3rd
    brightness = 0.3,

    -- You can adjust the hue by scaling its value.
    -- a multiplier of 1.0 leaves the value unchanged.
    hue = 1.0,

    -- You can adjust the saturation also.
    saturation = 1.0,
  },
  font_size = 14.0,
  default_cursor_style = 'BlinkingUnderline',
  enable_scroll_bar = true,
  color_scheme = "Catppuccin Mocha",
}

Expected Behavior

I can see my background image in the wezterm terminal

Logs

Debug Overlay
wezterm version: 20221119-145034-49b9839f
OpenGL version: Mesa Intel(R) Xe Graphics (TGL GT2) 4.6 (Compatibility Profile) Mesa 21.3.9 (git-78c96ae5b6)
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
23:03:19.877 ERROR wezterm_gui::termwindow::background > Failed to load background: getting metadata for /home/the99spuppycat/Picture/Wallpapers/wallpaper_01.png: No such file or directory (os error 2)

Anything else?

No response

wez commented 1 year ago

Your config says /home/the99spuppycat/Picture/Wallpapers/wallpaper_01.png but your screenshot with the working imgcat is /home/the99spuppycat/Pictures/Wallpapers/wallpaper_01.png

huyhoang160593 commented 1 year ago

I have change to use the feroda version instead of flatpak, but with the same result as you can see here @wez. image

I have also change it to png because the docs say so, now the image not even load anymore image The Debug overlay now say this instead:

Debug Overlay
wezterm version: 20230326-111934-3666303c x86_64-unknown-linux-gnu
Window Environment: Wayland
OpenGL version: Mesa Intel(R) Xe Graphics (TGL GT2) 4.6 (Compatibility Profile) Mesa 22.3.7
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
13:54:23.470 ERROR wezterm_gui::glyphcache > Error decoding image: inconsistent 600x600 -> 1080000
13:54:23.485 WARN wezterm_gui::glyphcache > decoder thread terminated
wez commented 1 year ago

wezterm doesn't resolve paths using ~; that's a function of your shell. You need to specify the correct path for wezterm to load it. You can use https://wezfurlong.org/wezterm/config/lua/wezterm/home_dir.html to reference your home directory.

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.