42

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!

Anonymous5638
  • 661
  • 1
  • 9
  • 17

8 Answers8

37

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.
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.

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.

ThunderBird
  • 1,963
  • 13
  • 22
  • 31
fredrik
  • 211
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

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

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)

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.

Gabriel Staples
  • 11,502
  • 14
  • 97
  • 142