You are not logged in.

#1 2022-07-31 00:20:34

GivenToFly17
Member
Registered: 2022-03-29
Posts: 3

Running a script before SDDM loads

Whats the best way to have a script run before SDDM loads?  I wrote a script that will enable/disable the touchpad based on how it was when the laptop was turned off.  I can't seem to get it to run before SDDM, instead it seems no matter where i put it, it will only run when KDE starts.  I would like it to be run before SDDM, so that if it's disabled when the system was shut down, it will stay disabled on restart.  Currently, no matter the state, it will be enabled in SDDM, then disabled for KDE if it was disabled at shutdown.

Hope that makes sense.  Any guidance would be appreciated

Offline

#2 2022-07-31 04:10:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 18,648

Re: Running a script before SDDM loads

Sounds like you want to write a systemd service that is wanted by the multiuser.target.  sddm starts with the graphical.target and does not start until after multiuser.target.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2022-07-31 23:25:29

GivenToFly17
Member
Registered: 2022-03-29
Posts: 3

Re: Running a script before SDDM loads

Thanks, I didn't try that.  I will give it a shot!

Offline

#4 2022-08-02 11:31:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 16,718

Re: Running a script before SDDM loads

If you are relying on xinput or so which would mean you need to have a runnning Xorg you can configure a script under /usr/share/sddm/scripts/Xsetup (make it executable and give it a proper shebang) to run commands while in a Xorg context for SDDM

Offline

Board footer

Powered by FluxBB