-
Notifications
You must be signed in to change notification settings - Fork 41
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
Write an article/section for desktop environment developers on how to handle application bundles #103
Comments
Version 0.1 Native Support for Application Bundles in Desktop Environments As desktop environments continue to evolve, it's essential to provide a seamless user experience for applications packaged in various application bundle formats, such as Native support for application bundles is essential for providing a seamless user experience in desktop environments. By implementing the features outlined here, desktop environment developers can improve the usability and functionality of their platforms. We hope that this guide will inspire developers of KDE, XFCE, Cosmic, and other desktop environments to take interest in supporting application bundles natively. Understanding Application BundlesApplication bundles are self-contained packages that include an application's executable, libraries, and resources. They provide a convenient way to distribute and run applications without requiring complex installation procedures. The most common bundle formats are:
Application bundles and packages are two different ways to distribute and manage applications on a computer system. While both provide a way to deliver software to users, they differ significantly in their approach and implications. Traditional packages (as used on many Linux distributions) are typically installed on the system. They are often installed in a specific location, such as In contrast, application bundles are directories or files that include all the necessary files and resources for an application to run. They are essentially a collection of files and folders that are packaged together to form a single, portable unit. Unlike packages, application bundles do not require installation and can be moved freely around the file system. Users can simply download an application bundle, move it to their desired location, and run it without the need for any additional setup or installation process. This difference in approach has significant implications for desktop environments, as they can no longer rely on icons or desktop files being placed in specific directories by the installer. Instead, desktop environments must be able to discover and manage applications dynamically, regardless of their location on the system. RequirementsTo provide native support for application bundles, desktop environments should implement the following features: 1. Executable Bit HandlingWhen a user attempts to open an ELF binary without the executable bit set, prompt them to set the bit. This ensures that the application can be executed correctly. 2. Icon DisplayExtract and display the application icon embedded in the bundle. This provides a visual representation of the application, making it easier for users to identify and launch the app in the file manager. 3. Opaque Bundle HandlingTreat 4. Error HandlingIf an application exits with an error code within a few seconds after launch, display the error message in the GUI. This provides users with valuable feedback and helps them troubleshoot issues. 5. Bundle-Specific LaunchingImplement bundle-specific launching mechanisms to ensure that applications are launched correctly. For example, 6. Advanced topicsThe above should already give a reasonably good user experience. However, it can be further improved by also implementing:
(Section to be detailed) Implementation guidelines1. Executable Bit HandlingWhen a user attempts to open an ELF binary without the executable bit set, the system should prompt them to set the bit via a GUI dialog box. The GUI dialog box should include a message indicating that the file is an executable binary, and should ask the user if they trust the application and want to execute the application. If the user confirms, the system requests administrative privileges if necessary for changing the permissions, and sets the executable bit ( Best practice implementation: TBD (TODO: Add screenshot) 2. Icon DisplayWhen displaying application bundles, they should not use the folder icon. Instead, they should load the application icon from the following locations:
The icons should not be copied to some location outside of the application bundle such as If no application icon is found at these locations, then a fallback default application icon (e.g., the same one shown for generic ELF files) should be used. This applies to the file manager but also to file open/save dialogs, etc. 3. Opaque Bundle HandlingWhen a directory with the A context menu item should be there to open the directory as a folder, e.g., called "Show Contents". 4. Error HandlingMost desktop environments just disregard application output to
Best practice implementation: Haiku (TODO: Add screenshot) 5. Bundle-Specific Launching(Section to be written) 6. Advanced topics(Section to be written) Aspects missing in XDG Specifications
(Section to be written) ContactFeel free to ping me @probonopd if you have something I could give feedback on or could test. Thank you! |
TODO: Write an article/section for desktop environment developers on how to handle application bundles.
The plethora of currently available "desktop integration" "solutions" are crude workarounds for the fact that most desktop environments do not handle application bundles like .app, .AppDir, and .AppImage natively:
Since i have written file managers (e.g., https://github.com/probonopd/Filer) which do this properly, maybe I should write a description of how to support such application bundles, in the hope that developers of KDE, XFCE, Cosmic, etc. might take interest.
Thanks to @ivan-hc for triggering this idea in a discussion.
The text was updated successfully, but these errors were encountered: