Console login text: keeping it brief and elegant

Registered by Matthew Paul Thomas on 2010-04-14

When you log in to Ubuntu at a console, it prints a mishmash of text: last login details, uname, welcome text, disk usage, a link to documentation, system load from Landscape, an ad for Landscape, and (until recently) noise about checking for a new Ubuntu version, interspersed with “*” and “=>” symbols.

We should review how much of this text is really necessary, redesign the remainder to be clear and concise, and perhaps introduce a policy to prevent the text from becoming cluttered in future.

Blueprint information

Status:
Not started
Approver:
Jos Boumans
Priority:
Undefined
Drafter:
Matthew Paul Thomas
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Last login: Wed Apr 14 13:58:03 BST 2010 on tty1
Linux mpt-ubuntu 2.6.32-20-generic #30-Ubuntu SMP Mon Apr 12 15:19:41 UTC 2010 i686 GNU/Linux
Ubuntu 10.04 (lucid)

Welcome to Ubuntu!
 * Documentation: https://help.ubuntu.com/

  System information as of Wed Apr 14 14:09:16 BST 2010

  System load: 1.08 Memory usage: 48% Processes: 202
  Usage of /: 88.9% of 90.06GB Swap usage: 23% Users logged in: 1

  => / is using 88.9% of 90.06GB

  Graph this data and manage this system at https://landscape.canonical.com/

Checking for a new ubuntu release
No new release found

You have new mail.
14:09:17@~>

============================
Even worse on EC2 login...
============================
domU-12-31-39-04-31-73 2.6.32-305-ec2 #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux
Ubuntu 10.04 LTS

Welcome to Ubuntu!
 * Documentation: https://help.ubuntu.com/

  System information as of Thu May 6 10:18:22 UTC 2010

  System load: 1.29 Memory usage: 1% Processes: 74
  Usage of /: 4.6% of 14.76GB Swap usage: 0% Users logged in: 0

  Graph this data and manage this system at https://landscape.canonical.com/
---------------------------------------------------------------------
At the moment, only the core of the system is installed. To tune the
system to your needs, you can choose to install one or more
predefined collections of software by running the following
command:

   sudo tasksel --section server
---------------------------------------------------------------------

0 packages can be updated.
0 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@domU-12-31-39-04-31-73:~$

======== Gobby Text ===========
== Console login text ==

https://blueprints.launchpad.net/ubuntu/+spec/server-m-elegant-login-text

Too much text in console login

Current components:
 * uname
 * Ubuntu version number
 * Documentation link (e.g. different for cloud)
 * security protections information
 * updates available
 * last login text

Implementation:
/etc/motd scripts -- some instantaneous, some run once a week

=== Ideas for shortening ===

 * shorten uname info
 * merge Ubuntu version and uname info into a single line
 * show computer name first, since it's the single best orientation item
  - "Welcome to $machine_name (Ubuntu 10.04 LTS, Linux 2.6.32-21-generic)"

 * Collapse updates into a single line
  - "69 package updates are available, including 1 security update."

 * Shorten Landscape info
  - collapse load info to one line
  - don't duplicate disk usage info
  - no blank line before Landscape link

 * don't show admin info to non-administrators
  - Lamont: "As an admin, I don't want to tell my users that some packages are out of date"
  - have an update-motd-admin separate from update-motd
  - or show update-motd only to admins, and to other users only if the admin has provided one

 * run byobu by default, removing the need for orientation text (there's another session on that)
  - make it easy for motd information to be conditional depending on whether byobu is running
   - difficult because byobu is currently run after the motd
  - integrate notifications into byobu

 * Require update-motd scripts to use an API with length limit, admin-/non- display, etc
  - would that be too much architecture? -- just guidelines instead

 * Login disclaimers are necessary for some organizations e.g. DoD
 * Some administrators administer a system only when they log in to it, so login text is appropriate
 * Show some text on first login only
 * 99% of cloud instances have only a single user, an admin -- non-admins are increasingly rare
 * Best practices are listed in "man update-motd"
 * target: the mom-and-pop admin

Possible guidelines:
 * A script should display only one line if possible
 * Group related lines without a blank line between them
 * Don't use indentation like "* " or "- " unless presenting an actual list

 * motd: admin -> user comm (do not display to admins ?)
 * system notifications: system -> admin comm (do not display to users ?)

== Actions ==
 * Define display guidelines
 * Make current motd.d scripts behave according those guidelines
 * Reduce space where possible (kernel build date ?)
 * Consider making this obsolete by switching to byobu (see Friday)

 == Appendix ==
First Login - http://pastebin.ubuntu.com/431099/

(?)

Work Items