10

How do I start Telegram messenger from the command line?

I have tried "telegram", but it's not that.

I have installed Telegram via ppa: ppa:atareao/telegram.

Nickolai Leschov
  • 8,120
  • 19
  • 49
  • 90
  • How did you install it? The Telegram app comes packaged in a standalone .zip file (or .tar file, can't quite remember). Where did you extract this? – Seth Feb 13 '17 at 00:24
  • I have installed it via [ppa:atareao/telegram](http://askubuntu.com/a/456121/181242). I have updated the question. – Nickolai Leschov Feb 13 '17 at 00:29
  • Do you see it in /opt? Try running `/opt/telegram/Telegram` at the command-line – Seth Feb 13 '17 at 00:30
  • @Seth Yes, it's there. "/opt/telegram/Telegram". Would be more convenient if it started like other programs, like `firefox`. – Nickolai Leschov Feb 13 '17 at 00:31

3 Answers3

14

Since you installed telegram from the PPA, it is likely installed in /opt. Probably under /opt/telegram. You should be able to launch it from the command-line by running:

/opt/telegram/Telegram

but if you wanted to make this easier you can create a symbolic link to /usr/local/bin like so:

sudo ln -s /opt/telegram/Telegram /usr/local/bin/telegram

you can then launch telegram with the command:

telegram
Seth
  • 57,282
  • 43
  • 144
  • 200
  • ok, I guess it's the packager's fault (?) that they didn't create a symbolic link when installing. Thanks! – Nickolai Leschov Feb 13 '17 at 00:34
  • 1
    @NickolaiLeschov yes it would be their oversight. – Seth Feb 13 '17 at 00:36
  • No, it is not an oversight. It is packaged to be installed in /opt/telegram, rather than in /usr. – dobey Feb 13 '17 at 01:07
  • 2
    @dobey if you're going to install everyday software it doesn't make sense to not put it in PATH somehow. A symlink to /usr/*local*/bin (not the same thing as a normal app installed in /usr) is a good way to do that. Much better than adding a folder from /opt directly to PATH. – Seth Feb 13 '17 at 01:31
3

On Ubuntu 17.10, 18.04 and above, If you have installed using Ubuntu Software Manager, you can launch it using the following command in terminal:

telegram-desktop

if you want to start it minimized in tray use the following command (e.g you want to create an start up entry):

telegram-desktop -startintray 
Amir
  • 131
  • 5
0

If you know where you installed your Telegram, you can easily launch the script, see the example below (I installed it in directory named soft).

(base) user@user:~/soft/Telegram$ ls
Telegram  Updater
(base) user@user:~/soft/Telegram$ ./Telegram

Voila, you have it running.

circassia_ai
  • 101
  • 1