0

I have downloaded .tar.xz file from Telegram's official website. I extracted the Telegram folder from the archive to my Downloads folder. The archive has just 2 executable files namely Telegram and Updater. The menu entry was showing for Telegram until I moved the Telegram folder to /opt folder. After that the menu entry is not showing. The .desktop file for Telegram is by default stored in ~/.local/share/applications. I changed the executable path in the .desktop file to the path inside the /opt folder as follows:

[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true

I am not sure whether I need to move the .desktop file somewhere else since I moved my Telegram folder to /opt or is it something wrong in the .desktop file.
Thank you.

4
  • Oh it worked after rebooting the system. I apologize for not trying that out before posting this question. But can anybody suggest is this the correct way to install manually installed applications? And whether .desktop files for such applications be stored in .local/share/applications or somewhere else? May 26, 2020 at 12:31
  • Sometimes you need to restart GNOME shell after modifying desktop entries. To restart shell you can use Alt+F2, type r and then hit Enter. If you are the only user, it doesn't matter where you put desktop entries. But if multiple users use the machine and you want to make sure all users can use that application, put it in /usr/share/applications else let it be in ~/.local/share/applications. Also, since you have already solved the issue, consider posting an answer which after 2 days you can mark as accepted.
    – Kulfy
    May 26, 2020 at 12:35
  • @Kulfy Thanks a lot. If I ran into a similar problem in the future, I'll definitely try to restart my shell rather than the whole system. May 26, 2020 at 12:40
  • To start with, which Linux distro have you installed (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, Mint, et al.), & which release number? Different releases have different tools for us to recommend. Please click edit & add that to your question, so all facts we need are in the question. Please don't use Add Comment, since that's our one-way channel to you. All facts about your PC should go in the Question with edit as this is a Q&A site, not a general forum, so things work differently here.
    – K7AAY
    May 26, 2020 at 16:34

1 Answer 1

1

It worked by simply rebooting the system. But as commented by @Kulfy, it is better to restart shell after modifying desktop entries. That way one might not need to restart their system to solve this problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .