Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 53678  / 2 Years ago, wed, february 2, 2022, 7:16:09

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?


More From » log

 Answers
5

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.


[#31442] Wednesday, February 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cretanol

Total Points: 320
Total Questions: 99
Total Answers: 115

Location: Australia
Member since Sat, May 27, 2023
1 Year ago
cretanol questions
Fri, Dec 2, 22, 13:30, 1 Year ago
Thu, Dec 8, 22, 03:00, 1 Year ago
Mon, Aug 1, 22, 03:21, 2 Years ago
Fri, Sep 24, 21, 16:28, 3 Years ago
Sun, Apr 24, 22, 06:37, 2 Years ago
;