39

I've installed the latest Telegram App (v 0.8.32) On my Ubuntu 14.04. I want Telegram to run minimized at startup in Tray and show me new messages but I can't because In the app settings there isn't any option for that. Help me How Can i do it....

4 Answers 4

44

You should add a startup item to your startup application list, as mentioned by Mladen B.

The command is:

/opt/telegram/Telegram 

Or, if you've installed Telegram via the software center or snap:

telegram-desktop

To start hidden:

/opt/telegram/Telegram -startintray 

There is a -now closed- bug in Telegram using Unity: a sequence of "Open Telegram --> Minimize to tray --> Open Telegram" will show the window.

1
  • 1
    Mentioned bug is pretty annoying! Apr 17, 2017 at 9:46
12

You can add it to the list of startup applications, by going to Dash and start typing "startup". The "Startup Applications" icon should show up.

startup

Click on it and when it starts, click on the "Add" button to add your app to the list of applications which will start automatically each time you log in. Also you can start it minimized by adding -startintray commandline option:

enter image description here

4
  • 2
    Yeah, but how do we find out the "command" name? Dec 29, 2015 at 7:46
  • Try looking in: ~/.config/autostart
    – Mladen B.
    Dec 30, 2015 at 8:06
  • 1
    Or in console, type: which Telegram and that should give you a full path to your Telegram binary.
    – Mladen B.
    Jan 8, 2022 at 11:28
  • In my case (Ubuntu 22.04) this is a command in StartApp Applications Preferences: /snap/bin/telegram-desktop
    – Alexei
    Oct 30, 2022 at 14:41
2

Sadly none of them are work from the prevoius solutions.

What I did:

  1. Created a bash script file with (You have to add the proper path of your Telegram executable. Relative path didn't work!):

    #!/bin/bash
    /home/spyff/.telegram/Telegram &
    
    while true
    do
        xdotool windowminimize `xdotool search --onlyvisible --classname Telegram`
        if [ $? -eq 0 ]
        then
            break
        fi
        sleep 0.1
    done
    
  2. Saved somewhere as TelegramStarter.sh

  3. Added that script to the Ubuntu's Startup Applications

This start Telegram and if its actually started, minimize it immediately. Tested on Ubuntu 16.04.3 with Telegram 1.1.23.

0

You could use crontab, and enter this in the terminal:

  crontab -e telegram
  crontab restart

and it might work fine this way.

1
  • why was this voted down?
    – Mladen B.
    Apr 11, 2019 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .