Call for testing: Telegram Desktop


#1

TL;DR
snap install telegram-desktop

Telegram is probably one of the more widely used software in Ubuntu that since the constant updates isn’t convenient to use from repositories.

We already have telegram snaps, but they all are based on binaries distributed upstream, so not something is actually upstreamable, nor it allows easy improvements to get the best integration.

So, the I wanted a version that was generated from upstream code potentially without modifications. tdesktop also has a quite complex build system which needs various upstream libraries (some of them in static form) with specific versions including slightly patched Qt 5.6.2 and gyp, so it was fun to test it with the power of snapcraft.

I did a previous snap version like this already more than an year ago and worked fine but not having a system able to build this automatically in a proper way as build.snapcraft.io does today was a bit a blocker (as travis was always taking way more time than a free instance can provide).

In the mean time their code got even a bit more complicated to get compiled as now it requires gcc-7 (which is not in xenial), but snapcraft scriptlets + plugins are enough to get all the things I needed setup (so congrats to all the guys who did the snapcraft and builders job).

Anyway, lots of speaking, but it would be much appreciated if you could test it, just do:

snap install telegram-desktop

This will install the latest stable, but if you want to run the latest git revision, just use the edge channel (that will be automatically updated at any change, so limited responsability).

Snapcraft code is at https://github.com/3v1n0/telegram-snap
While builds are at https://build.snapcraft.io/user/3v1n0/telegram-snap

What you should expect is a quite native experience, in fact I also included some patches (all proposed upstream) to get Telegram feel more at home in sandboxes, to support better Ubuntu in GNOME and I’ve taken the occasion to fix libunity to handle better snapped apps without having the need to change them in order to get the Unity or Gnome Dock emblems integration (so, you should get numbers in your dock!).

Since I was there I also fixed telegram to compile properly in armhf (I hated the red light on b.s.i!), and then if you have any hardware with such arch handy and a graphic session, please test it too.

So, test and let me know! :slight_smile:

PS: unity launcher / GNOME dock integration works, but having other .desktop files around in your systems (like the ones that the official build generates) could cause a wrong matching, so in that case, just get rid of ~/.local/share/applications/telegramdesktop.desktop


Telegram Snap Unity Integration
#2

Just installed it now on Artful, works fine. Let you know if I have issues.


#3

I just installed it in Ubuntu and it went smoothly. Thanks! This is much appreciated! I’ll report any issues I encounter, if any at all.

EDIT: Here’s a weird error: I’m unable to use accents in the snap version. So when I want to write ``’~` it doesn’t help me.


#4

We’ve went through that issue, and I was able to fix it in the last one, by just setting some env variables, and using this worked for me (but it should be already in the snap):

env QT_IM_MODULE=xim \
   QT_XKB_CONFIG_ROOT=/snap/telegram-desktop/current/usr/share/X11/xkb \
   QTCOMPOSE=/snap/telegram-desktop/current/usr/share/X11/locale \
   snap run telegram-desktop

Otherwise give a try by running the snap with XCOMPOSEFILE=/snap/telegram-desktop/current/usr/share/X11/locale/C/Compose env var, although that should now clash the QT ones…


#5

I am using this just fine, liking it so far; I am thinking of ways to tell users of telegram-sergiusens to move over to this version.


#6

I just moved over. What if this snap was brought in under snapcrafters? Then people might lean towards using it naturally. Or is this being moved upstream?


#7

@bashfulrobot in the next days I’ll try to propose this upstream, however sure you can already move this under the snapcrafters umbrella (just add me there too :)).


#8

Its a small issue, but I would love to see spell checking in some future version.


#9

You’d have to request that upstream :slight_smile:


#10

Just installed it and it’s working great! We even have accentuated characters working now! :smile:

Thanks a lot for this, your repository for the snap it’s like a tutorial to show how to push the limits of snapcraft, I’m sure it will help a lot of people packaging hard to snap apps! Great work!


#11

I’ve just installed it on Solus :slight_smile: I was worried about drag and drop files, in app updater and locale settings but everything works fine :slight_smile:

still I’m getting a few minor errors:

When clicking on a group chat after startup
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f3cb8004140] Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol

When clicking on “Download” link to open the telegram downloads folder
Error org.freedesktop.DBus.Error.AccessDenied: Supplied URL scheme "" is not allowed Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.SafeLauncher was not provided by any .service files


#12

@popey / @Wimpress - Do you feel this is a good move to put the current snap over to the snapcrafters repo?


#13

I saw it but it doesn’t look something caused by the container, or is it? Do you get the same in the upstream version?
That comes from ff_configure_buffers_for_index in libavformat.

That’s a knonw issue valid for all the desktop snaps, and I’ve been discussing this a bit in Allowing xdg-open to open files


#14

I have one issue, when on wayland

sergiusens@mirkwood:~$ telegram-desktop 
This application failed to start because it could not find or load the Qt platform plugin "wayland"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
Telegram[0x89164a]
Telegram[0x891bdc]
Telegram(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x382)[0x11055a4]
Telegram(_ZN15google_breakpad16ExceptionHandler12HandleSignalEiP9siginfo_tPv+0x1c3)[0x110517f]
Telegram(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x1be)[0x1104e98]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff7c2b8b390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7ff7c22c6428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7ff7c22c802a]
Telegram[0x1e88c17]
Telegram[0x1a6d4b8]
Telegram[0x1a6d4f5]
Telegram[0x205bd95]
Telegram[0x1a6eacf]
Telegram[0x172c669]
Telegram(_ZN11ApplicationC2EN3gsl8not_nullIPN4Core8LauncherEEERiPPc+0x3a)[0xe8074a]
Telegram(_ZN4Core8Launcher18executeApplicationEv+0x3e)[0x88eb7e]
Telegram(_ZN4Core8Launcher4execEv+0x54)[0x88ec34]
Telegram(main+0x35)[0x761ea5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff7c22b1830]
Telegram(_start+0x29)[0x777f69]
Aborted
sergiusens@mirkwood:~$ snap info telegram-desktop
name:      telegram-desktop
summary:   Official desktop client for the Telegram messenger
publisher: 3v1n0
contact:   https://github.com/telegramdesktop/tdesktop/issues
description: |
  Telegram is a popular messaging protocol with encryption and security as
  its key focus.
  
  Fast and secure desktop app, perfectly synced with your mobile phone.
snap-id: jpdoHqMd90M39DdH2JSZbeQxipqHtwLo
commands:
  - telegram-desktop
tracking:    stable
installed:   1.2.6 (54) 99MB -
refreshed:   2018-02-09 18:30:48 -0300 -03
channels:                                
  stable:    1.2.6                  (54) 99MB -
  candidate: 1.2.6                  (54) 99MB -
  beta:      1.2.7-alpha+git94cf307 (58) 99MB -
  edge:      1.2.8-alpha+git7814ee0 (60) 99MB -

In telegram-sergiusens that was solved by faking the wayland related environment variable to force using the X11 backend (in case you don’t want to go the wayland route just yet).


#15

I just installed it here on Kde Neon and it is not working with accentuated letters. When I use it from a ppa, it works, though. I would like to provide any further information that is needed to debug this.

And thanks for the initiative.


#16

As discussed elsewhere, I have the same issue as @gsilvapt here. Tried several workarounds but could not get it to work just yet.


#17

The work for me, but I set up the keyboard to English (International AltGr dead keys)


#18

Mh, @niemeyer could you strace the app without containement and with the env variables you need to get the letters to work, to see what Compose file loads?


#19

Works fine. Only having problems when trying to change default download folder.

folder_select


#20

@sergiusens weird, I’ve added the environment since some snap revisions now… It should go in wayland. :o