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!
The only method I have found so far to solve the problem is configuring settings in Teams:
Note: In some versions, you can right click the system tray icon and disable autostart right there.
The following methods do not work.
Another way is to achieve this is to add the following line into your
~/.profile
file :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
.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):
Change
appPreferenceSettings.openAtLogin
tofalse
, 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:
For me, the config file is located in the parent directory of
TEAM_LOGS
that is set by that script.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
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..
#set autostart to false
#lock file from write changes.
Another way is to replace Exec command in autostart file
~/.config/autostart/teams.desktop
to something different likeExec=/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)
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