Brno Hat

Jiri Eischmann's Blog

Telegram Desktop Client for Flatpak

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.

9 responses to “Telegram Desktop Client for Flatpak”

  1. jdieter Avatar

    Hey, just wanted to point out that your blog is converting double dashes (–) to long dashes (–), which has a detrimental effect on attempts to copy and paste commands from it. It took me a few moments to work out why I couldn’t install the gnome-sdk using your commands.

    1. jdieter Avatar

      And it’s doing it in the comments, too. πŸ˜‰

    2. eischmann Avatar

      It should be fixed now. I originally used

       tag, but it cut the end of the line, so I just went back to formatted text and it did this. Now it uses  and it seems to be ok.
      1. eischmann Avatar

        Damn formatting tags πŸ™‚

        1. jdieter Avatar

          Hey, well at least your post looks right now. πŸ˜‰

  2. medeoTL Avatar
    medeoTL

    Great new! I always like and support this efforts and hope in a bright future for flatpak. Just… I personally prefer stable version package instead of night build, they tends to be unstable (indeed they are unstable) and need continuous update (that I can ignore, but still…). Anyway, thanks you all for your amazing work!

  3. […] Telegram Desktop Client for Flatpak […]

Leave a Reply

Your email address will not be published. Required fields are marked *