Skip to content

[feat] custom .desktop file template #5176

@snorkysnark

Description

@snorkysnark

Describe the problem

I'm trying to implement a custom URL scheme in my app, and as demonstrated by #323 (comment) this is already possible on Windows using a custom wix template.
It would be pretty easy to do on Linux as well, but it requires some changes to the .desktop file: namely adding a MimeType field and appending %u after Exec:

[Desktop Entry]
Categories=Development;
Exec=app-name %u
Icon=app-name
Name=app-name
Terminal=false
Type=Application
MimeType=x-scheme-handler/customprotocol

Describe the solution you'd like

Use a handlebars template for .desktop file generation, the same way it works for wix:

"deb": {
    "depends": [],
    "desktopTemplate": ""
},
[Desktop Entry]
Categories={{{categories}}}
Exec={{{exec}}}
Icon={{{icon}}}
Name={{{name}}}
Terminal=false
Type=Application

I can make a PR later if you aggree on this change

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions