Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegisterCustomScheme does not consider "-externalupdater" #5118

Closed
henning-schild opened this issue Aug 30, 2018 · 4 comments · Fixed by #5119
Closed

RegisterCustomScheme does not consider "-externalupdater" #5118

henning-schild opened this issue Aug 30, 2018 · 4 comments · Fixed by #5119

Comments

@henning-schild
Copy link
Contributor

Steps to reproduce

  1. install tdesktop and start it with "-externalupdater"
  2. update tdesktop externally i.e. in gentoo Linux go from 1.3.10 to 1.3.14
  3. now if you restart, the new version will trigger creation of a .desktop-file in ~/.local/, which will not contain the argument "-externalupdater" anymore

Expected behaviour

The command line argument is a clear sign that a package manager feels responsible for tdesktop, and the package should ship a working desktop file.
So when the argument is found it would be best to not execute RegisterCustomScheme because that clearly is part of the internal updater. And the internal one should be disabled with the argument.

Actual behaviour

Tdesktop will create a .desktop file and configure gnome as well. The created entries do not contain the argument and it will get lost forever, since the .local file will win over the one from the distro. Well that might depend on the window manager.

Configuration

Operating system: Gentoo Linux

Version of Telegram Desktop: 1.3.14

@henning-schild
Copy link
Contributor Author

see https://bugs.gentoo.org/618662

@john-preston
Copy link
Member

@henning-schild That makes sense. Does this packaged .desktop file handle tg:// url scheme?

@henning-schild
Copy link
Contributor Author

While you could imagine someone packaging tdesktop with a self-invented and partial .desktop-file, gentoo uses the one that comes with tdesktop.
lib/xdg/telegramdesktop.desktop from the tarball.
https://github.com/gentoo/gentoo/blob/231fac686e1f7a78435194132c15c22738834f0e/net-im/telegram-desktop-bin/telegram-desktop-bin-1.3.14.ebuild#L44

So the answer is yes! If you insist on generating the .desktop file in tdesktop Exec= should stay telegram-desktop -- %u and not turn into the absolute path to Telegram, because that breaks the wrapping and passing the argument.

But it would be best to just not re-generate the .desktop file in the application. Since packages should always install the one found in the tarball. And external updaters will update that when the tarball brings a new one.

john-preston pushed a commit that referenced this issue Sep 1, 2018
Closes: #5118
Signed-off-by: Henning Schild <henning@hennsch.de>
kiku-jw pushed a commit to kiku-jw/tdesktop that referenced this issue Feb 11, 2019
@github-actions
Copy link

github-actions bot commented Mar 7, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants