electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

[minor bug] debian desktop file has hardcoded path to executable in opt

Open pirate486743186 opened this issue 6 months ago • 4 comments

I'm not a developer, i don't know exactly the versions. It's present with recent versions.

The package has some fancy stuff with update-alternatives, but the desktop file is hardcoded to the binary in opt. It should be using the /usr/bin update-alternatives symlink instead.

pirate486743186 avatar Dec 17 '23 03:12 pirate486743186

Sorry, not sure I follow.

Are you referring to this code? What's the proper approach? (I'm not familiar with update-alternatives) https://github.com/electron-userland/electron-builder/blob/277341000a87abaa65a7985854c06e88ed5938b9/packages/app-builder-lib/templates/linux/after-install.tpl#L8

mmaietta avatar Jan 23 '24 00:01 mmaietta

with update alternatives you have a symlink in usr/bin that points to a second symlink in /etc/alternatives. The second symlink is under the control of update alternatives and can be configured to point to various alternate executables.

The desktop file ignores all that fancy stuff by been directly pointed to the executable in opt.

Just remove the explicit path from the desktop file.

pirate486743186 avatar Jan 23 '24 10:01 pirate486743186

Still not too sure I follow tbh, haven't worked with update-alternatives myself. Please open a PR with your suggested changes

mmaietta avatar Jan 28 '24 04:01 mmaietta

well... lol i don't know how to fix it. this line should have the simple name of the executable, not the fiul path to the opt executable. https://github.com/electron-userland/electron-builder/blob/f5340b732dc0a303743a2a924750e9861e3a345f/packages/app-builder-lib/templates/linux/desktop.tpl#L4

pirate486743186 avatar Jan 28 '24 11:01 pirate486743186