Hello,
I have recently migrated from devuan to artix.When i run HTOP i can see that Firefox is running like this>
If i remeber well on Devuane i had in HTOP listing something like this>
When i want to get a PID of Firefox using PGREP, i get nothing .
echo $? returns 1, an error.
When i run Chromium, there is also no listing in HTOP like /usr/sbin/chromium but PGREP returns some PIDs
Well I do not whether this is a bug or feature?
Thanks for any suggestions or advice.
You might want to take a look at the
htop settings "hide userland process threads":
Thanks for a swift reply.
But my question is whether the HTOP does intentionally show FIREFOX process like
/usr/lib/firefox/firefox
AND NOT like
/usr/sbin/firefox
Why the PGREP commnad does not return Firefox s PID?
Thanks
what's the full pgrep command you're typing?
probably the way firefox is built from source for artix, using /usr/lib/firefox and then linking the binary in /usr/bin
waterfox is the same way:
Thanks for clearing things up, my answer was a way off then ... :D
As
@toxygen already mentioned, the different paths to the firefox executable are just a matter of packaging.
When you have a look at
/usr/bin/firefox, it's just a tiny shell script launching the firefox binary in
/usr/lib/firefox. So someone decided to put the whole firefox stuff to
/usr/lib/firefox/.
As to
pgrep, i'm not familiar with what behaviour would be expected, but it works fine as soon as i use the
-f switch:
$ pgrep -a -f -o firefox
3123 /usr/lib/firefox/firefox
Hello,
Thank you very much for explanation.When i run the command as you do
pgrep -a -o -f firefox
I get the awaited result >
3116 /usr/lib/firefox/firefox
I just do not understand why the PGREP command without the switches, does not return anything, ends with error?
As mentioned above when i run
pgrep chromium
, it returns the PID of chromium.
Any idea why?
Thanks