Skip to content

Previewing SVG through Magick opens an undesired pop-up window #2575

@pierreay

Description

@pierreay

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

Alacritty

yazi --debug output

Yazi
    Version: 25.4.4 (fd007ab 2025-04-05)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.86.0 (05f9846f 2025-03-31)

Ya
    Version: 25.3.2 (Arch Linux 2025-03-05)

Emulator
    TERM                : Some("tmux-256color")
    TERM_PROGRAM        : Some("tmux")
    TERM_PROGRAM_VERSION: Some("3.5a")
    Brand.from_env      : None
    Emulator.detect     : Emulator { kind: Right(Unknown { kgp: false, sixel: false }), light: false, cell_size: Some((8, 16)) }

Adapter
    Adapter.matches    : X11
    Dimension.available: WindowSize { rows: 63, columns: 119, width: 0, height: 0 }

Desktop
    XDG_SESSION_TYPE           : Some("tty")
    WAYLAND_DISPLAY            : None
    DISPLAY                    : Some(":0")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL           : Some("/usr/sbin/zsh")
    EDITOR          : Some("nvim")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(OpenerRule { run: "nvim \"$@\"", block: true, orphan: false, desc: "Edit (nvim)", for_: None, spread: true })
    block-create: Some(OpenerRule { run: "nvim \"$@\"", block: true, orphan: false, desc: "Edit (nvim)", for_: None, spread: true })
    block-rename: Some(OpenerRule { run: "nvim \"$@\"", block: true, orphan: false, desc: "Edit (nvim)", for_: None, spread: true })

Multiplexers
    TMUX               : true
    tmux version       : tmux 3.5a
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.46
    ueberzugpp    : 2.9.6
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : 25.03.0
    magick        : No such file or directory (os error 2)
    fzf           : 0.60.3
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : 1.14.5
    zoxide        : 0.9.7
    7zz/7z        : No such file or directory (os error 2) / No such file or directory (os error 2)
    jq            : 1.7.1

Clipboard
    wl-copy/paste: No such file or directory (os error 2) / No such file or directory (os error 2)
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Routine
    `file -bL --mime-type`: text/plain


See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.

Describe the bug

First, I'm wondering if I'm the only affected or not. When scrolling through SVGs file with the previewer (that is using ImageMagick under the hood), a very fast pop-up is opening and closing, interrupting the workflow of the user.

I think the bad behavior is from upstream, but which upstream? I did the same observation on some batch exporter scripts I've made (unrelated to Yazi) that are using Inkscape under the hood: even for an operation that is not using any GUI, since a recent update (of GTK ?), this popup is appearing at each Inkscape invocation.

Anyway, my workaround in my exporter script was to unset DISPLAY before calling the inkscape binary, and maybe Yazi could do the same for magick if I'm not the only concerned? I confirm that this fix the issue on my system. Theoretically, a file conversion program should not need access to the X server anyway.

Minimal reproducer

Some information on my ArchLinux system:

ImageMagick 7.1.1-47
gtk4 4.18.3-1

A test flie:
Image

Beware that after the first preview, the PNG converted file for the preview will be cached un /tmp, and the magick process will not be fire up anymore if this file is existing.

Anything else?

No response

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions