Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Menu icon for script

    Reply
    mcow | # 1 | 2011-07-30, 18:12 | Report

    I created a python script to run on my N800. I made a .desktop file for it, and that's installed; there's an icon for my script in the desired folder of the menu, and it works.

    I initially specified no icon, and so it's showing the default. I've create a PNG, stored it in the same folder as the script, and updated the .desktop accordingly:
    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=NormalizeM3Us
    Exec=python /home/user/python/NormalizeM3Us.py
    Icon=/home/user/python/bandaid.png
    But even after rebooting, I'm not seeing my icon.

    Maemo docs for the Icon field state:
    Originally Posted by
    If the name is an absolute path, the given file will be used.
    I've triple-checked that the path is right, and loaded the PNG into the Images program so I know the image is OK. Can anyone tell me what's wrong here?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Alfred | # 2 | 2011-07-30, 18:35 | Report

    I've got kinda similar problem with my "G+ Macuco icon" in maemo5. The icon shows on the desktop, but not in the menu.

    Shoudn't it be
    Icon="/home/user/python/bandaid.png" ?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mcow | # 3 | 2011-07-30, 19:03 | Report

    I don't see quotes used in any of the examples, and I'd really be surprised if they were required, or even allowed.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Addison | # 4 | 2011-07-30, 20:31 | Report

    I guess the easiest solution would be to change an app that you already have and point it towards your new script and icon.

    If you never use the Help or Rhapsody or Skype app, yeah, just hack one of those desktop files instead.

    This also updates the icons without a need of a full reboot.


    root
    gtk-update-icon-cache -f /usr/share/icons/hicolor


    What does your script do by the way?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mcow | # 5 | 2011-07-30, 23:00 | Report

    Good suggestion. I looked at the other .desktop files and saw that many of them have this line:
    Code:
    X-Icon-path=/usr/share/pixmaps/
    I looked in that dir and noticed canola.png, and when I looked back at canola.desktop, it didn't have the X-Icon-path, but it did have
    Code:
    Icon=canola
    So I just copied my PNG into /usr/share/pixmaps, changed the Icon line to just the filename, and voilą: it works.

    All the script does is convert M3Us encoded in UTF-8+BOM to just plain UTF-8, which is the maemo standard I guess. At any rate, Canola can't read M3Us with a BOM, and MediaMonkey can't write 'em without.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to mcow For This Useful Post:
    Addison

     
    auouymous | # 6 | 2011-07-30, 23:39 | Report

    /usr/share/icons/hicolor/40x40/hildon/

    then run the gtk cache command and only list the icon filename in desktop file, not whole path

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to auouymous For This Useful Post:
    Addison

     
vBulletin® Version 3.8.8
Normal Logout