Skip to content

Instantly share code, notes, and snippets.

@rtancman rtancman/Install Telegram
Last active Jun 1, 2016

Embed
What would you like to do?
#!/bin/sh
# telegram
wget https://updates.tdesktop.com/tlinux/tsetup.0.9.42.tar.xz
tar xvfJ tsetup.0.9.42.tar.xz
mv Telegram/ /opt/telegram
rm -rf tsetup.0.9.42.tar.xz
#telegram image
wget https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Telegram_logo.svg/128px-Telegram_logo.svg.png
mv 128px-Telegram_logo.svg.png /opt/telegram/telegram128x128.png
# Add to applications list (thanks 4ndrej)
echo -e '' >> /opt/telegram/telegram.desktop;
sudo rm -rf /usr/share/applications/telegram.desktop
sudo ln -s /opt/telegram/telegram.desktop /usr/share/applications/telegram.desktop
# Add bin alias
sudo rm -rf /bin/telegram
sudo ln -s /opt/telegram/Telegram /bin/telegram
# Set the icon (thanks gcaracuel)
echo -e '[Desktop Entry]
Version=1.0
Type=Application
Name=Telegram
GenericName=a new era of messaging
Exec=/opt/telegram/Telegram %F
Terminal=false
Icon=/opt/telegram/telegram128x128.png
Categories=Messenger;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/telegram/Telegram -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/telegram/Telegram --command new_file
OnlyShowIn=Unity;' >> /opt/telegram/telegram.desktop;
echo ""
echo "Telegram installed successfully!"
echo "Run with: telegram"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.