User Tools

Site Tools


linux:telegram

This is an old revision of the document!


Installing telegram to send notification messages

Intro

If you look on internet, you will found thousands of recipes like this one: install telegram in order to send notification messages from one computer directly to your phone.

My goal with this recipe is to create a telegram_msg command that just send a text message, nothing more.

Although it might seem a simple goal, you will discover that it is not a simple one: the Telegram command line application doesn't have a “send message” combination of arguments to do so. Moreover, a combination of pipes –to simulate a writing from the console– doesn't achieve the desired result because the telegram-cli program doesn't end: it keeps cyling over and over reading nothing from the pipe.

To put things worst, the first command you have to issue in ''telegram-cli'' is contact_list. It's a known error, at least on June, 2015.

Said that, the only approximation to my goal I've seen so far today is:

  • Run telegram-cli as a daemon, and when it starts, issue a contact_list command the first time
  • After that, send the command through netcat (nc) command
linux/telegram.1434490421.txt.gz · Last modified: 2022/12/02 22:02 (external edit)