My ~/.profile
contains a command which outputs to stdout when Ubuntu 16.04 with LXDE is started.
I grep /var/log/
for the output, but found nothing. Where would the output have gone, or is it lost forever?
Thanks.
My ~/.profile
contains a command which outputs to stdout when Ubuntu 16.04 with LXDE is started.
I grep /var/log/
for the output, but found nothing. Where would the output have gone, or is it lost forever?
Thanks.
Depending on the login manager you use, ~/.profile
is not even executed when you login graphically, see https://superuser.com/questions/752493/profile-in-lxde#847051.
Also, in case it is executed (more technically correct "sourced"), the output to standard output will most likely be discarded.
If you want to write a log message, you could use the logger
command (http://manpages.ubuntu.com/manpages/artful/man1/logger.1.html) to write to the system log, simply by piping your output into the logger command like this:
myCommand | logger
~/.profile
is a user specific script file (contrary to the scripts in the unix question you quoted). If you want to capture its output you have to redirect stdout and/or stderr to a file.
In /var/log you can see traces of events that are system relevant or concern all users.