If you start an application from a terminal you can see the output to stdout and stderr, but if an application is started from the window manager, where does the output to these files typically go? To /dev/null?
migrated from serverfault.com Aug 14 at 13:06
This question came from our site for professional system and network administrators.
|
The output of an application started from the window manager goes to the same place as the output from the window manager itself. (Unless the application redirects it, but typical GUI applications don't.) You can find out where the WM's output goes by looking at what it has open on file descriptor 1 (standard output) and file descriptor 2 (standard error); typically both will go to the same file. Find out the process ID of your window manager (try e.g.
and look for the lines corresponding to file descriptors 1 and 2, or or
You can automate the filtering of the relevant file descriptors:
(Note: all the commands above are for Linux. In the common situation where you're running commands from a shell running in a terminal emulator (xterm, konsole, gnome-terminal, etc., but not when used across screen or tmux), then you can easily check where the terminal emulator's output is going, as the terminal emulator is the parent process of your shell. This doesn't work if the terminal emulator is running with additional privileges, which happens on some systems to allow the terminal emulator to write to the logged-in user list (utmp).
Many distributions direct the output of the X session to | |||||||||||||
|
|
The window manager is the child of the X server, so it and its children's output go to the same place as the X server. If you are the only user and you login graphically, some systems displace the X server instance from the output console, meaning you can switch to that VT and see it. Anecdotally, the arrangement is usually that If you don't log in via a GUI, it will be whatever VT you started X from, which is a problem since you won't see that until you quit. I believe with a GUI login, XDM (the graphical login) runs as a privileged process, meaning it can pipe output to | |||||
|

ps fauxto check which tty/pts is associated with the process. if none or "?" it probably gets lost in the void. (this is just an idea, i can be wrong) – Kwaio Aug 14 at 9:39~/.xsession-errors– Shadur Aug 14 at 13:50