maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Manual placement of .desktop file... no icon ? (https://talk.maemo.org/showthread.php?t=62858)

fpp 2010-09-24 15:38

Manual placement of .desktop file... no icon ?
 
I am trying to manually add a desktop shortcut to my N900.

I have created the .desktop file and placed it in /usr/share/applications/hildon/, and copied the 48x48 PNG icon to /opt/usr/share/icons/hicolor/48x48/apps/

I'm fairly sure the .desktop file is correct. The shortcut appears in the apps menu, and in the list when adding shortcuts to the desktop. In both cases the shortcut works, i.e. launches the app correctly.

But in all cases the icon remains the default blue square, not the icon referenced in the .desktop.

Is there anything special I can do to make it appear ? I haven't tried rebooting, looking for a better way :-)

TIA
fp

hesham 2010-09-24 15:59

Re: Manual placement of .desktop file... no icon ?
 
i think u have to reboot ur mobile and it will appear after that if not try to copy ur desktop here to see what is wrong

RdM 2010-09-24 15:59

Re: Manual placement of .desktop file... no icon ?
 
have the same problem.

fpp 2010-09-24 18:41

Re: Manual placement of .desktop file... no icon ?
 
Rebooting is the Windows way :-)

If icons appear after a reboot it means some script was run during the process, and that script could be run manually without rebooting. That is probably what App Manager does, I just can't think of the proper search terms to find it.

Anyway, the .desktop file looks like this :

[Desktop Entry]
Version=1.0.0
Encoding=UTF-8
Type=Application
Name=ZeApp
Exec=/usr/bin/zeapp
Icon=zeapp
X-Window-Icon=zeapp
X-Icon-path=/opt/usr/share/icons/hicolor/48x48/apps/
Categories=Office;
X-Osso-Type=application/x-executable

I first tried it with the minimal required items (as per the Wiki), then added the X-* stuff I found here and there, which didn't change anything.

fpp 2010-09-25 12:52

Re: Manual placement of .desktop file... no icon ?
 
Well I gave up and rebooted, I was one version late on kernel-power anyway :-)

Sure enough the icon has appeared on the desktop and in menus. I'm still sure there is a better way, though...

kureyon 2010-09-25 19:09

Re: Manual placement of .desktop file... no icon ?
 
Any changes to the .desktop file will take effect next time you enter the menu. For example, I changed an icon for a program by copying a new file over the existing one, the icon shown in menu is not updated. I then edited the .desktop file to point to a non-existent icon, entered/exited menu (no icon is displayed for that program), then edited .desktop file to point back to original icon, when I enter menu now my new icon is displayed.

dannym 2010-09-27 15:12

Re: Manual placement of .desktop file... no icon ?
 
Call "update-desktop-database".
See also http://freedesktop.org/wiki/Software/desktop-file-utils

fpp 2010-09-27 15:15

Re: Manual placement of .desktop file... no icon ?
 
Thanks a lot ! Re-using upstream standards is all well and good, but you'd think someone could have put a note in the Maemo docs :-)

kureyon 2010-09-27 17:41

Re: Manual placement of .desktop file... no icon ?
 
running "update-desktop-database" does nothing visible.

According to that web page:
Quote:

update-desktop-database: updates the database containing a cache of MIME types handled by desktop files.
If that is all that it does (ie it doesn't have any other hidden/not-mentioned functions) then it's not going to refresh the menu/desktop icons.

SavageD 2010-09-27 20:00

Re: Manual placement of .desktop file... no icon ?
 
I restarting hildon-desktop process should work, but I'm not sure what the command line for that is.


All times are GMT. The time now is 23:09.

vBulletin® Version 3.8.8