kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.12k stars 971 forks source link

background_image path/to/image doesn't work #6722

Closed idelice closed 12 months ago

idelice commented 12 months ago

Describe the bug I'm trying to set a background image to my terminal given the path to home/downloads/image.png, but nothing happens

To Reproduce Steps to reproduce the behavior:

  1. background_image ~/Downloads/bg2.png
  2. quit and reopen terminal
  3. nothing happens!!

Environment details

kitty 0.30.0 (ef8e3b150c) created by Kovid Goyal
Darwin ibrahims-MBP.lan 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6020 arm64
ProductName:        macOS ProductVersion:       13.6 BuildVersion:      22G120
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /bin/zsh
Loaded config files:
  /Users/ibrahimdelice/.config/kitty/kitty.conf

Config options different from defaults:
background_blur         50
background_image        /Users/ibrahimdelice/Downloads/bg2.png
background_opacity      0.6
editor                  /opt/homebrew/bin/nvim
font_size               13.0
hide_window_decorations 2
modify_font:
    cell_height 140%
tab_bar_edge            1
tab_bar_style           powerline

Important environment variables seen by the kitty process:
    PATH                                /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin
    LANG                                en_US.UTF-8
    SHELL                               /bin/zsh
    USER                                ibrahimdelice
kovidgoyal commented 12 months ago

Works fine for me. You probably clicked dont allow when macOS asked you if kitty should be allowed to access files in the Downloads folder. Grant it the permission or dont use one of Apple's security theatre folders.

idelice commented 12 months ago
Screenshot 2023-10-16 at 16 05 04
idelice commented 12 months ago

@kovidgoyal as you can see, i have provided Kitty permission

kovidgoyal commented 12 months ago

Then run kitty from another terminal and see what error gets printed to its stderr to find out why your image is not working.

idelice commented 11 months ago

I don't understand. Isn't kitty a terminal itself? How would I run kitty from another terminal?

EDIT: @kovidgoyal

[289 23:44:56.689607] Failed to decode PNG image at: /Users/ibrahimdelice/Downloads/bg2.png
[289 23:44:58.375869] WARNING: Your system's OpenGL implementation does not have glCopyImageSubData, falling back to a slower implementation
kovidgoyal commented 11 months ago

Open kitty, type kitty, press enter

idelice commented 11 months ago

Fixed by converting the image to something else than back to png. Weird that the image was the cause here.