21

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!

2
  • 2
    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). Jun 27 '20 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. Jun 27 '20 at 8:26
15

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.
7
  • Isn't it the same as unchecking it in the Startup Applications ? Jun 27 '20 at 8:38
  • No. When you open Teams the next time, it will again register itself to startup application. I was referring to settings within teams Jun 27 '20 at 8:42
  • OK.So that's the ultimate option that disables this behavior.Thanks. Jun 27 '20 at 8:43
  • 1
    Thanks to both of you for your answers! I prefer this quick one-time-action over deleting some profile every time I turn on my laptop. Jun 27 '20 at 10:06
  • 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. Apr 28 at 14:07
8

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.

3
  • 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. Jun 27 '20 at 8:48
  • @ArchismanPanigrahi Yes you're right but I'm pretty confident that the profile file is executed first.I've tried a similar solution before.Because the login shell executes the profile file when the DE is still starting.But also it can be dependent on the DE's preferences. Jun 27 '20 at 8:50
  • 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. Apr 28 at 14:11
3

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 Apr 30 at 7:00
  • for me it wasn't my profile image, but the "..." next to my image Jul 17 at 1:12
1

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.

0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.