Closed woshichuanqilz closed 3 days ago
Please fill out the bug report template correctly (bug description, steps to reproduce, etc.), otherwise I'm not sure what action to take.
Please fill out the bug report template correctly (bug description, steps to reproduce, etc.), otherwise I'm not sure what action to take.
I post everything I know may related to this issue.
The reproduce I can write here again
I don't know what else do you need ?
Ah the reproducer has folded into the "yazi --debug output".
Next time you submit a bug report, don't add these to the <details>
tag. Reopen it.
What happens when you run file -bL mime-type /path/to/your-image-file
and xdg-open /path/to/your-image-file
? Is this issue still with the default Yazi config?
file -bL mime-type /path/to/your-image-file
> file -bL mime-type ~/wallpaper/ori/0001.jpg ─╯
cannot open `mime-type' (No such file or directory)
JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, progressive, precision 8, 4592x3448, components 3
xdg-open /path/to/your-image-file
works fine.
change to default config
I delete the ~/.config/yazi
folder then start yazi, still has the issue.
Please upload the failed file
I also don't have a preview for any file.
https://0x0.st/XAFK.log - log
@zaeboba Please create a new bug report and fill out the template. I need to know your specific environment information and the steps to reproduce the issue.
Please upload the failed file
what failed file? The log file with default config to press enter on the image contains nothing.
what failed file?
The image file failed to open
what failed file?
The image file failed to open
The images seems ok. It can be opened in dolphin
Weird, I can't reproduce it with your image on my Linux VM
https://github.com/sxyazi/yazi/assets/17523360/63ad092f-1e3a-41a3-96c6-ba1775ab6b88
This is my Yazi version:
Yazi 0.2.5 (9a5b756 2024-06-25)
The mime-type of this image on my side (file-5.45
):
file -bL --mime-type 342757779-af05c837-ebb4-4948-a0c9-04843766237d.jpg
image/jpeg
And I'm using the default config of Yazi
Weird, I can't reproduce it with your image on my Linux VM
screenshot-000832.mp4 This is my Yazi version:
Yazi 0.2.5 (9a5b756 2024-06-25)
The mime-type of this image on my side (
file-5.45
):file -bL --mime-type 342757779-af05c837-ebb4-4948-a0c9-04843766237d.jpg image/jpeg
And I'm using the default config of Yazi
I want to add some code in the yazi, compile it with source code and check the log. Seems there is no log file currently about what happened when I press enter on image file .
Can you tell me which part of the code should I read? I don't know where to add the log code
You can try:
O
on the image and see what the first opener is.You can try:
- Press
O
on the image and see what the first opener is.- Copy the command of that opener, run it in the terminal, and see what happens.
This? Cant see the opener. I use qimgv
as the default program to open images. It works from command line
Curious as to what would happen with a custom opener
that explicitly uses qimgv
:
[opener]
open-image = [{ run = 'qimgv "$@"', orphan = true, desc = "qimgv" }]
[open]
rules = [
{ mime = "image/*", use = [
"open-image",
"reveal",
] },
]
Then use O
and select qimgv
in the pop-up menu
Curious as to what would happen with a custom
opener
that explicitly usesqimgv
:[opener] open-image = [{ run = 'qimgv "$@"', orphan = true, desc = "qimgv" }] [open] rules = [ { mime = "image/*", use = [ "open-image", "reveal", ] }, ]
Then use
O
and selectqimgv
in the pop-up menu
Oh it worked with your config. Why is that ? I can press enter on the image and the image will be open
Oh it worked with your config. Why is that ? I can press enter on the image and the image will be open
Good question. I don't know why
% xdg-open /path/to/file
works for you but the same command doesn't when run from yazi
.
Can your reproduce the issue with other TUI file managers such as joshuto or lf? If not, I don't think the issue is with yazi
.
Is there any other file type that open fine with Dolphin but won't open from yazi
or does it only happen with images?
What is the content of ~/.config/mimeapps.list
(if it exists)?
Oh it worked with your config. Why is that ? I can press enter on the image and the image will be open
Good question. I don't know why
% xdg-open /path/to/file
works for you but the same command doesn't when run from
yazi
.Can your reproduce the issue with other TUI file managers such as joshuto or lf? If not, I don't think the issue is with
yazi
.Is there any other file type that open fine with Dolphin but won't open from
yazi
or does it only happen with images?What is the content of
~/.config/mimeapps.list
(if it exists)?
I use TUI manager ranger
it works fine.
Is there any other file type that open fine with Dolphin but won't open from yazi or does it only happen with images? Havent found yet.
~/.config/mimeapps.list
[Added Associations]
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
text/html=google-chrome.desktop;firefox.desktop;
x-scheme-handler/baiduyunguanjia=baidunetdisk.desktop;
x-scheme-handler/chrome=firefox.desktop;
x-scheme-handler/clash=clash_win.desktop;
x-scheme-handler/http=google-chrome.desktop;firefox.desktop;
x-scheme-handler/https=google-chrome.desktop;firefox.desktop;
x-scheme-handler/jetbrains=jetbrains-toolbox.desktop;
x-scheme-handler/x-github-client=github-desktop.desktop;GitHub Desktop.desktop;
x-scheme-handler/x-github-desktop-auth=github-desktop.desktop;GitHub Desktop.desktop;
x-scheme-handler/mailto=google-chrome.desktop
text.html=google-chrome.desktop
image/png=qimgv.desktop
image/jpeg=qimgv.desktop
[Default Applications] application/x-extension-htm=firefox.desktop application/x-extension-html=firefox.desktop application/x-extension-shtml=firefox.desktop application/x-extension-xht=firefox.desktop application/x-extension-xhtml=firefox.desktop application/xhtml+xml=firefox.desktop text/html=google-chrome.desktop x-scheme-handler/baiduyunguanjia=baidunetdisk.desktop x-scheme-handler/chrome=firefox.desktop x-scheme-handler/clash=clash_win.desktop x-scheme-handler/http=google-chrome.desktop; x-scheme-handler/https=google-chrome.desktop; x-scheme-handler/jetbrains=jetbrains-toolbox.desktop x-scheme-handler/x-github-client=github-desktop.desktop x-scheme-handler/x-github-desktop-auth=github-desktop.desktop x-scheme-handler/mailto=google-chrome.desktop text.html=google-chrome.desktop image/png=qimgv.desktop image/jpeg=qimgv.desktop
If you use the config from @xfzv but just change qimgv
to xdg-open
what will happen? And what will happen if you run xdg-open
on the image using the built-in shell by clicking ;
or :
?
If you use the config from @xfzv but just change
qimgv
toxdg-open
what will happen?
works.
And what will happen if you run
xdg-open
on the image using the built-in shell by clicking;
or:
?
works too.
And if I remove the @xfzv 's config. Not work again
Version: 0.2.5 (Arch Linux 2024-04-27)
Are you sure you're using the latest code?
Version: 0.2.5 (Arch Linux 2024-04-27)
Are you sure you're using the latest code?
Add some log code for this issue may find the reason
Why is your build date 2024-04-27?
Why is your build date 2024-04-27?
I download from aur. I just download the yazi from the release build date 4-23. Same issue
What does yazi -V output?
What does yazi -V output?
What is the differences with --version ?
╰─❯ yazi --version ─╯
Yazi 0.2.5 (c65a14c 2024-04-23)
╭─ ~/Applications ─╮
╰─❯ yazi -V ─╯
Yazi 0.2.5 (c65a14c 2024-04-23)
@woshichuanqilz -V
and --version
is the same (short/long):
% yazi --help
-V, --version Print version
What if you replace
open = [
{ run = 'xdg-open "$@"', desc = "Open", for = "linux" },
with
open = [
{ run = 'xdg-open "$@"', orphan = true, desc = "Open" },
?
What does yazi -V output?
What is the differences with --version ?
╰─❯ yazi --version ─╯ Yazi 0.2.5 (c65a14c 2024-04-23) ╭─ ~/Applications ─╮ ╰─❯ yazi -V ─╯ Yazi 0.2.5 (c65a14c 2024-04-23)
No, this is not the latest code, please verify if this problem exists in the latest code
What does yazi -V output?
What is the differences with --version ?
╰─❯ yazi --version ─╯ Yazi 0.2.5 (c65a14c 2024-04-23) ╭─ ~/Applications ─╮ ╰─❯ yazi -V ─╯ Yazi 0.2.5 (c65a14c 2024-04-23)
No, this is not the latest code, please verify if this problem exists in the latest code
use the latest version with command cargo install --locked --git https://github.com/sxyazi/yazi.git yazi-fm yazi-cli
. Same issue
yazi -V ─╯ Yazi 0.2.5 (c64530b 2024-06-26)
@woshichuanqilz
-V
and--version
is the same (short/long):% yazi --help -V, --version Print version
What if you replace
open = [ { run = 'xdg-open "$@"', desc = "Open", for = "linux" },
with
open = [ { run = 'xdg-open "$@"', orphan = true, desc = "Open" },
?
Still work
In that case, I think we can simply add orphan = true
to the default xdg-open
opener rule to fix it. I don't know why, but it works.
I tried again and still couldn't reproduce the issue. I'm not sure if adding orphan = true
to the default config is reasonable, so I've decided not to add it atm - I'll see if anyone else reports the same problem.
For now, please override the default image opener in your yazi.toml
as a workaround.
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
kitty 0.35.1 created by Kovid Goyal
Did you try the latest code to see if this problem got fixed?
Tried, but the problem still
Describe the bug
when I move cursor on
jpg
orpng
file and press Enter.The file not opened. The file association is set.
the image file can be opened in dolphin. and other file like html can be open ed in Chrome when press enter Change program to open not work ( I change gwenview to qimgv).
log file
There is a error keep showing in the log file.
yazi.log
Expected Behavior
open the image with corresponding program.
To Reproduce
gwenview
.Configuration
keymap.toml
yazi.toml
Anything else?
No response
yazi --debug
output