Could we get rid of the extra blank line in the MOTD?

cpghost cpghost at cordula.ws
Wed Feb 4 10:37:17 PST 2009


On Wed, Feb 04, 2009 at 06:53:07PM +0100, Redd Vinylene wrote:
> On 2/4/09, Rajarajan Rajamani <r.rajamani at gmail.com> wrote:
> > The messages are from /etc/motd
> >
> > Edit is to display what you'd like.

That's not his problem. Something *else* prints a newline before
the contents of /etc/motd... See login(1) and check out
/etc/login.conf.

Just guessing and not tested: if the console driver supports ANSI
control sequences, you could add the sequence that clears the screen
and homes the cursor (Esc[2J) [1] to the beginning of /etc/motd and
see if it works. Something like this:

Esc[2JThis is the first line of the motd.
This is the second line.
etc...

(Use the real Esc-character for this, not the three chars 'E', 's'
and 'c'; i.e. 1B(hex), 33(oct), 27(dec))

But again, it should only work if the console driver supports ANSI
escape sequences.

[1] http://ascii-table.com/ansi-escape-sequences-vt-100.php

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/


More information about the freebsd-questions mailing list