-:0 What process is it? - Ubuntu

This is a discussion on -:0 What process is it? - Ubuntu ; When I "ps aux", there is always a process, "-:0". Is this normal? What is it? If I kill that process, my computer reboots, or more likely, X does. My terminology here could be wrong....

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 26

Thread: -:0 What process is it?

  1. -:0 What process is it?

    When I "ps aux", there is always a process, "-:0". Is this
    normal? What is it?

    If I kill that process, my computer reboots, or more
    likely, X does.

    My terminology here could be wrong.

  2. Re: -:0 What process is it?

    don wrote:
    > When I "ps aux", there is always a process, "-:0". Is this
    > normal? What is it?
    >
    > If I kill that process, my computer reboots, or more
    > likely, X does.
    >
    > My terminology here could be wrong.


    Here:
    (single line of ps aux output
    root 5424 0.0 0.0 53384 1632 ? S 08:42 0:00 -:0

    $ sudo ls -l /proc/5424/exe
    [sudo] password for josef:
    lrwxrwxrwx 1 root root 0 2008-07-14 16:33 /proc/5424/exe -> /usr/bin/kdm

    So, it's related to the KDE desktop manager.
    Killing it will indeed restart your GUI.

    Josef
    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html

  3. Re: -:0 What process is it?

    On 2008-07-14, Josef Moellers wrote:
    > Here:
    > (single line of ps aux output
    > root 5424 0.0 0.0 53384 1632 ? S 08:42 0:00 -:0
    >
    > $ sudo ls -l /proc/5424/exe
    > [sudo] password for josef:
    > lrwxrwxrwx 1 root root 0 2008-07-14 16:33 /proc/5424/exe -> /usr/bin/kdm
    >
    > So, it's related to the KDE desktop manager.
    > Killing it will indeed restart your GUI.
    >
    > Josef



    Thanks, Josef. So this is a normal process? I ask because I
    am having a destop type problem which I am still
    researching. I was hoping the -:0 was a clue.


  4. Re: -:0 What process is it?

    don wrote:
    > When I "ps aux", there is always a process, "-:0". Is this
    > normal? What is it?
    >
    > If I kill that process, my computer reboots, or more
    > likely, X does.
    >
    > My terminology here could be wrong.
    >



    You are killing and then restarting X (X11, X.org, XFree86, x-whatever).

    The "-:0" indicates "Screen 0" or the first one assigned in X.

    Using GNOME, my Ubuntu 6.06 shows the ps aux differently that Josef's
    KDE (and does not have the leading hyphen):

    root 4450 15.4 13.2 173744 132824 tty7 Ss+ Jul05 1964:10
    /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

    (The above line is likely to wrap in some newsreaders.)

    You can use the ps -ef options instead, which will provide the parent
    PID (PPID). You can work your way back up through the parent PIDs to see
    how each one was spawned as a child PID:

    john@ubuntu6.06:~$ ps -ef
    UID PID PPID C STIME TTY TIME CMD
    root 1 0 0 Jul05 ? 00:00:01 init [2]



    root 4424 1 0 Jul05 ? 00:00:00 /usr/sbin/gdm
    root 4441 4424 0 Jul05 ? 00:00:00 /usr/sbin/gdm
    root 4450 4441 15 Jul05 tty7 1-08:44:00 /usr/bin/X :0 -br
    -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

    Here, the child PID 4450, spawned by the parent PID 4441 "gdm"
    essentially shows the same thing as Josef's KDE process, with the
    differences being gdm instead of the kdm.

    It also indicates Screen 0 (:0) is to be displayed on vt7 (Virtual
    Terminal #7), which is accessible via

    You can, for instance, start additional GUI sessions on different
    screens. Just use one of the console TTY terminals (
    through ) and enter:

    startx -- :1

    Which will fire up a GUI session accessible with .

    The :2 screen would appear on etc. Unix is a true
    multiprocess and multiuser OS.

    The ps -ef is one process snoop that you might want to remember because
    it does a lot of PPID detective work for you.

    --
    John

    No Microsoft, Apple, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

    The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.

  5. Re: -:0 What process is it?

    On 2008-07-14, John F. Morse wrote:

    >
    > You are killing and then restarting X (X11, X.org, XFree86, x-whatever).
    >
    > The "-:0" indicates "Screen 0" or the first one assigned in X.
    >
    > Using GNOME, my Ubuntu 6.06 shows the ps aux differently that Josef's
    > KDE (and does not have the leading hyphen):
    >
    > root 4450 15.4 13.2 173744 132824 tty7 Ss+ Jul05 1964:10
    > /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
    >
    > (The above line is likely to wrap in some newsreaders.)
    >
    > You can use the ps -ef options instead, which will provide the parent
    > PID (PPID). You can work your way back up through the parent PIDs to see
    > how each one was spawned as a child PID:
    >
    > john@ubuntu6.06:~$ ps -ef
    > UID PID PPID C STIME TTY TIME CMD
    > root 1 0 0 Jul05 ? 00:00:01 init [2]
    >
    >
    >
    > root 4424 1 0 Jul05 ? 00:00:00 /usr/sbin/gdm
    > root 4441 4424 0 Jul05 ? 00:00:00 /usr/sbin/gdm
    > root 4450 4441 15 Jul05 tty7 1-08:44:00 /usr/bin/X :0 -br
    > -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
    >
    > Here, the child PID 4450, spawned by the parent PID 4441 "gdm"
    > essentially shows the same thing as Josef's KDE process, with the
    > differences being gdm instead of the kdm.
    >
    > It also indicates Screen 0 (:0) is to be displayed on vt7 (Virtual
    > Terminal #7), which is accessible via
    >
    > You can, for instance, start additional GUI sessions on different
    > screens. Just use one of the console TTY terminals (
    > through ) and enter:
    >
    > startx -- :1
    >
    > Which will fire up a GUI session accessible with .
    >
    > The :2 screen would appear on etc. Unix is a true
    > multiprocess and multiuser OS.
    >
    > The ps -ef is one process snoop that you might want to remember because
    > it does a lot of PPID detective work for you.
    >


    Thank you John. I'm going to have to wait until tommorrow
    to carefully follow your reply. I think you provided some
    good information but I'm too tired now to give it proper
    attention.

    Do you (or anyone) know why when I do
    aux | grep -i "-:0"
    I get the following message:
    grep: invalid option -- :
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try `grep --help' for more information.


  6. Re: -:0 What process is it?

    don wrote:

    > Do you (or anyone) know why when I do
    > aux | grep -i "-:0"
    > I get the following message:
    > grep: invalid option -- :
    > Usage: grep [OPTION]... PATTERN [FILE]...
    > Try `grep --help' for more information.



    It is because grep sees the colon ( as the argument (the option) for
    the hyphen (-). Similar to the "-i" option for insensitive case.

    You will need to "escape" it somehow, and I can't find a solution that
    works. None of the escapes and quotes I am familiar with seem to work,
    nor does egrep.

    Without the hyphen and colon, you get practically the complete ps
    listing due to their widespread use.

    Someone more fluent in scripting will come along with a solution.


    --
    John

    No Microsoft, Apple, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

    The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.

  7. Re: -:0 What process is it?

    On 2008-07-15, don wrote:
    > On 2008-07-14, John F. Morse wrote:
    >
    >>
    >> ...

    >
    > Do you (or anyone) know why when I do
    > aux | grep -i "-:0"
    > I get the following message:
    > grep: invalid option -- :
    > Usage: grep [OPTION]... PATTERN [FILE]...
    > Try `grep --help' for more information.
    >


    Because grep thinks you are feeding it -:0 as an option (because it
    starts with -). To fix:

    ps aux | grep -- -:0

    (Single or double quotes are actually not needed here. Looking in the
    man page for grep, I don't see -- documented, so you might want to
    write it down, along with the fact that this will work for many modern
    [especially gnu] commands.)

    (-i [ignore case of letters] is not needed, since there are no letters
    in -:0)


    --


  8. Re: -:0 What process is it?

    Jim Cochrane wrote:
    > On 2008-07-15, don wrote:
    >
    >> On 2008-07-14, John F. Morse wrote:
    >>
    >>
    >>> ...
    >>>

    >> Do you (or anyone) know why when I do
    >> aux | grep -i "-:0"
    >> I get the following message:
    >> grep: invalid option -- :
    >> Usage: grep [OPTION]... PATTERN [FILE]...
    >> Try `grep --help' for more information.
    >>
    >>

    >
    > Because grep thinks you are feeding it -:0 as an option (because it
    > starts with -). To fix:
    >
    > ps aux | grep -- -:0
    >
    > (Single or double quotes are actually not needed here. Looking in the
    > man page for grep, I don't see -- documented, so you might want to
    > write it down, along with the fact that this will work for many modern
    > [especially gnu] commands.)
    >
    > (-i [ignore case of letters] is not needed, since there are no letters
    > in -:0)



    That appears to only provide the ps for the grep PID, not any of the
    screen :0 PIDs.

    --
    John

    No Microsoft, Apple, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

    The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.

  9. Re: -:0 What process is it?

    On 2008-07-14, Jim Cochrane wrote:
    > On 2008-07-15, don wrote:
    >> On 2008-07-14, John F. Morse wrote:
    >>
    >>>
    >>> ...

    >>
    >> Do you (or anyone) know why when I do
    >> aux | grep -i "-:0"
    >> I get the following message:
    >> grep: invalid option -- :
    >> Usage: grep [OPTION]... PATTERN [FILE]...
    >> Try `grep --help' for more information.
    >>

    >
    > Because grep thinks you are feeding it -:0 as an option (because it
    > starts with -). To fix:
    >
    > ps aux | grep -- -:0
    >
    > (Single or double quotes are actually not needed here. Looking in the
    > man page for grep, I don't see -- documented, so you might want to
    > write it down, along with the fact that this will work for many modern
    > [especially gnu] commands.)
    >
    > (-i [ignore case of letters] is not needed, since there are no letters
    > in -:0)
    >


    Thanks, Jim. I did write it down, but I'm not sure exactly
    what that option is used for. Ignore the minus?
    >


  10. Re: -:0 What process is it?

    In don:

    [Snip...]

    > what that option is used for


    If you're speaking of the "-i" option to grep, it means "ignore case" (in
    other words, case-insensitive) searching. From the grep manpage:

    -i, --ignore-case
    Ignore case distinctions in both the PATTERN and the input
    files.

    So, with "grep -i cat *", cat==CAT==CaT==caT (etc.) looking for a match.

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    I toss GoogleGroup posts from gitgo (http://improve-usenet.org).

  11. Re: -:0 What process is it?

    > On 2008-07-14, Jim Cochrane wrote:
    > On 2008-07-14, John F. Morse wrote:


    Thank you both. One final question: Is the -:0 a normal
    process for KDE?

  12. Re: -:0 What process is it?

    On 2008-07-15, Harold Stevens wrote:

    > If you're speaking of the "-i" option to grep....


    Thanks Harold. What I am refering to is the "--" option.
    I should have made that clearer.

  13. Re: -:0 What process is it?

    In don:

    [Snip...]

    > the "--" option


    Generally, it means anything following it, starting with a dash, is not a
    command-specific parameter. From the bash manpage:

    -- A -- signals the end of options and disables further option
    processing. Any arguments after the -- are treated as file-
    names and arguments. An argument of - is equivalent to --.

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    I toss GoogleGroup posts from gitgo (http://improve-usenet.org).

  14. Re: -:0 What process is it?

    don wrote:
    >> On 2008-07-14, Jim Cochrane wrote:
    >> On 2008-07-14, John F. Morse wrote:
    >>

    >
    > Thank you both. One final question: Is the -:0 a normal
    > process for KDE?
    >



    No, it is a screen number within the process.

    ":0" = "Screen Zero."

    As I previously mentioned, I do not get the hyphen when I run ps, but I
    am running GNOME, not KDE, if that matters.

    root 4450 15.0 12.0 158916 120776 tty7 Ss+ Jul05 2087:43
    /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7


    --
    John

    No Microsoft, Apple, AT&T, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

    The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.

  15. Re: -:0 What process is it?

    On 2008-07-15, John F. Morse wrote:

    > don wrote:
    >>
    >> Thank you both. One final question: Is the -:0 a normal
    >> process for KDE?
    >>

    >
    > No, it is a screen number within the process.
    >
    > ":0" = "Screen Zero."
    >
    > As I previously mentioned, I do not get the hyphen when I run ps, but I
    > am running GNOME, not KDE, if that matters.
    >
    > root 4450 15.0 12.0 158916 120776 tty7 Ss+ Jul05 2087:43
    > /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7



    At the risk of revealing my denseness, what I am asking, is
    it normal to see this line after running ps? I am having
    a problem at startup and wonder if the -:0 is a clue.
    Thanks for your patience.
    >
    >


  16. Re: -:0 What process is it?

    don wrote:
    > On 2008-07-15, John F. Morse wrote:
    >
    >
    >> don wrote:
    >>
    >>> Thank you both. One final question: Is the -:0 a normal
    >>> process for KDE?
    >>>
    >>>

    >> No, it is a screen number within the process.
    >>
    >> ":0" = "Screen Zero."
    >>
    >> As I previously mentioned, I do not get the hyphen when I run ps, but I
    >> am running GNOME, not KDE, if that matters.
    >>
    >> root 4450 15.0 12.0 158916 120776 tty7 Ss+ Jul05 2087:43
    >> /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
    >>

    >
    >
    > At the risk of revealing my denseness, what I am asking, is
    > it normal to see this line after running ps? I am having
    > a problem at startup and wonder if the -:0 is a clue.
    > Thanks for your patience.
    >



    Yes, it is a normal process.

    --
    John

    No Microsoft, Apple, AT&T, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

    The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.

  17. Re: -:0 What process is it?

    On 2008-07-15, Harold Stevens wrote:
    > In don:
    >
    > [Snip...]
    >
    >> the "--" option

    >
    > Generally, it means anything following it, starting with a dash, is not a
    > command-specific parameter. From the bash manpage:
    >
    > -- A -- signals the end of options and disables further option
    > processing. Any arguments after the -- are treated as file-
    > names and arguments. An argument of - is equivalent to --.
    >


    Yes, the -- option was introduced to solve this perplexing problem of
    how to pass an argument that starts with a - and not have it treated (by
    the program being invoked) as an option (as in 'grep -i'). A lot of
    UNIX command-line programs now use this convention, including grep; this
    is why:

    ps aux|grep -- -:0

    works, but not

    ps aux|grep -:0

    --


  18. Re: -:0 What process is it?

    On 2008-07-15, John F. Morse wrote:
    > don wrote:
    >>> On 2008-07-14, Jim Cochrane wrote:
    >>> On 2008-07-14, John F. Morse wrote:
    >>>

    >>
    >> Thank you both. One final question: Is the -:0 a normal
    >> process for KDE?

    >
    > No, it is a screen number within the process.
    >
    > ":0" = "Screen Zero."
    >
    > As I previously mentioned, I do not get the hyphen when I run ps, but I
    > am running GNOME, not KDE, if that matters.
    >
    > root 4450 15.0 12.0 158916 120776 tty7 Ss+ Jul05 2087:43
    > /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7


    Actually, there appears to be some confusion here because there are at
    least two processes (with KDE, at least) that contain a :0 in their
    command line - e.g., on my kubuntu 8.04 system:

    $ pgrep -lf :0
    4794 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-11MkVH
    4800 -:0


    There are two processes listed above - '/usr/bin/X' and '-:0'. -:0 is
    an odd name for a process and I suspect it is caused by a program that
    renames its arg[0] (0th argument that is conventionally the program name, as
    in /usr/bin/X) from something ordinary to -:0. Why does it do that? I
    don't know - perhaps because it is a KDE process that communicates with
    X and it is based on the X screen number - i.e., the n in :. John is
    not seeing this, so it appears to be a KDE thing, not a GNOME thing.

    Here's some more data from my system:

    $ ps -fu root|egrep '4789'
    root 4789 1 0 Jul10 ? 00:00:00 /usr/bin/kdm -config /var/run/kdm/kdmrc
    root 4794 4789 0 Jul10 tty7 00:05:01 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-11MkVH
    root 4800 4789 0 Jul10 ? 00:00:00 -:0



    From the above we see that procs 4794 and 4800 both have the same
    parent, 4789 and that this parent is kdm (K Desktop Manager -
    http://linux.about.com/cs/linux101/g/kdm.htm
    ).


    [Hi John. I meant to respond to your post (your response to my somewhat
    long essay) several weeks ago, but I got busy and then lost your post -
    had to switch to a new NNTP server when the one I was using flaked out,
    which caused me to loose track of which posts were read and not read.
    Anyway, it turned into a pretty good discussion, if I remember right.]

    --


  19. Re: -:0 What process is it?

    On 2008-07-15, don wrote:
    > On 2008-07-15, John F. Morse wrote:
    >
    >> don wrote:
    >>>
    >>> Thank you both. One final question: Is the -:0 a normal
    >>> process for KDE?
    >>>

    >>
    >> No, it is a screen number within the process.
    >>
    >> ":0" = "Screen Zero."
    >>
    >> As I previously mentioned, I do not get the hyphen when I run ps, but I
    >> am running GNOME, not KDE, if that matters.
    >>
    >> root 4450 15.0 12.0 158916 120776 tty7 Ss+ Jul05 2087:43
    >> /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

    >
    >
    > At the risk of revealing my denseness, what I am asking, is
    > it normal to see this line after running ps? I am having
    > a problem at startup and wonder if the -:0 is a clue.
    > Thanks for your patience.


    See my other post re. -:0, KDE and kdm, which sheds a bit more light on
    it; but you'll need to find a KDE expert (a different newsgroup, I would
    think) if you want to get the nitty-gritty on it (or whatever the lingo
    is these days).


    --


  20. Re: -:0 What process is it?

    On 2008-07-15, Jim Cochrane wrote:
    On 2008-07-15, John F. Morse wrote:

    Okay, you guys have given me plenty of information. Thank
    you both.

    >


+ Reply to Thread
Page 1 of 2 1 2 LastLast