Score:0

Manually Start a Systemctl Script After Boot Up

lk flag

Using Ubuntu 20.04 I'm trying to start a systemctl script (ModemManager) but I want to start it up only when I'm at the desktop. I currently use:

 systemctl enable ModemManager.service
 systemctl start ModemManager.service  

The problem with just using these is that I have to disable and stop the service before shutdown or else it's going to boot up as enabled by default.

Is there any way to bypass the disabling part?

ru flag
You don't *have* to enable the service to start the service, enable and disable determines autostart but you can still manually start the service. Have you tried `sudo systemctl disable ModemManager.service`, then done `sudo systemctl start ModemManager.service` and then rebooted and seen if Modem Manager actually loads on reboot? It shouldn't since the service is disabled (but was *manually* - not automatically - started)
Ash  avatar
lk flag
Thanks, I did try this but ModemManager.service doesn't seem to do anything but I think this may just be this specific service file
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.