How can I view stdout/stderr of a startup application?
I think the best thing to do would either put the bash command further below in startup or put it in a bash script and select that in your startup applications. I have added the -v
option so the application records all its actions with the greatest of detail; some applications have other verbosity settings and even various levels that you can specify.
The &>
redirection used is the same as 2>&1
in that it redirects all of the program's output (stderr, stdout
) to the specified file, i.e. &>/home/mike/redshift.log
.
Here is the command that could be used to set up logging, and it could be used for other programs, if modified appropriately.
bash -c "setsid /usr/bin/gtk-redshift -v -l 40.77:-73.9 -t 6500:5500 &>/home/mike/redshift.log"
These are just sample test settings, substitute these values for your own; you may want to put the command, modified appropriately in a bash wrapper for your startup entry as the above command-line is quite long.
An excerpt from the log created at /home/mike/redshift.log
:
Gamma ramp size too small: 0
Failed to start adjustment method randr.
Trying next method...
Location: 40.770000, -73.900002
Brightness: 1.00
Gamma: 1.000, 1.000, 1.000
Using method `vidmode'.
The log continues and should give you the information you need. Some programs such as vlc
do have options that you can set up so their logging can be sent to syslog, but I prefer that each program has its own separate log.