Linux desktop shortcut and icon from install

前端 未结 3 984
春和景丽
春和景丽 2021-02-06 11:01

What do I need to add to my .spec file to create the desktop shortcut and assign an icon to the shortcut during install of my .rpm? If a script is req

3条回答
  •  轮回少年
    2021-02-06 11:27

    akdom has given a fairly good answer, but doesn't do its relevance justice.

    Many common desktops, including Gnome, KDE and XFCE where relevant, implement the specifications laid out by freedesktop.org. Among these, is the Desktop Entry Specification which describes the format of files that define desktop icons, and Desktop Base Directory Specification that describes the locations that desktop environments should look to find these files.

    Your RPM needs to include a .desktop file, as specified by the Desktop Entry Specification, and install it in the correct location as specified either by the Desktop Base Directory Specification, or in a distribution specific location (I imagine there will be aliases to use in the spec file for this location).

提交回复
热议问题