Where do X error messages go?

If I start an X application from a terminal, the error messages go to the terminal. If I start them from a GUI, where do the error messages go, or alternatively how are they dealt with?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

Display managers such as xdm & gdm usually capture stderr from the processes they start and log it to a file such as /var/log/xdm.log or /var/log/gdm/:0.log. That includes the output from the X server being started.

Once your session starts, it may redirect output from the session processes to a file such as ~/.xsession-errors as tante pointed out in his answer.

Solution 2

Usually all generic X errors (and those of some applications) go to the file ~/.xsession-errors.

Solution 3

They go to whatever terminal the X server was started from. If you boot to command line and then start X, you can see them by hopping back to that VT (hit Ctrl-Alt-F1). If you boot directly to X, I’m not sure where the messages show up by default; it may vary by distro.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply