Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [SOLVED] Where are the data of an application which i see on the terminal.

    General and Desktop
    3
    6
    2317
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      terietor last edited by

      Hello,

      if i open a Qt application using a terminal,some "nice: input will appear in my screen.If i don't use a terminal and i use for instance a quick launcher this output will not appear.

      How can i get this output?

      thanks in advance

      terietor.gr

      1 Reply Last reply Reply Quote 0
      • D
        ddurhamdavyandbeth.com last edited by

        (Assuming Linux/X11 here).

        It completely depends on the session/window manager and your distro, but stdout and stderr usually get redirected to something like $HOME/.xsession-errors

        if you run "tail -f $HOME/.xsession-errors" in a terminal and then run your appliance from your window manager, then you'll probably see what you're interested. "tail -f" says to "follow" the file by continuously checking if anything new has been written to it. And starts out reading from the end of the file (and doesn't dump the whole thing to the screen).

        One caveat is that due to output buffering when stderr/stdout is not being written to a terminal, sometimes the most recent line written by the app may be delayed or not appear until the next line is output or the process ends. But hopefully that won't be an issue for you.

        1 Reply Last reply Reply Quote 0
        • T
          terietor last edited by

          thank you for your help.

          But this doesn't satisfy my needs.
          Can i get these info using c++/Qt?

          terietor.gr

          1 Reply Last reply Reply Quote 0
          • G
            goetz last edited by

            If there is no terminal attached where should that output go?

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • D
              ddurhamdavyandbeth.com last edited by

              From your original post I thought you might just need to see it.

              If you need to hook it in C++, see http://doc.trolltech.com/4.7/qtglobal.html#qInstallMsgHandler

              1 Reply Last reply Reply Quote 0
              • T
                terietor last edited by

                thanks that one is suitable for me

                terietor.gr

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post