Skip to content

Instantly share code, notes, and snippets.

@calee0219
Last active March 2, 2021 06:55
Show Gist options
  • Save calee0219/e16b15e53be953a0f033d7939829e586 to your computer and use it in GitHub Desktop.
Save calee0219/e16b15e53be953a0f033d7939829e586 to your computer and use it in GitHub Desktop.
#!/bin/bash
if ! wget -v &> /dev/null
then
echo ¨wget command not found¨
exit 1
fi
if ! unzip -v &> /dev/null
then
echo ¨unzip command not found¨
exit 1
fi
# Download binary
wget https://telegram.org/dl/desktop/linux -O telegram.tar.xz && tar xf telegram.tar.xz
rm telegram.tar.xz
sudo mv Telegram /opt/Telegram
sudo ln -s /opt/Telegram/Telegram /usr/local/bin/Telegram
# Create gnome manager app
echo ¨[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=Telegram
Exec=Telegram -workdir ${HOME}.local/share/TelegramDesktop/ -- %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¨ > telegram.desktop
sudo mv telegram.desktop /usr/share/applications/telegram.desktop
# Download logo
wget https://telegram.org/file/464001088/1/bI7AJLo7oX4.287931.zip/374fe3b0a59dc60005 -O tglogo.zip && unzip -p tglogo.zip Logo.svg > Logo.svg
rm tglogo.zip
sudo mv Logo.svg /usr/share/icons/hicolor/scalable/apps/telegram.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment