Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I set AppImage's icon on linux platforms #3599

Closed
hugetiny opened this issue Jan 12, 2019 · 32 comments
Closed

Can I set AppImage's icon on linux platforms #3599

hugetiny opened this issue Jan 12, 2019 · 32 comments
Labels

Comments

@hugetiny
Copy link

AppImage could only show the default icon although i set the icon in package.json

@probonopd
Copy link

probonopd commented Jan 12, 2019

@hugetiny
Copy link
Author

hugetiny commented Jan 12, 2019

@probonopd thank you.i can show icon in linux dock.what i mean is that the appimage file icon can't be set

@probonopd
Copy link

Have you installed the optional appimaged daemon? Which desktop are you using?

@hugetiny
Copy link
Author

ubuntu and fedora. i am new to linux gnome

@probonopd
Copy link

Are you sure the optional appimaged daemon is installed and running? Otherwise you will see no icons on the AppImage files.

@hugetiny
Copy link
Author

hugetiny commented Jan 14, 2019

Does optional appimaged daemon need to be downloaded separately?
can electron-builder integrate it in the dist?

@hugetiny
Copy link
Author

hugetiny commented Jan 14, 2019

image

i mean this one

@probonopd
Copy link

For that one your user needs to have the optional appimaged daemon installed. It will generate the necessary thumbnail files, among other things.

@hugetiny
Copy link
Author

@probonopd Do you mean optional appimaged daemon is not in the electron-builder's dist?

@probonopd
Copy link

Exactly, appimaged is not part of each application AppImage but is installed system-wide. It's optional.

@hugetiny
Copy link
Author

@probonopd what a pity, bu thank you very much

@stale
Copy link

stale bot commented Jul 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Jul 1, 2019
@probonopd
Copy link

Not doing anything is never a good reason to close tickets in my humble opinion. So I don't know what good this bot is supposed to be doing.

@stale stale bot removed the backlog label Jul 1, 2019
@stale
Copy link

stale bot commented Aug 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Aug 30, 2019
@probonopd
Copy link

Not doing anything is never a good reason to close tickets in my humble opinion. So I don't know what good this bot is supposed to be doing.

@stale stale bot removed the backlog label Sep 4, 2019
@Beelink
Copy link

Beelink commented Oct 6, 2019

=(

@stale
Copy link

stale bot commented Dec 5, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added backlog and removed backlog labels Dec 5, 2019
@celodauane
Copy link

I am facing exactly the same issue. I tried everything suggested in this thread but unfortunately, nothing worked. App icon only works with deb but not with AppImage. Is anyone able to point me in the right direction?

electron-builder: 21.2.0
electron: 3.1.13

@probonopd
Copy link

As explained above, for the icon in the filesystem to be the correct one the user needs to have the optional appimaged daemon installed. It will generate the necessary thumbnail files, among other things. Does this solve your issue @dvuvne?

@wdanilo
Copy link

wdanilo commented Mar 6, 2020

I'm facing the same issue. The icon shows correctly on Windows and MacOS but on Linux we do not have any icon both when looking at the app.AppImage file as well as after running it. The solution provided here https://github.com/AppImage/AppImageKit/wiki/Bundling-Electron-apps is wrong, as it allows us to "override" the window icon, but the icon is still not available system-wide (e.g. on the .AppImage file)

@probonopd
Copy link

To get an icon when looking at the app.AppImage file in the file manager, you need a desktop integration software such as the optional appimaged daemon running in the system that integrates the application (and its icon) with the system.

To get the icon when running the application, the application needs to set the icon for the main window.

@wdanilo
Copy link

wdanilo commented Mar 9, 2020

@probonopd I will double check the desktop-integration, thanks for the hint. By the way, we've been distributing AppImage application in the past and it had a desktop icon without requiring the users to install daemon (I'm 100% sure as you can even test it right now - http://luna-lang.org). So there should be a way to do it without this daemon right? Requiring the users to install daemon is rather a big no-go for us regarding AppImage then :(

Regarding the application needs to set the icon for the main window. - I understand this is not required on MacOS and Windows, right? If so, why Linux is a special case here?

@probonopd
Copy link

probonopd commented Mar 9, 2020

The root cause may be that the the XDG specifications are flawed in this regard. They assumed every application to be installed, along with a desktop file and an icon file (that are separate from the application itself). macOS, Windows, and Haiku all have some concept of resources (such as icons) embedded inside the application. I have written an article about it: https://medium.com/@probonopd/my-sixth-day-with-haiku-under-the-hood-of-resources-icons-and-packages-abec8d0e4ec6

in the past and it had a desktop icon without requiring the users to install daemon

In the past I had written a bash script that placed the required icon and desktop file into the system when the AppImage was first launched. Maybe your AppImage still uses that.

@stale
Copy link

stale bot commented May 8, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label May 8, 2020
@stale stale bot closed this as completed May 15, 2020
@probonopd
Copy link

Has this been resolved?

@dsteinman
Copy link

This ticket has been closed -- if the issue has been resolve then what is the procedure for adding an icon to the AppImage?

My package.json contains:

 "linux": {
      "target": [
        {
          "target": "AppImage",
          "arch": [
            "x64"
          ]
        }
      ],
      "icon": "./assets/icon-1024x1024",
      "category": "Utility"
    }

I'm sure the icon file exists, in fact it's in both /assets/ and /public/assets, but my appimage file has no icon.

@probonopd
Copy link

probonopd commented Jun 27, 2020

my appimage file has no icon

Do you mean something like this in the file manager:

image

Unless desktop environments start to actively support this out-of-the-box, you need an AppImage thumbnailer in your system, or something like the optional appimaged daemon for this to work.

I am using Xubuntu with https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md.

@dsteinman
Copy link

I'm not fully understanding what appimaged does and how it fits in here.

When I run appimaged-x86-64.AppImage it's looking for certain directories:

Watching ~/.local/bin
ERROR: appimage_register_in_system : The AppImage explicitly request not to be integrated
Watching ~/Downloads
Watching /opt
Watching /usr/local/bin

My AppImage file is not in any of these locations. I haven't even installed it, It is in the /dist directory of my project. When I run it, it works, but has no icon in the Ubuntu taskbar menu - I was expecting at least that to work.

@probonopd
Copy link

probonopd commented Jul 7, 2020

appimaged is responsible for putting icon and desktop files into the system (as long as you put the AppImage into one of the "watched" locations), which in turn makes it possible for the file manager to show icons like in my screenshot, and is sometimes needed for the menu/taskbar of some desktops to appear correctly.

If you are just concerned about the taskbar and not about the icons in the file manager:
For the taskbars of some desktops it may be sufficient to set an icon for the main window in the source code of your application (in which case you don't need appimaged). Something (roughly) along the lines of

  mainWindow = new BrowserWindow({width: 900,  
  height: 600,  
  show: false,  
  icon: path.join(__dirname, 'assets', 'icons', 'png', 'icon.png')  
  });  

@trusktr
Copy link

trusktr commented Jul 14, 2020

I hope distros ship with a default AppImage thumbnailer soon. That'd be nice and I'm sure the package would be tiny.

@trusktr
Copy link

trusktr commented Jul 14, 2020

According to AppImage/AppImageKit#346, thumbnailer support was merged a while back (which I assume means we don't need appimaged). I wonder why I don't see a thumbnail.

I have both

flatpak 1.7.2-1
flatpak-builder 1.0.10-1

installed in my Arch (Manjaro) Linux (though I'm using electron-forge). I see the default gear cog icon for the AppImage file that I generate.

Could it be that electron-forge forgot to embed the icon in the file?

@AndKe
Copy link

AndKe commented Mar 22, 2024

Please fix it already...
Mintplex-Labs/anything-llm#950 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants