-
-
Save squizduos/15a62364853fba0845ca9596d33092b0 to your computer and use it in GitHub Desktop.
A bash script to multiple accounts with Telegram GNU/Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# $ ./multiTelegram myUSERNAME | |
TELEGRAM_BIN="/usr/bin/telegram-desktop" | |
TELEGRAM_DIR_RAW=$HOME"/.multiTelegram" | |
if [ ! -z $1 ] | |
then | |
WORKDIR="$TELEGRAM_DIR_RAW/$1" | |
echo "Launching instance $1 with working directory $WORKDIR" | |
if [ ! -d $WORKDIR ] | |
then | |
echo "Working directory $WORKDIR does not exist and will be created before start." | |
mkdir -p $WORKDIR | |
fi | |
$TELEGRAM_BIN -many -workdir "$WORKDIR" | |
else | |
echo "Launching default Telegram instance" | |
$TELEGRAM_BIN | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Name=Telegram @${USERNAME} | |
Comment=Official desktop application for the Telegram messaging service | |
TryExec=${TELEGRAM_BIN} | |
Exec=${TELEGRAM_BIN} -workdir ${WORKDIR} -- %u | |
Icon=telegram | |
Terminal=false | |
StartupWMClass=TelegramDesktop | |
Type=Application | |
Categories=Network;InstantMessaging;Qt; | |
MimeType=x-scheme-handler/tg; | |
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop; | |
X-GNOME-UsesNotifications=true | |
X-Desktop-File-Install-Version=0.23 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment