Thank you, that got me looking in the right direction.

I modified my UI to return exit codes of 0,1,2 for my script to close
linuxcnc, restart linuxcnc, and shutdown the computer.  That messed up the
linuxcnc script so I never saw stdout/stderr or the updated print and debug
files.




-----Original Message-----
From: Dewey Garrett [mailto:dgarr...@panix.com] 
Sent: Tuesday, 12 November 2019 7:20 AM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] OT: redirecting output to a file

> However, I have my machine set up to launch this
> script from .xinitrc when it boots.  In this case,
> the 2 echo commands appear in the log file, but
> the output of linuxcnc does not. 

.xinitrc is read by startx which is not running with
a connected tty.  The linuxcnc script redirects stdout
and stderr when not using a tty to PRINT_FILE and
DEBUG_FILE:

https://github.com/LinuxCNC/linuxcnc/blob/2.7/scripts/linuxcnc.in#L165


The PRINT_FILE and DEBUG_FILE are created in /tmp
(lines 78,79) but moved on successful termination:
(line 203) to $HOME.


The following note from the (debian 10) manpage
for startx may be relevant also:


$ man startx
...
"Note  that  in the Debian system, what many people
traditionally put in the .xinitrc file should go
in .xsession instead; this permits the same X
environment to be presented whether startx, xdm,
or xinit is used to start the X session.  All
discussion  of  the  .xinitrc  file  in  the
xinit(1)  manual  page applies equally well to
.xsession.  Keep in mind that .xinitrc is used
only  by  xinit(1)  and  completely  ignored  by
xdm(1)."


-- 
Dewey Garrett



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to