40

When I boot up my Ubuntu 20.02 laptop, MT (Microsoft Teams) always starts. Since I would like to avoid this, I went to the default program "Startup Applications" and removed the tick for MT.

Though this works for two or three boots, afterwards, I am still stuck with the same problem. Interestingly, the tick for MT in Startup Applications is still there, even though I removed MT from the list.

Help would be appreciated!

3
  • 5
    There's possibly an option in the program itself to disable this behavior.But if not , you can delete the corresponding .desktop file in the ~/.config/autostart directory.It's possible to do it each time you login (via ~/.profile file). Commented Jun 27, 2020 at 8:19
  • @ParsaMousavi you should write this as answer. Teams does have an option that controls startup behavior, and this should be used instead. Commented Jun 27, 2020 at 8:26
  • 5
    Exact same issue for me. It's incredibly annoying. I would delete teams in a heartbeat except for the fact that my new company requires me to use it.
    – cyrusbehr
    Commented Feb 16, 2022 at 17:13

8 Answers 8

36

The only method I have found so far to solve the problem is configuring settings in Teams:

  • Right click the Teams icon on the system tray
  • open Settings
  • uncheck Auto-start Application

teams settings

Note: In some versions, you can right click the system tray icon and disable autostart right there.

The following methods do not work.

  1. If you disable Teams as a startup application, it will enable itself the next time you open Teams.
  2. If you restrict the write access to autostart folder only to superusers (so that Teams cannot add itself to startup applications), Teams will refuse to open and show errors.
9
  • Isn't it the same as unchecking it in the Startup Applications ? Commented Jun 27, 2020 at 8:38
  • 3
    No. When you open Teams the next time, it will again register itself to startup application. I was referring to settings within teams Commented Jun 27, 2020 at 8:42
  • For me it does not work to right click on system tray and uncheck autostart (teams would not store that I unchecked the option), however I had success from the settings within the app. Commented Apr 28, 2021 at 14:07
  • I don't see the option to Uncheck / Disable Auto-start via System Tray. @JohannesLemonde: Are you saying that you were able to disable it after logging in to the Microsoft Account via Teams? Using Ubuntu 20.04.3 LTS. Commented Oct 16, 2021 at 13:55
  • 5
    The fact that you don't ever want teams to start automatically aside, why is the automatic startup setting even part of Teams' own settings? That seems like a questionable practice at best. Respect the Startup Applications please, Microsoft. Commented Jun 17, 2022 at 7:04
20

Another way is to achieve this is to add the following line into your ~/.profile file :

rm ~/.config/autostart/whatever_the_name_is.desktop

When you login , even before the DE starts the profile file gets executed and removes the .desktop file.So even if the Microsoft teams creates that file each time you open it , after logout and log-back there shouldn't be any problem.

Or even if that doesn't work(i.e the DE starts before the profile gets executed which I don't think to be the case),you can just kill the process via the killall command in ~/.profile.

7
  • 1
    The first solution may not work if the autostart applications are run before this command is executed. However, if the desktop file is removed before the software runs, it will certainly work. And Teams is a pretty heavy piece of software, so first running it, and then killing it may significantly increase startup time. Commented Jun 27, 2020 at 8:48
  • 2
    An interesting workaround! I needn't do that for Teams, but I keep that hack in a corner of my head for the next time I get problems with some intrusive proprietary software. Commented Apr 28, 2021 at 14:11
  • 2
    Worked like a charm Commented Apr 10, 2022 at 14:15
  • 2
    On my system for MS teams that line for ~/.profile is rm ~/.config/autostart/teams.desktop
    – mlncn
    Commented Jun 22, 2022 at 2:47
  • 1
    This is genius, thanks!, also possibly generic for other non-conforming apps, the option to do it from within the teams gui isn't there anymore ? BTW, From the next version of Teams on, when you go : Settings -> Privacy , you'll see this: 'no' :P
    – mistige
    Commented Nov 2, 2022 at 10:06
11

If you like me haven't logged in to the app, it seems you can't access the app settings (or I'm just blind). But I found a config file located here (on my system):

~/.config/Microsoft/Microsoft Teams/desktop-config.json

Change appPreferenceSettings.openAtLogin to false, then Teams will stop creating the ~/.config/autostart/teams.desktop file at startup, and no more autostart 🎉️

This is probably what happens if you follow Archisman Panigrahi accepted answer, but if you are like me can't find the settings in the UI, this might help.

If the config file is not located in the same place as on my system, you might be able to figure out where it is by cat:ing the start script:

cat $(which teams)

For me, the config file is located in the parent directory of TEAM_LOGS that is set by that script.

7

They've coded the app to check and set itself to autostart everytime you open the app. bad microsoft.....bad.. Clean way to stop that is to lock its autostart in your user profile..

vi ~/.config/autostart/teams.desktop

#set autostart to false

X-GNOME-Autostart-enabled=false

#lock file from write changes.

sudo chattr +i ~/.config/autostart/teams.desktop
4

After opening teams, click on your profile picture on the top right corner and then settings. Under General uncheck "Auto-start application".

Open teams->click profile image->settings->uncheck Auto-start application

2
  • This is the simplest solution Commented Apr 30, 2021 at 7:00
  • for me it wasn't my profile image, but the "..." next to my image Commented Jul 17, 2021 at 1:12
1

Another way is to replace Exec command in autostart file ~/.config/autostart/teams.desktop to something different like Exec=/bin/true and disallowing writing to this file with the following command: chmod 440 ~/.config/autostart/teams.desktop

as after each run MS Teams will restore content of this file

It is impossible at this moment to disable autostart in settings without having an account in Team (account is not required when joining always as a guest)

Also it's possible to join call in chromium based browser (firefox is not supported)

1

As D. Foster answer but you may have to search for desktop file;

search for "teams.desktop" in your home directory

edit the file e.g. ~/snap/teams/6/.config/autostart/teams.desktop set X-GNOME-Autostart-enabled=false

prevent changes to file;

sudo chattr +i ~/snap/teams/6/.config/autostart/teams.desktop

0

Following the main answer by @Archisman Panigrahi, here's what the new interface looks like:

Left-click the blue Teams icon in the top-right of Ubuntu --> click "Settings" --> click "Do not auto-start Teams."

enter image description here

Reboot and you'll see it did NOT automatically start up this time! THANK YOU.

There's a reason I left Microsoft and went to Linux Ubuntu (Microsoft was too controlling), and not being able to disable Teams from the Ubuntu startup menu was feeling just like that (Microsoft being too controlling) all over again.

You must log in to answer this question.

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