Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save backviet/6193b1e795d2f1b7335e88f095209ec5 to your computer and use it in GitHub Desktop.
Save backviet/6193b1e795d2f1b7335e88f095209ec5 to your computer and use it in GitHub Desktop.

Revisions

  1. @Nachtalb Nachtalb revised this gist Feb 3, 2021. No changes.
  2. @Nachtalb Nachtalb revised this gist Feb 3, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    How to add multiple accounts to Telegram Desktop - Since `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ inbuilt
    How to add multiple accounts to Telegram Desktop
    ===========================================================================

    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports multiple accounts inbuilt ‼️‼️

    Though this is limited to 3 accounts. If you have more you can still use this method (3 accounts per instance)
    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports up to 3 multiple accounts inbuilt ‼️‼️

    If you have more you can still use this method (3 accounts per instance)

    ⚠ This guide is for the app available here: https://desktop.telegram.org/ not the one in the Mac/Windows App Store. For the Mac App Store app this should work: https://gist.github.com/Nachtalb/ec590dc974f6ba4674972d4937b230be/#gistcomment-3611415 ⚠

    .. contents:: Table of Contents

  3. @Nachtalb Nachtalb revised this gist Jul 17, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    How to add multiple accounts to Telegram Desktop - Deprecated since `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_
    How to add multiple accounts to Telegram Desktop - Since `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ inbuilt
    ===========================================================================

    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports multiple accounts inbuilt ‼️‼️
  4. @Nachtalb Nachtalb revised this gist Jun 29, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,8 @@ How to add multiple accounts to Telegram Desktop - Deprecated since `2.1.14 <htt

    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports multiple accounts inbuilt ‼️‼️

    Though this is limited to 3 accounts. If you have more you can still use this method (3 accounts per instance)



    .. contents:: Table of Contents
  5. @Nachtalb Nachtalb revised this gist Jun 29, 2020. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,11 @@
    How to add multiple accounts to Telegram Desktop - Deprecated since V2.1.14
    How to add multiple accounts to Telegram Desktop - Deprecated since `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_
    ===========================================================================

    .. contents:: Table of Contents


    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports multiple accounts inbuilt ‼️‼️


    ---

    .. contents:: Table of Contents


    Introduction
  6. @Nachtalb Nachtalb revised this gist Jun 29, 2020. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,15 @@
    How to add multiple accounts to Telegram Desktop
    ================================================
    How to add multiple accounts to Telegram Desktop - Deprecated since V2.1.14
    ===========================================================================

    .. contents:: Table of Contents


    ‼️‼️ As of version `2.1.14 <https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.14>`_ Telegram Desktop supports multiple accounts inbuilt ‼️‼️


    ---


    Introduction
    ------------
    ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: `telegramdesktop/tdesktop#4261 <https://github.com/telegramdesktop/tdesktop/issues/4261>`_).
  7. @Nachtalb Nachtalb revised this gist Jun 28, 2020. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions telegram-desktop-multiple-accounts.rst
    Original file line number Diff line number Diff line change
    @@ -25,12 +25,14 @@ Linux
    - Create a new ``.desktop`` file here ``~/.local/share/applications/telegramdesktop-{{myusername}}.desktop``.
    - Put in your data in here

    ⚠️ In this example the Telegram binary resides in ``/opt/Telegram/Telegrm``. This might be different in your case. If so then you have to adjust the path to the binary on the lines ``TryExec`` and ``Exec``. ⚠️

    .. code:: ini
    [Desktop Entry]
    Version=1.0
    Name=Telegram MyUsername
    Comment=Official desktop application for the Telegram messaging service
    Name=Telegram {{MyUsername}}
    Comment=Official desktop version of Telegram messaging service
    TryExec=/opt/Telegram/Telegram
    Exec=/opt/Telegram/Telegram -workdir /home/{{your_user}}/.local/share/TelegramDesktop/{{MyUsername}} -- %u
    Icon=telegram
  8. @Nachtalb Nachtalb renamed this gist Jun 24, 2020. 1 changed file with 0 additions and 0 deletions.
  9. @Nachtalb Nachtalb revised this gist Jun 24, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions instructions.rst
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,12 @@ Introduction
    ------------
    ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: `telegramdesktop/tdesktop#4261 <https://github.com/telegramdesktop/tdesktop/issues/4261>`_).

    Thought the Official Telegram Desktop client has the feature to set the working directory with a command line argument - ``-workdir``. This enables the use of multiple accounts.
    The Official Telegram Desktop client however has the feature to set the working directory with a command line argument ``-workdir``. This enables the use of multiple accounts.

    In this guide I will show you a way to use this feature on MacOSX, Linux and Windows. We will be working with the ``-workdir`` argument provided by the client to create more instances.
    In this guide I will show you a way to use this feature on MacOSX, Linux and Windows. We will be working with the ``-workdir`` argument to create multiple instances for each Telegram account.


    Everywhere I use ``{{...}}`` replace the wole thing with what is written in there. So eg. for me and my TG account `@Nachtalb <https://t.me/Nachtalb>`_ I replace ``{{MyUsername}}`` with ``Nachtalb``.
    Replace ``{{...}}`` thing with what is written in there. So eg. for me and my TG account `@Nachtalb <https://t.me/Nachtalb>`_ I replace ``{{MyUsername}}`` with ``Nachtalb``.


    Instructions
  10. @Nachtalb Nachtalb revised this gist Apr 18, 2019. 1 changed file with 17 additions and 5 deletions.
    22 changes: 17 additions & 5 deletions instructions.rst
    Original file line number Diff line number Diff line change
    @@ -10,12 +10,12 @@ ATM of writing this, there is no way inside the Telegram Client to switch accoun

    Thought the Official Telegram Desktop client has the feature to set the working directory with a command line argument - ``-workdir``. This enables the use of multiple accounts.

    In this guide I will show you a way to use this feature on MacOSX and Linux. If you know how to do this on windows please let me know in the comments and I'll add it to the guide.
    I don't know about windows. But on OSX and Linux you can use the ``-workdir`` argument to create more instances.
    In this guide I will show you a way to use this feature on MacOSX, Linux and Windows. We will be working with the ``-workdir`` argument provided by the client to create more instances.


    ❗ Everywhere I use ``{{...}}`` replace the wole thing with what is written in there. So eg. for me and my TG account `@Nachtalb <https://t.me/Nachtalb>`_ I replace ``{{MyUsername}}`` with ``Nachtalb``.


    Instructions
    ------------

    @@ -68,6 +68,18 @@ OSX
    - Now lastly if you want the have the same icon for your new app, open the file info of both apps (the original telegram and yours) with ``CMD + I`` and click on the icon in the top left of the original application. Hit copy ``CMD + C``, click on yours and hit past ``CMD + V``.


    Windows (Coming soon hopefully)
    +++++++++++++++++++++++++++++++
    Please someone tell me in the comments how to do this.
    Windows
    +++++++
    - Create a folder here: ``C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\{{MyUsername}}``
    - Rightclick on your desktop and create a new shortcut
    - Put this in the location field

    .. code::
    "C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\Telegram.exe" -workdir "C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\{{MyUsername}}"
    - Click next and type in a name for the shortcut, usually something like ``Telegram {{MyUsername}}``
    - Lastly to find the application via the start menu you have to copy the link in here

    .. code::
    C:\Users\{{your_user}}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Telegram Desktop
  11. @Nachtalb Nachtalb created this gist Apr 18, 2019.
    73 changes: 73 additions & 0 deletions instructions.rst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    How to add multiple accounts to Telegram Desktop
    ================================================

    .. contents:: Table of Contents


    Introduction
    ------------
    ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: `telegramdesktop/tdesktop#4261 <https://github.com/telegramdesktop/tdesktop/issues/4261>`_).

    Thought the Official Telegram Desktop client has the feature to set the working directory with a command line argument - ``-workdir``. This enables the use of multiple accounts.

    In this guide I will show you a way to use this feature on MacOSX and Linux. If you know how to do this on windows please let me know in the comments and I'll add it to the guide.
    I don't know about windows. But on OSX and Linux you can use the ``-workdir`` argument to create more instances.


    ❗ Everywhere I use ``{{...}}`` replace the wole thing with what is written in there. So eg. for me and my TG account `@Nachtalb <https://t.me/Nachtalb>`_ I replace ``{{MyUsername}}`` with ``Nachtalb``.

    Instructions
    ------------

    Linux
    +++++
    - Create a folder here ``~/.local/share/TelegramDesktop/{{MyUsername}}``
    - Create a new ``.desktop`` file here ``~/.local/share/applications/telegramdesktop-{{myusername}}.desktop``.
    - Put in your data in here

    .. code:: ini
    [Desktop Entry]
    Version=1.0
    Name=Telegram MyUsername
    Comment=Official desktop application for the Telegram messaging service
    TryExec=/opt/Telegram/Telegram
    Exec=/opt/Telegram/Telegram -workdir /home/{{your_user}}/.local/share/TelegramDesktop/{{MyUsername}} -- %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
    OSX
    +++
    - Create a folder here: ``~/.local/share/TelegramDesktop/{{MyUsername}}``
    - Open Automator
    - Create a new Application

    .. image:: https://user-images.githubusercontent.com/9467802/56354968-6875f500-61d5-11e9-9e61-32f87ba5502c.png
    :name: Create application in Automater

    - Add an apple script by drag & drop from the left-hand side
    - Add the following text:

    .. code:: as
    do shell script "Applications/Telegram.app/Contents/MacOS/Telegram -workdir '/Users/{{your_user}}/.local/share/TelegramDesktop/{{MyUsername}}'"
    .. image:: https://user-images.githubusercontent.com/9467802/56354966-657b0480-61d5-11e9-8341-200ee72d1cb2.png
    :name: Applescript to start Telegram


    - Save to ``/Applications/Telegram {{MyUsername}}.app``
    - Now lastly if you want the have the same icon for your new app, open the file info of both apps (the original telegram and yours) with ``CMD + I`` and click on the icon in the top left of the original application. Hit copy ``CMD + C``, click on yours and hit past ``CMD + V``.


    Windows (Coming soon hopefully)
    +++++++++++++++++++++++++++++++
    Please someone tell me in the comments how to do this.