Commands to disable autostart on Steamdeck.

Hello, I followed a tutorial to install Syncthing on Steamdeck, and to enable autostart, copying syncthing.service file, and entering the 2 konsole commands:

systemctl --user enable syncthing

systemctl --user start syncthing.

The tutorial says that to disable the autostart, I have to enter the same 2 commands and in the same order, which sounds a little weird to me, and it doesn’t seem to work, in fact.

How can I do?

Try this to disable auto-starting:

systemctl --user disable --now syncthing
1 Like

Thank you. I did it and says

Removed “/home/deck/.config/systemd/user/default.target.wants/syncthing.service”

Guess it’s done? Sorry, I’m not very good on Linux.

Yes, it’s done.

Without some context, the message from systemctl disable can be a little puzzling. :smirk:

The command…

systemctl --user enable syncthing.service

… creates a soft link from /home/deck/.config/systemd/user/default.target.wants/syncthing.service:

/
└── home
   └── deck
      └── .config
         └── systemd
            └── user
               └── default.target.wants
                  └── syncthing.service -> /usr/lib/systemd/user/syncthing.service

… that points to the service “unit” file /usr/lib/systemd/user/syncthing.service:

/
└── usr
   └── lib
      └── systemd
         └── user
            └── syncthing.service

Every time Linux boots and launches systemd, systemd scans a bunch of predefined directories including user homes where it finds your configured services under /home/deck/.config/systemd.

The counterpart to systemctl enable removes the soft link:

systemctl --user disable syncthing.service

Because systemctl is simply adding/removing soft links, the following command effectively does the same thing:

ln -s /usr/lib/systemd/user/syncthing.service /home/deck/.config/systemd/user/default.target.wants/syncthing.service

Systemd doesn’t require using soft links, but it’s convenient. Copying the unit file is also fine:

cp /usr/lib/systemd/user/syncthing.service /home/deck/.config/systemd/user/default.target.wants/syncthing.service

The --user flag tells systemctl to put the soft link under /home/deck/.config/systemd/user/ instead of /etc/systemd/user/ or /usr/local/systemd/user/.

The --now flag tells systemctl that you want the change to take effect immediately instead of after a reboot or requiring a systemctl stop or systemctl start.

1 Like

Thank you very much, guys. You were very helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.