From owner-freebsd-questions@FreeBSD.ORG Wed Feb 4 18:37:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34BDA10656CD for ; Wed, 4 Feb 2009 18:37:17 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id BD2728FC21 for ; Wed, 4 Feb 2009 18:37:16 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id 1F0F3311D9; Wed, 4 Feb 2009 19:37:14 +0100 (CET) Date: Wed, 4 Feb 2009 19:37:14 +0100 From: cpghost To: Redd Vinylene Message-ID: <20090204183714.GA1104@phenom.cordula.ws> References: <4af955a20902040757q464b3d0ey2f6b32eeef382ad9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: questions , Rajarajan Rajamani Subject: Re: Could we get rid of the extra blank line in the MOTD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 18:37:17 -0000 On Wed, Feb 04, 2009 at 06:53:07PM +0100, Redd Vinylene wrote: > On 2/4/09, Rajarajan Rajamani 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/