Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Some of the commands that I have in Startup Applications do not start properly when I login. (In particular I am having trouble with gtk-redshift.) In order to debug, I would like to be able to view stdout/stderr. I haven't found a log file for Startup Applications. I have tried redirecting to a file using ">> log.txt" with no success.

How can I see stdout/stderr for a Startup Application? Better yet, is there a log file for Startup Applications?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
Ahah! I should have thought of that. Thanks Mik. –  Adam Paetznick May 2 '13 at 23:12
add comment

Please check /var/log/syslog. Its common for all the applications.

share|improve this answer
    
I guess I should have been more explicit. I've checked /var/log/syslog, already. The startup applications in question do not make log entries to syslog. I also see no logs from any kind of Startup Application script/wrapper. –  Adam Paetznick May 2 '13 at 13:59
    
Would you mind disclosing the application names? –  thefourtheye May 2 '13 at 14:07
    
As stated in the question, the main culprit is gtk-redshift. Also troublesome is google-musicmanager. –  Adam Paetznick May 2 '13 at 17:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.