Results 1 to 3 of 3

Thread: Detecting running programs in Linux

  1. #1
    Join Date
    Jul 2007
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question Detecting running programs in Linux

    Does anyone know how to detect some/all programs that running in Linux system,
    here is the result from ps x for example

    bash -ls
    knotify [kdeinit]
    /bin/bash
    /bin/sh /usr/bin/thunderbird
    /bin/sh /usr/lib/thunderbird/run-mozilla.sh /usr/lib/thunderbird/thunderbird-bin
    /usr/lib/thunderbird/thunderbird-bin -contentLocale US -UILocale en-US
    /usr/libexec/gconfd-2 17
    assistant
    gaim

    i want detect e.g thunderbird or containing,
    if already running or not directly from qt.
    thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Detecting running programs in Linux

    You can find the ps or top sources in the distribution sources. Then you can take the code from there and put it in your Qt application.

    Although, I think they are using /proc to get the infos.

    Another way is to run ps or top with QProcess and analyze their output.

  3. #3
    Join Date
    Oct 2007
    Posts
    17
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Detecting running programs in Linux

    This reminds me of a similar thread on a different forum that I saw a while back.
    The fourth post down might be helpful.

Similar Threads

  1. Replies: 3
    Last Post: 1st February 2007, 20:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.