AppImage / AppImageKit

Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.libera.chat
http://appimage.org
Other
8.58k stars 546 forks source link

CLI AppImages seem to expect an X Display to be present #901

Closed KurtPfeifle closed 5 years ago

KurtPfeifle commented 5 years ago

Apologies if I'm not up-to-date with this project's recent developments. I didn't follow it for almost a year, and it seems a lot has changed. Things which (in my memory at least) used to work flawlessly, don't work any more like they did. I do not have any time to debug/analyze this -- I just want to enjoy the comfort of running AppImages.

Here are some things I noticed:

  1. appimagetool. Didn't the following use to work?

    ./appimagetool-x86_64.AppImage appimagetool-x86_64.AppImage
      .....
      # extracts the AppImage and prints all paths
      .....

    Now I get:

    ./appimagetool-x86_64.AppImage appimagetool-x86_64.AppImage
       appimagetool, continuous build (commit 6baa36d), build 2008 built on 2018-12-22 13:59:15 UTC
       appimagetool-x86_64.AppImage is a file, assuming it is an AppImage and should be unpacked
       To be implemented
  2. appimagetool and many other CLI utilities as AppImages. This one definitely used to work:

    ssh kp@mybox
    cd ~/AppImages
    ./appimagetool-x86_64.AppImage -h
      .....
      [prints help message]
      .....

    Now I get the following:

    ./appimagetool-x86_64.AppImage -h
      QXcbConnection: Could not connect to display 
      Aborted

    WTF? Why should I need to connect to a(n X) "display" when I attempt to run a CLI tool?

  3. MuseScore-3.0-x86_64.AppImage, released yesterday. I do not know how MuseScore is supposed to display its help message. If it is via a GUI popup dialog, I wouldn't like it -- but that's not my direct business, if the MuseScore developers had decided to like this more. However, I suspect that this is the same issue as with and 2. above:

    ssh kp@mybox
    cd ~/AppImages
    ./MuseScore-3.0-x86_64.AppImage
      QXcbConnection: Could not connect to display 
      Aborted

    So, maybe in MuseScore's case it rightly expects an X Display to be available, because it wants its help to display as a GUI element... How about another test, with a recently released "official" AppImage?

  4. qpdf- 8.3.0-x86_64.AppImage, released earlier today. Again, this is a pure CLI tool and has no GUI element in it whatsoever. But it shows the same issues as above:

    ssh kp@mybox
    cd ~/AppImages
    qpdf-8.3.0-x86_64.AppImage --help
      QXcbConnection: Could not connect to display 
      Aborted

    (BTW, QPDF meanwhile has a nice logo, which does not show up on AppImageHub...)


The collection of above examples makes me think that they are due to changes/bugs in AppImage and its toolchain, not due to bugs in the respective projects.

TheAssassin commented 5 years ago

Regarding 1, no, that's never been working like that. Unfortunately, we still don't have an external extraction solution (tracked in several issues, including #572 and #830). To extract, please call your AppImage with the --appimage-extract parameter. I still want that --extract parameter for appimagetool, but @probonopd and I have a different opinion how/where to implement it. Please don't hesitate to post some feedback or ideas in the issues I mentioned.

Regarding 2 to 4, do you happen to have AppImageLauncher installed? AppImageLauncher has a known bug that it doesn't work on headless systems (or over SSH connections etc.), which was recently raised a bit in priority after finishing a first stable release. We have a solution in @azubieta's PR, which just needs to be ported back into the main branch.

I can assure you that Qt-related issues don't originate from AppImageKit or the runtime, since none of these uses Qt for anything. The only explanation I have is the AppImageLauncher bug mentioned above.

KurtPfeifle commented 5 years ago

Thanks, @TheAssassin. It was indeed an AppImageLauncher issue. I hadn't even been aware that I had this thingie running. Kicked it off the system again.

Had also forgotten about #572, thanks for reminding me. (Forgetfulness ends to hit old men more frequently that young padawans.)