Tdesktop: Updater is not working on Linux

Created on 16 Feb 2016  Â·  18Comments  Â·  Source: telegramdesktop/tdesktop

I'm running Telegram Desktop 0.9.15 and it refuses to update. It downloads the new version and warns me about it, but it then restarts with the same version again. I tried executing the Updater manually and it yields the same results.

Is there a way to see debugging logs to understand why it's not replacing the executables with the new version?

Running on Mint Petra.

Most helpful comment

The builtin update feature won't work if the executable is not writeable by your user. Which is usually the case when you install telegram from a package. So just wait for the package maintainer to update it!

@telegramdesktop I think this confusion less savvy users have could be pretty easily solved by disabling the builtin updater if the executable isn't writeable by the process.

EDIT: Oh, you support building without the updater. That's neat.

All 18 comments

@igorsantos07 The folder with the executable should not be write protected. Do you use version from https://desktop.telegram.org?

Also you can enable debug logs (type "debugmode" in settings), and then try to auto update and see ~/.TelegramDesktop/DebugLogs/upd_...txt

there are some thoughs about installation and updating on linux in https://github.com/telegramdesktop/tdesktop/issues/91#issuecomment-185648746 and following

@telegramdesktop

as I can see huge amount of linux users just takes the app from desktop.telegram.org and uses like all other OS users do.
Because thats the only good working way on linux. you should make it possible to build telegram with shared libraries instead of "only static, one binary".

you can still provide that static package + updater but on linux its alwas that way:
distributiors take the sourcecode, build packages and provide them via Packagemanager, update them via packagemanager . if there is a bug fixed in any libraries you just replace the library and everything is fine.

because its really hard to build tdesktop nobody wants to provide a package with it. you need to rebuild Qt for no good reason every single time. you cant really deactivate the updater and the project itself dont respect XDG(freedesktop) specifications.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
like configs in
$XDG_DATA_HOME, fallback is $HOME/.local/share
$XDG_CONFIG_HOME , fallback is $HOME/.config/telegram

also the fonts in tdesktop really suffers from beeing a static thing. not only that you really should use NOTO fonts https://www.google.com/get/noto/ instead of that really ugly opensans crap (really hate them) but also use system wide rendering setup instead of your own fontconfig

but since this wont happen there are a few people who just download the binary and repack them to a ubuntu/debian Package, fedora rpm, even on aur there are far more people interested in the binary then the self compiled file, because its PITA to build is.

*_tl;dr *_
a nice linux app would be:

  1. make is possible to build is with shared libs
  2. make it possible to build without auto updater (this could be the standard for shared lib builds)
  3. what is now $HOME/.TelegramDesktop/tdata/, should be $XDG_DATA_HOME/telegram (or, if there is not $XDG_DATA_HOME, $HOME/.local/share/telegram)
  4. what is now $HOME/.TelegramDesktop/fontconfig/ sould be $XDG_CACHE_HOME/fontconfig (or, if there is not $XDG_CACHE_HOME, $HOME/.cache/fontconfig)
  5. what is now $HOME/.TelegramDesktop/tdata/settings1, $HOME/.TelegramDesktop/tdata/usertag sould be in $XDG_CONFIG_HOME (or, if there is no $XDG_CACHE_HOME, in $HOME/.config/telegram)

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

@SanKro thanks for such a detailed information!

There are some problems with building the final version by other guys, for example I use private (not available in the public source code) API ID for using Telegram API. This is an important thing for the official app, so that we can see in statistics clearly, what is official app and what are forks.

There is no way to use shared Qt library, because private apis of Qt and a patched Qt version are used :(

Updater can be deactivated by a #define, there was an accepted pull request about that.

Updater can be deactivated by a #define, there was an accepted pull request about that.

1020 :)

Hey,
I started working on my own some days ago on this, see:
https://launchpad.net/~itachi-san/+archive/ubuntu/telegramdesktop

My plan is to build the patched QT as a specific patched package (qt-patched-something, to not overwrite some normal QT stuff) and try to build Telegram with it.

On AUR, the package is built as said, but the QT is rebuilt every time.
See: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=telegram-desktop

As of now, I only have a PPA based on the prebuilt binary here:
https://launchpad.net/~itachi-san/+archive/ubuntu/telegramdesktop-bin

The fact is that, having source builds working properly, many more distributions would consider having an official packaging.

As of now, I'm trying to build the patched QT with the usual Debian packaging.

@ItachiSan It's a wonderful idea, I'm supporting you!

However I think discussions about packaging should go to #253

@ItachiSan that sounds awesome, thanks for your work!

respect XDG(freedesktop) specifications.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
like configs in
$XDG_DATA_HOME, fallback is $HOME/.local/share
$XDG_CONFIG_HOME , fallback is $HOME/.config/telegram

IIRC, Qt will respect those when using the qt settings backend (at least it did on my mobile phone some years ago when I last used Qt).

also the fonts in tdesktop really suffers from beeing a static thing. not only that you really should use NOTO fonts https://www.google.com/get/noto/ instead of that really ugly opensans crap (really hate them) but also use system wide rendering setup instead of your own fontconfig

It should specify neither, but respect the theme's font. If the user configure a theme/font (or chose an OS that had a particular theme/font), that's what he most likely wants. Discussing changing the custom font to a different one is just bike-shedding, since everyone has a different preference.

There are some problems with building the final version by other guys, for example I use private (not available in the public source code) API ID for using Telegram API

Many existing packages for some distributions (eg: archlinux) build from source, so I'm guessing that there's a lot of users for which you won't be seeing those stats, even though they're not forks. Much as I love FLOSS software, I do admit that difficulty in tracking stats is one of its downsides.

There is no way to use shared Qt library, because private apis of Qt and a patched Qt version are used :(

Mostly out of curiosity; have these been suggested upstream? If they get integrated into Qt, the need for a patched version might be eventually gone.

I also have the update issue, using debian (lmde). The update suggestion appear, or even inside the app with the update button it downloads, but refreshes on the same version. Changint /opt/Telegram folder permissions or ownership doesnt matter.

Easiest way to update is to download the .zg file and replace on the /opt/Telegram folder.

@crlsgms If it does work in home folder (try please) and does not in opt folder, it should be the permissions problem.

I'm running a quite old version of Linux Mint (16) and now the issue is
gone. I was running 0.9.40 and tried clicking the update suggestion. It
closed and after some time 0.9.42 appeared - running from
/opt/telegram/Telegram, where my user has no write permissions.
Actually I'm not even sure how it did this, but it might have not asked for
a password (should it?) because I've installed another package through
gdebi some minutes ago.

_Igor Santos_
Desenvolvedor web @ Toptal - the top 3% of freelancer talent
http://www.toptal.com/#obtain-only-eye-opening-coders-now
igorsantos.com.br http://www.igorsantos.com.br

On Thu, Apr 14, 2016 at 2:43 PM, crlsgms [email protected] wrote:

I also have the update issue, using debian (lmde). The update suggestion
appear, or even inside the app with the update button it downloads, but
refreshes on the same version. Changint /opt/Telegram folder permissions or
ownership doesnt matter.

Easiest way to update is to download the .zg file and replace on the
/opt/Telegram folder.

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/telegramdesktop/tdesktop/issues/1616#issuecomment-210071959

john-preston, I removed the app from the /opt/ folder, and unpacked the new download on my ~ folder. The shortcut / start menu didnt worked at first, but invoking telegram from the command line and closing had fixed both shortcuts.

I cant confir on the update though, since I unpacked the latest version, but I'm quite sure it will now, ill post up on the next update the results.

edited:
Now the app updates itself seamlessly without issues. thanks everyone

..can someone close this? Updater works on Linux, and OP's setup is working as well. mentioned packaging issues are a separate bug (#253).

i had the same problem, i just downloaded the update directly from telegram.org and replaced it with the old files in /usr/bin/ and it works.

Running on Parrot sec OS... .

The builtin update feature won't work if the executable is not writeable by your user. Which is usually the case when you install telegram from a package. So just wait for the package maintainer to update it!

@telegramdesktop I think this confusion less savvy users have could be pretty easily solved by disabling the builtin updater if the executable isn't writeable by the process.

EDIT: Oh, you support building without the updater. That's neat.

@fbt

EDIT: Oh, you support building without the updater.

Thats the point. Why do package maintainer ship the prebuild instead of a native build?
you can just look at the archlinux aur build for a "how to"
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=telegram-desktop

Actually, I think Telegram just download stuff but when you try to install
without the correct privileges it should warn us back. That's what other
"third-party" applications do, like JetBrains IDEs...

The weirdest thing is that, if we press the "update" button it seems to
work, but only with the in-memory application. That's very odd.

Igor Santos
Desenvolvedor web @ Toptal - the top 3% of freelancer talent
http://www.toptal.com/#obtain-only-eye-opening-coders-now
igorsantos.com.br http://www.igorsantos.com.br

On Fri, Dec 23, 2016 at 9:56 AM, Jack Frost notifications@github.com
wrote:

The builtin update feature won't work if the executable is not writeable
by your user. Which is usually the case when you install telegram from a
package. So just wait for the package maintainer to update it!

@telegramdesktop https://github.com/telegramdesktop I think this
confusion less savvy users have could be pretty easily solved by disabling
the builtin updater if the executable isn't writeable by the process.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/telegramdesktop/tdesktop/issues/1616#issuecomment-268979816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgfS6rWLA3lvQf3FPhMion9kxwK-3s5ks5rK7bwgaJpZM4HaxcS
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeonTheOriginal picture LeonTheOriginal  Â·  3Comments

TotalKrill picture TotalKrill  Â·  3Comments

Mindstormer619 picture Mindstormer619  Â·  3Comments

TheAppService picture TheAppService  Â·  3Comments

beppe9000 picture beppe9000  Â·  3Comments