No menu entry to start Telegram

Bug #1715185 reported by Paul Tansom on 2017-09-05
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
telegram-desktop (Ubuntu)
Undecided
Unassigned

Bug Description

I haven't been able to test this in the standard Ubuntu release desktop (the new Gnome variety), but there is no entry in any of the available menu tools in Ubuntu MATE 17.10 (latest beta). It also doesn't show as a running application in any of the panels or Mutiny Dock (on the Mutiny panel arrangement for MATE). It only shows in the 'tray' at the top right of the screen. The only way to start it seems to be to open a terminal and use 'telegram-desktop &'.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: telegram-desktop 1.1.19-1build1
ProcVersionSignature: Ubuntu 4.12.0-12.13-generic 4.12.8
Uname: Linux 4.12.0-12-generic x86_64
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
CurrentDesktop: MATE
Date: Tue Sep 5 16:36:21 2017
ExecutablePath: /usr/bin/telegram-desktop
InstallationDate: Installed on 2017-06-16 (80 days ago)
InstallationMedia: Ubuntu-MATE 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: telegram-desktop
UpgradeStatus: Upgraded to artful on 2017-09-01 (3 days ago)

Paul Tansom (aptanet) wrote :
Paul Tansom (aptanet) wrote :

A bit more info following investigation. When using MenuLibre to investigate the menu applications Telegram is listed. It is also listed when using the MATE Menu Editor (mozo). It doesn't, however show in the menus - Brisk Menu, Main Menu (The Main MATE Menu) or MATE Menu (Advanced MATE Menu).

Interestingly, Mutt is also listed in both menu editors, but missing in the Brisk Menu. It does, however, show in the Main Menu and MATE Menu, where Telegram doesn't.

On further investigation it looks as though removing the bottom line:

MimeType=x-scheme-handler/tg;

from the telegramdesktop.desktop file in /usr/share/applications/ fixes the problem. For me this isn't an issue since I've never had a Telegram link work, so Mime isn't working anyway in this case.

Paul Tansom (aptanet) wrote :

On further investigation it would appear the fix is to rename the .desktop file from:

telegramdesktop.desktop

to:

telegram-desktop.desktop

this seems to fit with the standard used by other applications listed in /usr/share/applications/ and would get things working with minimal effort.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in telegram-desktop (Ubuntu):
status: New → Confirmed
camypaj (mantonijevic) wrote :

Hi all,

I almost reported this as a new bug, since it affects telegram-desktop version 1.2.17-1 in Ubuntu Mate 18.04, but to put it short: "it is still a problem".
From what I can tell, this package is still rather old (binaries on the desktop.telegram.org mention version 1.8.12, and it doesn't make sense for me to go for an overkill of a snap/flatpak/appimage.
My suggestions:
1) remove the old one from ubuntu repo, and point people to the ppa, which contains version 1.8.8-0ubuntu0 (probably conflicting with this old one from ubuntu repos)
2) updating the package in the main repo, and, for example, adding some postinstall/postrm/prerm hooks. I've looked at the other packages, and all of them seem to successfully install their icons, in for example
/usr/share/applications/
telegram-desktop has zero scripts for this logic, just copies the files (if it succeeds), and that's it. I would assume there's a standardized way to trigger a menu "refresh" on a system level, for all users?
What this package needs is some logic for error handling, for example that it can report if there's a problem installing/removing files.

Also, (and this might be a "Ubuntu Mate" specific problem), the main user which installed the package, got the menu item installed, and all the others didn't.

I know it's too "hand-wavy" for a comment on a bug report, but since I didn't do this via tool (to avoid the duplicates), I had to write it from memory.

If I can help in any way, please let me know.

Thanks,
camypaj

Mattia Rizzolo (mapreri) wrote :

it's not that the version in ubuntu 18.04, that's just how stable distribution works: once a package version is there, it won't be touched (barred some exceptions).

1.8.8 is available in the development version of ubuntu indeed.

If somebody figures the real reason telegram-desktop is not showing up on the menus in 18.04, then it can (and should) be fixed by a targeted update.

Either way, the .desktop file is unchanged in the last years, and it's still named the same way also in 1.8.8-1.

@mantonijevic: which PPA are you talking about? Does the package from there really show the icon?

camypaj (mantonijevic) wrote :

Hi @mapreri,
I know about the stable distributions, but I was just wondering why this stable version ended up here, really old and without the install hooks.
Sorry about the PPA, must have been tired - wanted to put it in here: https://launchpad.net/~atareao/+archive/ubuntu/telegram
Regarding the icon problem, I just spun off a couple of clean installs, and from what I can tell, both work just fine with a clean install.
The original problem I've had is that there was an existing ./.local/share/applications/telegramdesktop.desktop, pointing to "Exec=/opt/telegram/telegram -- %u" (probably from the binary version, or from the abovementioned ppa, which is just a wrapper for the binaries), and it wasn't removed or overwritten by the telegram-desktop app upon install.
Apparently, they can also co-exist at the same time, but whichever one was installed and launched first, stays in the menu. I'll check with the maintainer of the PPA if I can submit a pull request for the dependencies and cleanup.

Question for the OP: @Paul Tansom: is it possible that you've had a similar problem? Because apparently, when Mate Menu finds a broken shortcut, it just doesn't show it in the menu, from what I can tell.

Regards,
camypaj

Mattia Rizzolo (mapreri) wrote :

anything regarding /opt/ definitely comes from unofficial packages. Also, just installing packages must not touch anything in a user's home.

About the "install hooks" you are referring about, just know that comparatively, very few packages have them, and nowadays they are mostly frowned upon as bugs in those can easily cause severe issues, and sometimes weird situations, so there is a tendency to move to other solutions. Telegam-desktop is a very simple application once built, so it doesn't have any reason to have "hooks" (which are called "maintainer scripts", btw).

So from what I gather, yours is a local configuration issue: the .desktop file in your home conflicted with the system one in /usr/share/applications/, and your desktop environment prefers the one in the home (correctly so), but since it refers to something non-existing it doesn't display what would be a broken icon. In a situation like this, indeed renaming the .desktop file in /usr would fix the situation as then the two wouldn't conflict anymore.

In such case, there really is nothing a package in the archive can do, as by policy it can't touch stuff in the user's home upon installation.

Yes, you are right - removing the local .desktop file "activated the
global" .desktop file, which made it visible in the menu.

On Fri, 4 Oct 2019, 16:31 Mattia Rizzolo, <email address hidden> wrote:

> anything regarding /opt/ definitely comes from unofficial packages.
> Also, just installing packages must not touch anything in a user's home.
>
> About the "install hooks" you are referring about, just know that
> comparatively, very few packages have them, and nowadays they are mostly
> frowned upon as bugs in those can easily cause severe issues, and
> sometimes weird situations, so there is a tendency to move to other
> solutions. Telegam-desktop is a very simple application once built, so
> it doesn't have any reason to have "hooks" (which are called "maintainer
> scripts", btw).
>
> So from what I gather, yours is a local configuration issue: the
> .desktop file in your home conflicted with the system one in
> /usr/share/applications/, and your desktop environment prefers the one
> in the home (correctly so), but since it refers to something non-
> existing it doesn't display what would be a broken icon. In a situation
> like this, indeed renaming the .desktop file in /usr would fix the
> situation as then the two wouldn't conflict anymore.
>
> In such case, there really is nothing a package in the archive can do,
> as by policy it can't touch stuff in the user's home upon installation.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1715185
>
> Title:
> No menu entry to start Telegram
>
> Status in telegram-desktop package in Ubuntu:
> Confirmed
>
> Bug description:
> I haven't been able to test this in the standard Ubuntu release
> desktop (the new Gnome variety), but there is no entry in any of the
> available menu tools in Ubuntu MATE 17.10 (latest beta). It also
> doesn't show as a running application in any of the panels or Mutiny
> Dock (on the Mutiny panel arrangement for MATE). It only shows in the
> 'tray' at the top right of the screen. The only way to start it seems
> to be to open a terminal and use 'telegram-desktop &'.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 17.10
> Package: telegram-desktop 1.1.19-1build1
> ProcVersionSignature: Ubuntu 4.12.0-12.13-generic 4.12.8
> Uname: Linux 4.12.0-12-generic x86_64
> ApportVersion: 2.20.7-0ubuntu1
> Architecture: amd64
> CurrentDesktop: MATE
> Date: Tue Sep 5 16:36:21 2017
> ExecutablePath: /usr/bin/telegram-desktop
> InstallationDate: Installed on 2017-06-16 (80 days ago)
> InstallationMedia: Ubuntu-MATE 17.04 "Zesty Zapus" - Release amd64
> (20170412)
> SourcePackage: telegram-desktop
> UpgradeStatus: Upgraded to artful on 2017-09-01 (3 days ago)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/telegram-desktop/+bug/1715185/+subscriptions
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers