Am Mon, May 15, 2023 at 10:44:37PM +0530 schrieb Susmita/Rajib: Hello Rajib,
> My dear illustrious List members and leaders of the Debian-users group: > I used the contents in the following webpages: > https://www.tutorialspoint.com/run-a-script-on-startup-in-linux > https://www.baeldung.com/linux/run-command-start-up > > I saved a file at "/etc/systemd/system/" named "rc-local.service" with > the following lines: > ------------------------------------------------ > [Unit] > Description=/etc/rc.local Compatibility > ConditionPathExists=/etc/rc.local > Description=Screensaver > > [Service] > Type=forking > ExecStart=/etc/rc.local start > TimeoutSec=0 > StandardOutput=tty > RemainAfterExit=yes > SysVStartPriority=99 > ExecStart=mousepad > Restart=always > User=root > Group=root > Type=simple > > [Install] > WantedBy=multi-user.target > ------------------------------------------------ > > I also added the line in the file /etc/rc.local: > mousepad > > But the program doesn't launch at startup. Where I am going wrong? > Does it fail to start because the command is run before the GUI starts > up? > > I don't want to use cron by editing crontab -e. I tried @reboot > mousepad, but doesn't work. > > Please advise. Have you already enabled your script with the systemd command? This is from the first link you have provided: Enable the service by running the following command "sudo systemctl enable yourscriptname.service" Start the service by running the following command "sudo systemctl start yourscriptname.service" If the service enabled and started please check the output of systemctl --failed. The command systemctl status yourscriptname.service should give information even if the service is running. Kind regards, Christoph -- Ist die Katze gesund schmeckt sie dem Hund.
signature.asc
Description: PGP signature