First, let me thank you for this wonderful tool. I am able to bundle a QT application and deploy it on Ubuntu 16.04. However, I have tried many things but I am unable to attach a unique icon to the AppImage linuxdeployqt creates. Below is an example of an attempt on the hellogl2 example app on qt.
I’ve tried multiple icon files, 256x256, 128x128, 48x48, 32x32, and a .SVG version of the icon. All placed in the appropriate subdirectory. Linuxdeployqt finds the appropriate files and will contruct a working AppImage. It’s just this last step of binding an icon to the AppImage with linuxdeployqt that I must be missing something.
Why is your icon called default.png? Better call it like your application/AppImage, e.g., hellogl2.png. default.png might be used by other apps already, and that might cause issues.
Your question is not clear enough for me to understand your issue.
What’s your actual problem? Is there an error message? In this case, you have to provide a full log (with personal data removed, of course). “Doesn’t seem to” is really vague. Developers can find much more information in a full log than you could probably imagine. Your assumption here might or might not be correct, but even worse it’s really vague, and without the full log, there’s not enough information for us to fix your problem. So, please help us help you, and post a full log.
That said, you didn’t run linuxdeployqt in verbose mode, therefore your log is incomplete. Try to run the linuxdeployqt command with -verbose=3 (1=normal, 3=maximum verbosity). Then, post your log here.
General note: wherever available, wrap code correctly to make it easier for the others to read your post. For example:
code block created by clicking the "code" symbol in the editor window
Thanks. I renamed the icon filename to the same name of the project, as you suggested (Its a 128x128 .png image, but I can change the format if needed). I also included a -verbose=1 log as well. (the verbose=3 and 2 logs output were too large to post here)
Unfortunately I had the same result, I can not seem to attach a unique icon to the AppImage I create with linuxdeployqt
The file is already fully retrieved; nothing to do.
linuxdeployqt 4 (commit 002059c), build built on 2018-01-29 14:08:24 UTC
Desktop file as first argument: "hellogl2.AppDir/hellogl2.desktop"
desktopExecEntry: "hellogl2"
desktopIconEntry: "hellogl2"
Found binary from desktop file: "/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/bin/hellogl2"
FHS-like mode with PREFIX, fhsPrefix: "/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr"
app-binary: "/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/bin/hellogl2"
appDirPath: “/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir"
relativeBinPath: “usr/bin/hellogl2"
Found icons from desktop file: (”/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/share/icons/hicolor/128x128/apps/hellogl2.png”, “/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/hellogl2.png”)
preExistingToplevelIcon: "/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/hellogl2.png"
appimagetool, continuous build (commit continuous-3-gb0ec1cb), build 1431 built on 2018-01-26 15:17:36 UTC
Name: hellogl2
Icon: hellogl2
Exec: hellogl2 %F
Comment: hellogl2 demo AppImage
Type: Application
Categories entry not found in desktop file
Categories: (null)
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/bin/hellogl2 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libQt5Gui.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXxf86vm.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libgcrypt.so.20 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libpcre.so.3 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libprotobuf-lite.so.9 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXau.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libicuuc.so.56 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libwayland-client.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libglapi.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXext.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libmircommon.so.7 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libpng12.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-xfixes.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libicui18n.so.56 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libX11-xcb.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libjpeg.so.8 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxshmfence.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libdbus-1.so.3 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libmirclient.so.9 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libEGL.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libfreetype.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libboost_system.so.1.58.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxkbcommon.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libQt5DBus.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libffi.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libQt5Widgets.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libsystemd.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-dri3.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-glx.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXi.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXfixes.so.3 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libQt5Core.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libQt5XcbQpa.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-sync.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libselinux.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXdamage.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libgbm.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libicudata.so.56 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXrender.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libmircore.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libjasper.so.1 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libgthread-2.0.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-dri2.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libxcb-present.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/liblzma.so.5 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libboost_filesystem.so.1.58.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libXdmcp.so.6 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libmirprotobuf.so.3 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/lib/libwayland-server.so.0 used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/platforms/libqxcb.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/xcbglintegrations/libqxcb-glx-integration.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/xcbglintegrations/libqxcb-egl-integration.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqgif.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqtga.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqjp2.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqwbmp.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqjpeg.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqtiff.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqwebp.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqdds.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqico.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/plugins/imageformats/libqicns.so used for determining architecture x86_64
/home/jim/Qt/Examples/Qt-5.7/opengl/build-hellogl2-Desktop_Qt_5_7_0_GCC_64bit-Release/hellogl2.AppDir/usr/share/hellogl2 used for determining architecture x86_64
Using architecture x86_64
App name for filename: hellogl2
dest_path: hellogl2-x86_64.AppImage
Generating squashfs…
Embedding ELF…
Marking the AppImage as executable…
Success
Please consider submitting your AppImage to AppImageHub, the crowd-sourced
central directory of available AppImages, by opening a pull request
at https://github.com/AppImage/appimage.github.io
Can you elaborate what your problem is and what you are expecting? I do not understand what you mean by “attach a unique icon to the AppImage”. I have Linuxdeployqt working for me so it should not be too hard to get it working for you. Can you share your actual AppImage somehow so we can look at it?
However, without appimaged running the .AppImage file has no icon and there is no icon in the task bar when you run the AppImage. I am not sure if the .AppImage file should have an icon as my image does not either, but there should be an icon in the task bar when the application is running.
Do you have a line similar to this in your source code to set an icon for the application?
I added a setWindowIcon call in my application which does what it should do, but not what I was l looking for.
I tried appimaged too, not exactly what I was looking for, but interesting.
What I was hoping for is what happens when you run the example AppImage off AppImage,org called Subsurface https://subsurface-divelog.org/downloads/Subsurface-4.6.4-x86_64.AppImage(I was looking at the 64bit version) and after you download that AppImage it’s desktop icon is displayed, without any apparent further software being installed like appimaged.
I wonder if this is a difference between Type 1 and Type 2 AppImages. When I produced a Type 1 AppImage for my application it behaved much like the Subsurface app you linked to, now that it is a Type 2 AppImage it behaves as yours application does.
I think we need @probono to comment on if this behaviour is expected for Type 2 AppImages or should the .AppImage files be displayed with the correct icon.
Type 2 is the most current version of AppImage and is produced by the appimagetool and linuxdeployqt tools rather than the original AppImageAssistant tool. This thread describes Type 2 AppImages:
The runtime embedded inside type 1 images extracted the icon then the application was executed. This functionality has since been moved to the optional appimaged daemon that also handles other aspects of desktop integration, such as adding menu entries and setting up file associations, etc.