Skip to content

[Bug]: Renaming doesn't update desktop entry #3970

@Charlignon

Description

@Charlignon

Describe the bug

Tell us the problem

When renaming a bottle, the app does not update the run command in the desktop entry. The -b <BOTTLE> argument still references the old name. The Desktop Action part isn't updated either.
Similarly, when renaming a program, the run command is not updated : the -p <PROGRAM> argument remains unchanged (and the Name= and Comment= fields as well).

Describe the solution you'd like

Update/recreate the desktop entry entirely when editing a program, or the bottle containing the program.

Other solutions ?

Generate static ids (UUIDS ?) for bottles and programs to be used as arguments for -p & -b, so edition of custom strings does not affect existing commands.
Alternatively, use full paths of executables

Additional context and references

This should be part of a larger design, as it relate to #2256 as well.
I think every program should track the desktop entries they created, and changes on bottles should be cascaded to all the programs as well.

To Reproduce

Details 1. Create a bottle of any type 2. Add two programs of any type (via Install or Add shortcut) 3. Click on the programs' meatball menu, and select `Create desktop entry` for both 4. Locate the desktop entries, and open them. Take note of relevant field values (mainly `Exec=`) 5. Program 1: Menu > Rename... > type anything - Check the P1 desktop entry: ❌ KO the fields are not updated and the command is broken 6. Program 2: In Options > Settings, edit the bottle's name (field at the very top) - Check the P2 desktop entry: ❌ KO the fields are not updated and the command is broken

Package

Flatpak from Flathub

Distribution

Ubuntu 24.04

Debugging Information

Details ```shell Official Package: true Version: '51.21' DE/WM: ubuntu Display: X.org: true X.org (port): :1 Wayland: false Graphics: vendors: nvidia: vendor: nvidia envs: __NV_PRIME_RENDER_OFFLOAD: '1' __GLX_VENDOR_LIBRARY_NAME: nvidia __VK_LAYER_NV_optimus: NVIDIA_only icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json nvngx_path: /usr/lib/x86_64-linux-gnu/GL/nvidia-570-153-02/lib/nvidia/wine prime: integrated: null discrete: null Kernel: Type: Linux Version: 6.8.0-41-generic Disk: Total: 16687800320 Free: 16687620096 RAM: MemTotal: 31.1GiB MemAvailable: 22.0GiB Bottles_envs: null ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions