What is the reason that /etc/init.d/ does not exist?
Can I build manually?
Because Manjaro does not use init
. It uses systemd
.
What is the difference between these two paths?
Better in which route is to be made?
/lib/systemd/system/
/etc/systemd/system/
You might find the answer here - or a way to it:
How many ExecStart= can be created?
true?
[Unit]
Description=my simple service
[Service]
Type=oneshot
ExecStart=command1
ExecStart=command2
ExecStart=command3
[Install]
WantedBy=multi-user.target
First and foremost, you have to understand the UNIX/POSIX Fileystem Hierarchy Standard.
In Arch and Arch-derivatives like Manjaro, /lib
is a symbolic link to /usr/lib
. Anything under the /usr
hierarchy must be regarded as read-only and only ever written to by the system’s package management system — i.e. during package installation or removal, and during system upgrades.
/etc
is the directory holding the system-wide configuration files. These are all plain-text files.
User-specific configuration files are stored in the user’s home directory, commonly under ~/.config
and/or ~/.local/share
, although some applications — e.g. emacs
— prefer using their own “dot directory” directly under ~/
.
For more information, see the Filesystem Hierarchy Standard.
This link brings you directly to the answer to your question:
Whether the rest of your example is correct I don’t know.
this will work? Instead of creating a systemd service, create a direct script in the above path?
sudo nano /etc/systemd/system/myscript.sh
No, this will not work.
So how can you run without systemd script root when the system startup?
Do you even search before you ask here?
I asked google “how to run a script on login xfce”
and got this among many others:
https://unix.stackexchange.com/questions/780992/how-to-run-script-on-xfce4-logon-and-logoff
Modify the search if you want a more generic answer - shell startup files can be used.
You don’t. If you don’t like systemd, you should switch to a systemd free distribution like Devuan.
I searched but it does not support the script with root access
one more time:
for what you said you want to do
which is: removing the contents of ~/.cache
you do not need root access
For nothing that happens inside your $HOME directory is root / sudo ever needed.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.