TeamsActivo

How to keep Teams active on Linux

On Linux, Teams runs as a web app in Chrome, Edge or Chromium, or through a client such as teams-for-linux, and all of them decide you are Away from the idle time of your desktop session. TeamsActivo is a small Python service that moves the pointer 1 pixel and back after 60 seconds of inactivity. On X11 it works with standard tools. On Wayland it needs ydotool to produce real input.

How Teams decides you are Away on Linux

There is no single Teams app on Linux. People use the web app at teams.microsoft.com installed as a PWA in Chrome, Edge or Chromium, or a client such as teams-for-linux. Whichever you use, it reads the idle time of the graphical session and marks you Away after about 5 minutes. The background is in the guide to keeping your Teams status Available.

Inhibiting the screensaver or suspend (what tools like systemd-inhibit do) keeps the screen on but does not reset that idle time. It is the same gap described in caffeinate and PowerToys Awake for Teams.

What works on X11, GNOME Wayland and KDE

TeamsActivo support by Linux session type.
SessionHow idle time is readHow activity is simulatedWhat to install
X11 (any desktop)The X screensaver extension, or xprintidlexdotool, or XTest directlyxdotool and xprintidle, or the libXss and libXtst libraries
GNOME on WaylandThe Mutter idle monitor over D-Busydotool, plus the desktop call that reports user activityydotool with its daemon running
KDE Plasma (X11 or Wayland)The session idle time over D-Busydotool or xdotool, plus the desktop call that reports user activityydotool on Wayland, xdotool on X11
Anything elseNot measured. It falls back to a pulse every 60 secondsWhatever tool is availableOne of the tools above

The only hard requirement is Python 3.6 or later, using just the standard library. The backend is detected automatically from your session type and desktop.

The Wayland limit, stated plainly

Wayland does not let one application inject input events into others. xdotool and XTest only reach XWayland and do not reset the idle timer of the compositor. The one generic way to produce real input is ydotool, which writes to /dev/uinput. It needs its daemon, ydotoold, running, and your user needs permission on /dev/uinput.

Without ydotool on GNOME Wayland, TeamsActivo can still stop the screen from blanking and locking, but the idle time that the desktop reports keeps growing, and a browser or client that reads it can still mark you Away. On KDE, the desktop call that reports user activity usually resets the session idle timer.

If you are on GNOME Wayland and cannot set up ydotool, a hardware device is the simpler route. See mouse jiggler or TeamsActivo.

How it detects that Teams is open

  • Processes named teams-for-linux, teams, ms-teams or teams-insiders, plus any names you add to the configuration.
  • A Teams PWA in Chrome, Edge, Chromium or Brave, recognised from how the browser launched it.
  • A browser started with a Teams address on its command line.
  • On X11, a window whose title contains "Microsoft Teams" (needs wmctrl).

A regular Teams tab inside a browser that was already open cannot be detected on Wayland. Install Teams as a PWA, or start TeamsActivo in manual mode with teams-activo --manual.

Commands and configuration

Useful teams-activo commands.
CommandWhat it does
teams-activoStarts with a tray icon if pystray and Pillow are installed. Otherwise runs in the terminal
teams-activo --activarEnters your licence key
teams-activo --statusPrints the state of the running instance as JSON
teams-activo --toggleSwitches it on or off
teams-activo --dry-run --once -vDiagnoses your session without moving the pointer or inhibiting anything
teams-activo --quitExits cleanly and releases every inhibitor

Settings live in ~/.config/teams-activo/config.json. The defaults are automatic mode on, work hours off (Monday to Friday, 08:00 to 19:00 when enabled), and a stop after 4 hours without real use. The service log is available with journalctl --user -u teams-activo -f.

The tray icon is optional. It needs pystray and Pillow, and on GNOME also the AppIndicator extension. Without them the service works the same from the command line.

Limits on Linux

  • Locked session. TeamsActivo pauses and releases its inhibitors, so the screen can turn off and the computer can suspend. Teams shows Away.
  • Manual lock and suspend. It never blocks them. Only idle is inhibited, not sleep, the lid or the power keys.
  • Hours without real use. After 4 hours without you touching the computer it stops, and it resumes when you come back.
  • Managed machines. If your organisation enforces a screen lock, that policy takes priority.

Use it on your own computer and within your organisation's policies.

How to install TeamsActivo on Linux

  1. Start the trial. Subscribe at teams-active.es. The licence key arrives by email.
  2. Install the tools for your session. On X11 install xdotool and xprintidle. On Wayland install ydotool and make sure its daemon, ydotoold, is running. Python 3.6 or later is required in both cases.
  3. Download and unpack. Get the Linux download from the downloads page and unpack it.
  4. Run the installer. Run ./install.sh in the unpacked folder. It installs a systemd user service and the teams-activo command. Use ./install.sh --autostart if you prefer a desktop autostart entry.
  5. Enter the licence key. Run teams-activo --activar and paste your key, or use the tray menu if you installed the tray icon.
  6. Check that it works. Open Teams and run teams-activo --status. It shows whether Teams was detected and which tools are used to simulate activity.

Frequently asked questions

Does TeamsActivo work on Wayland?

Yes, with ydotool. Wayland does not allow one application to send input to others, so ydotool and its daemon are needed to produce input that resets the idle time. Without it, on GNOME Wayland the app can keep the screen on but Teams may still show Away.

Does it work with the Teams PWA and with teams-for-linux?

Yes. Both read the idle time of your desktop session, which is what TeamsActivo acts on. Automatic mode detects teams-for-linux by its process and a PWA in Chrome, Edge, Chromium or Brave by how the browser launched it.

Why does it not detect Teams in a normal browser tab?

A tab inside a browser that was already open leaves no trace in the process list. On X11 it can be detected by window title while the tab is visible. On Wayland it cannot. Install Teams as a PWA or use manual mode.

Does it need root?

TeamsActivo itself runs as your user, as a systemd user service or an autostart entry. Installing packages such as xdotool or ydotool, and giving your user access to /dev/uinput for ydotool, are system changes that do need administrator rights.