Locating Discord auto-start cause

Hello! I’ve been using EndeavourOS and Linux for a while now, so I’d like to think that I roughly know what’s going on and how to solve problems on my own, but this has me totally stumped. Discord launches itself every day when I log in; while I don’t entirely mind this, I would like to at least be able to disable it if I so desired. However:

  • The autostart setting is disabled in Discord
  • There is nothing to start Discord in ~/.config/autostart
  • There’s nothing in .bash_profile that might do this
  • There is no service like “discord.service” that is starting it, not in systemctl or systemctl --user
  • There IS a transient service for discord within systemctl --user, called “app-discord@[a lot of numbers, seems to change every boot].service”

I’m totally lost on how to figure how what is launching this transient service on login, since ps only shows the parent process as systemd, as you’d expect. I’ve even tried find- and grep-ing my entire system from /, with the hope that I could find a file with a name or contents that may relate to this, but no dice (at least, in grep’s case there were so many files that it was unhelpful. Any advice or search ideas are super appreciated… I hate feeling like Discord’s gotten the better of me on my own computer. I’m near the point at which I might just re-install Discord, but I’d rather search a little more before doing that, and maybe learn something at the same time. Thanks in advance!

obligatory inxi: https://dpaste.com/52B5B8UR2

Is it by chance in the system settings autostart?

Nopers- in Plasma’s autostart page, the only item is for easyeffects, which is good.

Ok at least that rules that out, I have to head out now but hopefully you’ll be able to get a solution

Welcome to the forum :enos_flag: :enos:
In system settings>desktop session there is a option to start with a empty session, have you tried that ?
On another note your bios is very out of date as far as I can see , if only for safety sake I would consider to flash it to the latest version.

Hi @Citg

Welcome to the forum. :confetti_ball:

Can you give the output of

cat ~/.config/autostart/discord.desktop

List autostart services.

ls /run/user/$(id -u)/systemd/generator.late/xdg-desktop-autostart.target.wants/

If app-discord appears there, that confirms it. Then:

systemctl  cat app-discord@autostart.service

or

systemctl --user cat app-discord@autostart.service

Find the SourcePath= and identify the .desktop file, then fix with Hidden=true.

This really is very weird as it doesn’t happen on my end. What version of discord are you using? As there are many versions (discord, discord-arch-electron, discord-ptb, discord-canary, flatpak version,…).
I am using the flatpak version of discord (as it was easier to update, which they currently are fixing for the other versions) and for me doing the setting under “Linux-Settings” → “Turn off Auto-Start” was all i needed to do. Maybe there is a bug in the other versions, or you are using the public test build (ptb) or alpha (canary) version of it which maybe has this problem currently.

Yes, I use that setting already- it was like the first setting I ever toggled, lol.

I’m using the extra/discord package, as I just want to have the standard version and personally don’t love flatpaks.

Unfortunately:

  1. No such file or directory

  2. A few apps in the list, but none of them are Discord nor do any have a weird name that might be Discord in disguise

  3. No files found for app-discord@autostart.service.

@Citg

Just to be confirmed, the obvios output of.

# Check system-wide XDG autostart locations
ls /etc/xdg/autostart/ | grep -i discord

# If found, inspect it
cat /etc/xdg/autostart/discord.desktop
cp /etc/xdg/autostart/discord.desktop ~/.config/autostart/discord.desktop

set

Hidden=true

My mind is a bit wobbly about this issue :upside_down_face:

Drat, I got excited as I hadn’t known about that directory, but once again theres nothing about Discord in there. :frowning: I also checked /etc/xdg/systemd but no dice.

Thank you for the help so far, by the way.