Skip to content
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

Hard coded path for the Joplin icon #1611

Closed
tylerelias opened this issue May 30, 2019 · 7 comments
Closed

Hard coded path for the Joplin icon #1611

tylerelias opened this issue May 30, 2019 · 7 comments

Comments

@tylerelias
Copy link

Hi, I'm on Arch and I use Joplin for taking notes. I noticed that with icon themes the icon for Joplin doesn't change like the rest of them. I posed this issue on another repo, the creator of the icons a currently use here: gusbemacbe/suru-plus-aspromauros#9
He did some digging around and pointed it out that the path to the icon itself is hardcoded and that any changes done to that get reverted (check his explaination in the link above)

I thought I should raise this issue and see what you guys have to say.
Also, thanks for this program, and all the hard work.

See image for a visual representation.
out_of_place_icon

@tessus
Copy link
Collaborator

tessus commented May 31, 2019

Here's the comment from the other ticket as a reference:

I have just investigated.

Did you install JOplin, using the command line, right? So it created an desktop file and it uses an AppImage. Here is its desktop file:

[Desktop Entry]
Encoding=UTF-8
Name=Joplin
Comment=Joplin for Desktop
Exec=/home/gusbemacbe/.joplin/Joplin.AppImage
Icon=/home/gusbemacbe/.joplin/Icon512.png
StartupWMClass=Joplin
Type=Application
Categories=Application;
X-AppImage-BuildId=1LpSDS79QxkAP8oaIYEmKvLumiN

You can see as the Icon=/home/gusbemacbe/.joplin/Icon512.png is hardcoded. We have to change to softcoded path like:

Icon=joplin

The problem is that, as X-AppImage-BuildId=1LpSDS79QxkAP8oaIYEmKvLumiN is present, it will update the AppImage and reverts the icon path to the original.

@tessus
Copy link
Collaborator

tessus commented May 31, 2019

Unfortunately I'm not familiar with the build process of the AppImage on Linux. Maybe @laurent22 has an idea.

@CalebJohn
Copy link
Collaborator

I started looking at where an appropriate location to store the icon would be. This gnome article says /usr/share/icons/hicolor/48x48/apps/ and I think ~/.local/share/icons/hicolor/48x48/apps. Can you test if this would work on your arch system?

@gusbemacbe
Copy link
Contributor

@CalebJohn

I was going to say and explain it. The name Icon512.png should be renamed to joplin.png and Icon=/home/gusbemacbe/.joplin/Icon512.png for simply Icon=joplin in the .desktop file.

@gusbemacbe
Copy link
Contributor

gusbemacbe commented May 31, 2019

  1. Change from:

wget -nv -O ~/.joplin/Icon512.png https://joplinapp.org/images/Icon512.png

to:

mkdir -p ~/.local/share/icons/hicolor/48x48/apps
wget -nv -O ~/.local/share/icons/hicolor/48x48/apps/joplin.png https://joplinapp.org/images/Icon512.png 
  1. Change from:

echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=/home/$USER/.joplin/Icon512.png\nStartupWMClass=Joplin\nType=Application\nCategories=Application;\n$APPIMAGE_VERSION" >> ~/.local/share/applications/appimagekit-joplin.desktop

to:

 echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/$USER/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Application;\n$APPIMAGE_VERSION" >> ~/.local/share/applications/appimagekit-joplin.desktop 

@CalebJohn
Copy link
Collaborator

Looks good! Why don't you make a pull request? That way you get credit for the work you've put in!
I think this section could be changed though to reflect to size of the icon

mkdir -p ~/.local/share/icons/hicolor/512x512/apps
wget -nv -O ~/.local/share/icons/hicolor/512x512/apps/joplin.png https://joplinapp.org/images/Icon512.png 

@gusbemacbe
Copy link
Contributor

@CalebJohn, done.

@lock lock bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants