desktop_entry 1.0.1 copy "desktop_entry: ^1.0.1" to clipboard
desktop_entry: ^1.0.1 copied to clipboard

PlatformLinux

A Dart package for managing Desktop Entry files (.desktop) and DBus Service files in Linux environments.

desktop_entry #

pub package

A Dart package for managing Desktop Entry files (.desktop) and DBus Service files in Linux environments.

Getting started #

Define a Desktop Entry file for your application. If you intend to define a custom scheme, the MimeType field of your Desktop Entry file should contain x-scheme-handler/yourScheme in addition to any other relevant values.

The contents of an example Desktop Entry file are below, as referenced in the Desktop Entry specification:

[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Comment=The best viewer for Foo objects available!
TryExec=fooview
Exec=fooview %F
Icon=fooview
MimeType=image/x-foo;
Actions=Gallery;Create;

[Desktop Action Gallery]
Exec=fooview --gallery
Name=Browse Gallery

[Desktop Action Create]
Exec=fooview --create-new
Name=Create a new Foo!
Icon=fooview-new

Scope #

The API at this time handles creation of .desktop specification files and DBus service files, and installing them to the local user directory. It has been written to the 2020 version of the Desktop Entry specification. This library does not perform validation of the various keys to ensure correctness at this time.

However, the choice to implement various types (language concept) that correspond to the various 'types' (specification concept) of the specification is a deliberate one, intended to make hint that these values are not quite simple strings.

Additional information #

desktop_entry has been tested on Ubuntu 22.04 LTS. Suggestions for improvements or contributions to improve compatibility of the package with other Linux variants, or improve the conformity of the package to the Desktop Entry specification are welcome.

5
likes
140
pub points
1%
popularity

Publisher

verified publishermarkvideon.dev

A Dart package for managing Desktop Entry files (.desktop) and DBus Service files in Linux environments.

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, path, xdg_directories

More

Packages that depend on desktop_entry