Yet another app is packaged for Flatpak. Jan Grulich from our team has packaged the official desktop client for Telegram (EDIT: see his blogpost).

flatpak-logo

And it was quite some task because the app is… well… wildly put together. Just see the build instructions provided by upstream. Flatpak manifests are usually fairly simple files, less complex than spec files, but this one ended up being 394 lines long.

I think such an app is an ideal target for Flatpak. There is no way that an app like this would make it to the official Fedora repositories and its authors don’t even seem to be interested in making it more possible.

Telegram client for Flatpak is also built from source. That’s not the case of most packages of this app out there. The Copr package or snap just wrap the upstream binary. With Jan’s manifest, you can build the app yourself. It also works better than the Copr package which creates its own desktop file and then the app itself creates another and you need to log in every time you start the app. It simply behaves weirdly.

If you want to try it out, Jan has created a repo:

$ flatpak remote-add --user --no-gpg-verify telegram-desktop https://jgrulich.fedorapeople.org/telegram/repo/

$ flatpak --user install telegram-desktop org.telegram.TelegramDesktopDevel

$ flatpak run org.telegram.TelegramDesktopDevel

If you still don’t have it, you also need to install the GNOME runtime (the app is using Qt, but it’s own patched version and it also uses components that are in the GNOME runtime, so it was a more sensible option):

wget https://sdk.gnome.org/keys/gnome-sdk.gpg

flatpak remote-add --user --gpg-import=gnome-sdk.gpg gnome https://sdk.gnome.org/repo/

flatpak install --user gnome org.gnome.Platform 3.20

 

It should create (Nightly) Telegram launcher (why nightly? because it’s built from master). And you’re good to go! Feedback is welcome. We’d like to propose it to the upstream project one day, so that they can build it themselves and ship it directly to their users with better experience than just a binary in an archive.