Announcement

Collapse
No announcement yet.

Snap Icons disappearing from Panel

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [PLASMA 5] Snap Icons disappearing from Panel

    I am finding that Icons in the Panel for both Opera and Brave browsers are disappearing randomly. I think both of these are Snap installs.
    The Icons are located in my home directory in /home/me/.local/share/plasma_icons and when they no longer show in the Panel they appear there as a page with a turned down corner rather than the Icon as they should. It is only the Icon that disappears as clicking on the blank space still activates the browser. This appears to happen randomly.
    I can fix the problem by copying the file from /var/lib/snapd/applications brave_brave.desktop and replacing it in the plasma_icons directory. It then renders correctly in the panel again until the problem reoccurs perhaps a week later.
    Any suggestions as to why this happens would be appreciated
    Thanks
    Last edited by waverider; Oct 02, 2021, 01:26 AM. Reason: Additional information

    #2
    I have now found out what is happening but have no idea why.

    The file for the icon is found in my home directory at /home/me/.local/share/plasma_icons The call in the file to the icon location for Opera is Icon=/snap/opera/141/usr/share/icons/hicolor/256x256/apps/opera.png The folder /snap/opera/141 no longer exists but a folder /snap/opera/142 does exist, so for some reason the folder being called appears to have been deleted and a new one with a new number replacing it. Exactly the same happens with Brave - another snap install. Icon=/snap/brave/131/opt/brave.com/brave/product_logo_128.png 131 no longer exists and is replaced with 132

    Is this a bug and if so what do I do?
    Thanks

    Comment


      #3
      I have no idea why it's happening, but this workaround should solve the problem: create your own 'icons' directory, wherever you like--as long as it's in a location that is automatically mounted when booting up--and place the icon(s) there. I do this myself. In my $HOME I have a .icons directory; there I store icons I don't want to lose, for example, sometimes when you upgrade versions or themes, you find that icons you liked are no longer included. This solves that problem!

      These are in your panel/taskbar, is that correct? If so, right-click on their panel entry and choose 'properties'--from there you can select the icon you want to use; choose it in your new icon location, save, and you should be good to go.

      Please note that I'm not at all familiar with Snap and don't use it. I'm speaking strictly from experience with items I've placed in my panel/taskbar, and I don't know of any reason this method shouldn't work for you. Please post again if it doesn't!
      Last edited by DoYouKubuntu; Oct 07, 2021, 06:23 PM.
      Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

      Comment


        #4
        remove the bad icon from the pane, and drag/pin a new one from the menu?
        Or don't use snaps for these applications?


        Does this persist after a logout or reboot?

        Are these icons pinned to the task manager or added as a widget ton the panel? Pinning I *think* would keep the taskbar icon pointing at whatever the current version of the app.
        A widget on the taskbar may not be tied to a menu entry like a pinned one is.

        But searching the topic reveals a large number of posts and bug reports on various snaps, on various distros. Most are fairly old though, and none relate to Brave.
        Same for Flatpaks, so not sure if these are app-package-specific or a Plasma thing.

        Comment


          #5
          Thanks for the responses. I created the link in the panel by selecting it from the menu and adding it to the panel as a Widget. This works OK. But after a number of reboots the widget icon disappears. The link still works from the blank space. It's just that the location of the icon has been changed and the widget code no longer points at the correct directory. Removing the Widget and re-creating it works fine until the next directory change which is unpredictable - maybe 10 or a dozen reboots - I'm not sure. Or perhaps the code is updated - once again I don't know.

          Whatever it is, it is only happening with Snap. I now know what is happening but I can't yet tie down why, when or how. Agggh!

          Just annoying that no-one else seems to be having the same problem. I would prefer to solve the problem rather than change processes just to avoid it.

          Comment


            #6
            You're dragging a .desktop file to the panel to get a launcher for opera and brave, not an icon. The .desktop files have a line specifying the icon which seems to include the snap number in the path. I suspect that every time the app is updated, the number changes. Browsers get frequent updates.

            I suggest you take control by finding the icon .png files (not the .desktop files) and copying it to your home directory somewhere, with better names than just "icon.png". Then, you could right click the panel widget , click Properties, then click on the icon to change it, and select the icon file in your home directory.

            But I find that not very permanent; I trash panel widgets with inadvertent actions, such as drag and drop. So, I right-click on the Application Menu (aka the gear menu, was once called the K menu, by default at the left end of a panel), and click "Edit applications" to start the ancient KDE Menu editor. I have a submenu called "mine", and in "mine" I add an "item", give it a name I like, and change the icon to the one I want, and give a command that starts the app. Usually this command is simple, but sometimes I have to find the .desktop file and copy what appears after "Exec=" in it. Then I click the save button (easy to forget that, the UI is decades old). Then, I can get to the menu item I've just created, and right-click it to add it to the panel. If I trash the widget somehow, or even the whole panel (in the dark, early days of KDE plasma, 14.10 and 15.04, kwin didn't like my GPU and failed a lot) I can recreate the widgets quickly.

            Icons come and go as the winds of UI fashion change, and I get annoyed when some icon I like goes away. So now I keep a collection and copy them from system to system. For example, here's my icon for dolphin: Click image for larger version

Name:	40px-Dolphin-logo.png
Views:	1
Size:	1.3 KB
ID:	645230
            Regards, John Little

            Comment


              #7
              Thanks John.
              It seems that you have exactly identified the problem and given me a possible solution.
              It seems strange to me that Snap apps at this stage have not seen this as a problem and provided an upgrade which uses suitable path profiles. perhaps that will come at some time.
              In the meantime your suggestion seems logical and should resolve my problem for the moment. I will just have to remember the process when I upgrade my hardware - memory not quite what it used to be as I get closer to 80 :-)
              I will set it up and see what happens when the upgrades occur.

              Comment


                #8
                Also, the option I mention before to pin it (either via right-clicking on the item in the menu, or dragging it it the taskbar) should also avoid this, as this ties the icon to the menu entry, as opposed to the static widget.
                Assuming that the icon in the main menus is not also losing its icon.

                Comment


                  #9
                  Thanks Claydoh.
                  The icon in the main menus isn't affected so pinning instead of a static widget may well resolve the issue

                  Comment


                    #10
                    Hi there,

                    You are not alone. I have been having this issue with links disappearing of Brave and Chromium in my machine for some months already. Both are snap packages. Pinning makes smaller icons, so aesthetically awful to me. Also, after removing the snap and adding it again, the icon is back for a few sessions until it disappears again.

                    The solution on my side will be uninstalling the snaps and installing the programs from their repositories.

                    Comment

                    Working...
                    X