1

I have created a desktop launcher for my GUI-application. To the application I have three .png files that is read and used by the GUI itself. The .png files are located at the same place where I have the application.

I created the launcher with: gnome-desktop-item-edit --create-new

Now my problem is that these .png files are not read. I get 'Failed to load image from file "my.png".

So why are not these .png files read?

1
  • Can you post the content of the .desktop file?
    – M. Becerra
    Jun 8, 2017 at 8:40

2 Answers 2

0

I for some reason got it up and running. Sorry I'm not sure what I did wrong in the first place. Nevertheless I put my .png file under /usr/share/applications and now it's working.

Any how. Thank you for trying to help me.

1
  • OK, I will look into this deeper tomorrow at work.
    – hzcodec
    Jun 11, 2017 at 20:18
0

I see you answered your own question, but I believe it would be better if you copied or moved the image to /usr/share/pixmaps/, because /usr/share/applications/ is intended for .desktop files.

Probably what happened is that your .desktop file (launcher) was trying to load the image from a relative path 'my.png'. When you moved the image to this directory the problem was "solved". It should work if you place your image under the pixmaps dir I mentioned before and reference it in your desktop file with an absolute path, e.g. /usr/share/pixmaps/my.png

To use a relative path you would need to create an application icon, those are stored under /usr/share/icons, but I wouldn't know how to approach this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .