<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Hi Guys<BR>
<BR>
I keep hitting these really odd issues.&nbsp; Some I can sort out and for others I'm just glad this list exists!<BR>
<BR>
I have a command line application that outputs status messages to the console as it runs.&nbsp; In my c++ code I use the following:<BR>
<BR>
cout &lt;&lt; &quot;status message \n&quot;;<BR>
<BR>
When I log into a virtual terminal and run it all output lines appear below each other as exptected:<BR>
<BR>
Line 1<BR>
Line 2<BR>
Line 3<BR>
...<BR>
<BR>
However, when I start the application from rc.local and redirects its output such that it runs on a virtual terminal (where no one has logged in) the output appear as follows:<BR>
<BR>
Line 1<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Line 2<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Line 3<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<BR>
<BR>
It appears something changes on the terminal once someone has logged in.&nbsp; I could fix the problem by changing my c++ code to:<BR>
<BR>
cout &lt;&lt; &quot;status message \r\n&quot;;<BR>
<BR>
This forces a carriage return (like on the old typewriters).&nbsp; However, these output command are spread out over several files on serveral applications and it would be a mammoth task to fix.<BR>
<BR>
Is there something I can call from rc.local that would change the behaviour of a virtual terminal (similar to that once someone has logged in)?&nbsp; I've looked at the setterm man page, but couldn't find anything there.<BR>
<BR>
Regards<BR>
Charl
</BODY>
</HTML>