I created a desktop icon in Linux #105
awkwardwaiter
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Nice!!!! Do you know if there's a way we can set an icon by default when we build the electron app as an appimage? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Running reor on Ubuntu Linux. I wanted a distinct icon instead of the generic cog. In the spirit of things I asked GPT for instructions and for an icon image. My steps below.
There may be better methods of adding an icon. One weakness of this method is that I will need to update the reor appimage file name in Step 3 when the version # changes.
Steps:
Create your icon. I put this in the same folder as my reor appimage file, to make it easy to find later. I attached my icon file as an example. GPT suggested a small square PNG file. GPT 4 itself gives me webp file format, which I needed to save as a PNG. I used the Krita image app to crop and save as reor_icon.png
Create .desktop icon file. Probably need root permission. In Terminal, I entered:
sudo nano /usr/share/applications/reor.desktop
Nano editor opens. Paste in this code and replace with your path and file names. Cut out my parenthetical notes
[Desktop Entry]
Type=Application
Name=Your App Name (reor for me)
Exec=/path/to/your/appimage file name (Reor_0.1.52.AppImage for me)
Icon=/path/to/your/icon.png file name (reor_icon.png for me, in the same path as my reor appimage file)
Terminal=false
Save that .desktop file. In Nano, thats Ctlr-X, then Y for Yes you want to save it. If you get a permission denied error, that's probably because you didn't sudo when you started creating the file.
Make the .desktop file executable
sudo chmod +x /usr/share/applications/your_app.desktop
Update the icon database for applications
sudo update-desktop-database
Look in your applications for Reor, it should have the new icon. In Ubuntu you can click the 9 dot grid in the lower left corner ("Show Applications" on hover) and then browse to see your app.
Beta Was this translation helpful? Give feedback.
All reactions