How to disable an enabled service that boots into a limited user with auto-start script?

Hi guys,

I have been following the excellent advice given by @mdegans in this post on how-to-run-a-script-on-boot and have almost got it working. Once I have it working I want to enable the service so the user no longer has to log in or even connect a mouse + keyboard, which I know I can do via sudo systemctl enable detection_app

However, if something were to go wrong or I needed to return back to the normal GUI with terminal access, how would I do it? I assume I would need to call sudo systemctl disable detection_app but will that just return it to standard? And will that be possible by just plugging in a PC and clicking CTRL-C or do I need to do something via the MicroUSB terminal port?

I’m a bit nervous because last time I played around with this I ended up somehow removing the GUI and disabling access to the kernal so I had to start from scratch, couldn’t find a way to back up the system as an easy install image and it took days to get back to the same point…

Any advice would be much appreciated!

EDIT: Corrected 'systemctr’l to ‘systemctl’


I don’t know what content is detection_app. And are you talking about “systemctl” or “systemctrl”?

Disabling some service in systemd will not remove anything.

Sorry, my explanation wasn’t very clear, let me try and rephrase:

I have folowed the tutorial/guidance from @mdegans to create a custom user within a user group that does not require a login, and runs a script to start my detection application when the device boots up. The user is called ‘detection_app’ and the plan is for it to boot up without needing a keyboard or mouse to login, just the screen is connected and a serial radio.
Following the steps in the post (see original question link), the next step is to enable the service so that the detection_app user logs in autmoatically, runs it’s startup scrips, and no human interaction is needed. To start this service, I will have to use sudo systemctl enable detection_app.

My question is:

  1. If I needed to disable the service and return back to admin login (booting up fully into the GUI), how would I go about doing it? If I enable the service, power-cycle the device and it doesnt oot up properly, what steps can I take to disable the service and return back to normal login?
  2. Is there a way to fully save the system (similar to windows restore point) in its current state, so that if it all goes tits up I can get back to the point i’m at now without having to reinstall every library and fight with openCV to install on the jetson again?

I’m asking this now before enabling it in case there is some settings I need to enable first that will allow me to save it should something go wrong, rather than trying to fix the problem after its happened!

Many thanks in advance.