LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2017, 04:09 PM   #1
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 997
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
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.

Last edited by serafean; 03-17-2017 at 04:22 PM. Reason: clarify title
 
Old 03-17-2017, 05:04 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
1 members found this post helpful.
Old 03-19-2017, 05:52 AM   #3
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 997

Original Poster
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
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.
 
Old 03-19-2017, 06:01 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Systemd service: AUTOSSH.service does not start at boot, how can I fix this? The_Linux_Machine Linux - Newbie 1 07-06-2016 12:00 PM
Can't access full journalctl from script via systemd service even though user is in systemd-journal group iwtbf Linux - Newbie 0 02-19-2016 02:44 PM
systemd service aagaag Linux - Newbie 1 01-18-2016 07:42 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration