[SOLVED] Where are the data of an application which i see on the terminal.
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
(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.
thank you for your help.
But this doesn't satisfy my needs.
Can i get these info using c++/Qt?
If there is no terminal attached where should that output go?
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
thanks that one is suitable for me