-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Rofi can't show icons of desktop entries when the desktop entry contains a path for the icon #1977
Comments
Can you pastebin a desktop file? |
Rofi does 'g_path_is_absolute' on the icon passed to load (before it queries the icon theme), and loads it directly if that returns true. |
If I change the path in the icon for any random image in my $HOME the issue gets fixed, it is when the |
Is this an image? rofi looks for valid file extension (maybe not in this case, but this looks odd):
|
weird.. it does a (if you add .png, did you also update the desktop file?) I cannot find this file in the appimage.. |
It isn't just this image, it is any image from any application installed in that location. And even more weird, if I move the image to my home and change the path it suddenly works:
es-de was installed with AM, this: https://github.com/ivan-hc/AM It often pulls the icon from the repo or other sites. You can quickly test this by doing an AM has a portable mode called appman where the appimages and icon get installed in home instead of /opt, when that is used then rofi has no issue displaying the icons in the .desktop path, only when it is in /opt it is that this happens. |
Can't you just attach the image? I don't want to install weird tools just to test? |
Looking at the code, no extension it is not loaded. |
I suspect this is the issue: https://github.com/davatorium/rofi/blob/next/source/rofi-icon-fetcher.c#L357 |
Once again the issue isn't with the image, happens with all other apps in that location: And if I go and move the librewolf icon from /opt, place it in home and edit the .desktop file to change the path of the icon to point to home it works. |
I do not think it is the location. I have many things in my /opt that show up just fine. If it is an absolute path, there is no code that checks 'location'.. there is code that checks for a extension. You said you did this, so I want to double check the file, to check that we are not hunting two different bugs. |
Or try latest git, where I removed that check. |
https://github.com/davatorium/rofi/blob/next/source/rofi-icon-fetcher.c#L302 <-- here we check absolute path. (It worked in your homedir because it check for extension is broken and it checks for a '.'). |
Fixed in: 9b6e70b |
I did try rofi-git as well (mentioned in the first comment of the issue). Here is a video showing everything (and how it gets fixed when I move the icon to a different place in home): https://streamable.com/trhsno But looks like I came too late, will update rofi-git again and update this. |
It works in home, as then it has a '.' in the file path ('/home/{user}/.local/'). This was a silly test (no idea why it was there). |
I've updated git, that is why I suggested that. |
Alright I don't know if I need to wait for the rofi-git aur package to update, because I just reinstalled it and the issue of the video is still there. (Will reboot right now just in case that is needed). |
No reboot needed. |
can you pastebin the output of rofi -v to check if you are indeed on latest. |
It woks now, I had to reboot for some reason though. Thank you! EDIT: Likely rofi didnt fully quit as I use it for other stuff in my system. |
Happy to hear it works. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Rofi version (rofi -v)
Version: 1.7.5 (Also happens with rofi-git).
Configuration
https://gist.github.com/Samueru-sama/7fa680f9a3485756aef1141e2fcacee4
Theme
https://gist.github.com/Samueru-sama/4b1976c1abdccd4e469599922184ba3f
Timing report
No response
Launch command
rofi -show-icons -show drun
Step to reproduce
This issue happens when the .desktop file contains a path to an icon in
/opt
. It doesn't happen if the icon is in $HOME oddly enough.This issue also only happens with rofi, as other application launchers like the whisker menu for the xfce4-panel don't have this issue, neither thunar has the issue.
Expected behavior
The icon should just display like it does when the
Icon=
path in the desktop file points to home instead.Actual behavior
Icon doesn't display.
Additional information
No response
Using wayland display server protocol
I've checked if the issue exists in the latest stable release
The text was updated successfully, but these errors were encountered: