LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   man:systemd.service ExecStart=@ prefix - what does it do? (https://www.linuxquestions.org/questions/linux-software-2/man-systemd-service-execstart%3D%40-prefix-what-does-it-do-4175602023/)

serafean 03-17-2017 04:09 PM

man:systemd.service ExecStart=@ prefix - what does it do?
 
Hi,

I'm reading the systemd.service man page, and can't figure out what this part of the ExecStart description means :
Quote:

For each of the specified commands, the first argument must be an absolute path to an executable. Optionally, if this file name is prefixed with "@", the second token will be passed as "argv[0]" to the executed process, followed by the further arguments specified.
And even less how to use it.

Any ideas?

Thanks.

ondoho 03-17-2017 05:04 PM

i think argv[0] is the same as $0 on a shell; it is the name of the program being executed.
so you could tell the program defined by execstart that it runs under a different name?
i know this can be useful at times.

serafean 03-19-2017 05:52 AM

Thanks! I was confused about changing only the name part.
Could you please give an example of when it could be useful? I can't come up with any.

Thanks.

ondoho 03-19-2017 06:01 AM

here you are:
Quote:

Originally Posted by man rofi
DMENU REPLACEMENT
If argv[0] (calling command) is dmenu, rofi will start in dmenu mode. This way it can be
used as a drop-in replacement for dmenu. just copy or symlink rofi to dmenu in $PATH.

ln -s /usr/bin/rofi /usr/bin/dmenu



All times are GMT -5. The time now is 12:38 PM.