Question

I am using ubuntu. When I spawn a process from the Gnome desktop, it does not appear to be visible if I type ps -a in another terminal.

For example, if I launch Chrome or OpenOffice Calc, it is invisible if I open a shell and type ps -a.

Why is that and how can I see these processes?

Thanks, Tom

Was it helpful?

Solution

ps ax

will show that processes.


From the ps man page:

[-]a Select all processes except both session leaders (see getsid(2)) and processes not associated with a terminal.

processes started by gnome are not associated with a terminal and therefore will not being displayed

Then man page, again:

[-]x Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to the set of processes selected by other means. An alternate description is that this option causes ps to list all processes owned by you (same EUID as ps), or to list all processes when used together with the a option.

Means that option a together with option x displays all processes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top