Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2001 06:25:09 +0100 (BST)
From:      Mark Valentine <mark@thuvia.demon.co.uk>
To:        nik@freebsd.org (Nik Clayton), arch@freebsd.org
Subject:   Re: [PATCH] Show login(1) how to execute programs at start up
Message-ID:  <200106200525.f5K5P9Y31720@dotar-sojat.thuvia.org>
In-Reply-To: Nik Clayton's message of Jun 19,  7:09pm

next in thread | raw e-mail | index | archive | help
> From: nik@freebsd.org (Nik Clayton)
> Date: Tue 19 Jun, 2001
> Subject: [PATCH] Show login(1) how to execute programs at start up

>   *  Dropping the code in the standard /usr/share/skel files.

I don't believe in /usr/share/skel; the default behaviour should not
depend on startup files in a user's home directory.  (Too easy to break,
next to impossible to upgrade past.)

>   *  Having a different set of skeleton files (or components that are
>      cat(1)'ed together.

Evil^2.

>   *  Putting the functionality in to login.conf.

Yes, but policy, not implementation!

> Attached is a small diff to login.c to do this.

Hacking login(1) doesn't help xdm(1) users.  Neither does specifying programs
which spit terminal output in login.conf(5).  (An xdm(1) user should get the
contents of the file specified by the welcome capability displayed in a popup
window or something; whatever programs can do this will break if you change
the meaning of the welcome capability.)

I would probably do this by adding a new boolean login capability "tips"
(does this even need any code!?), and have a command line utility interface
to getcap(3), then let /etc/profile, /etc/login, Xsession and friends do
what they will to implement the policy, e.g.

    getcap tips && /usr/games/fortunes freebsd-tips

Icing on the the cake would be a simple interface for the novice user to edit
$HOME/.login.conf to disable/enable tips (among other things).

Before login.conf(5) this would probably have beeb done similar to .hushlogin,
with a nice simple user interface, e.g.

    test -f ~/.notips || /usr/games/fortunes freebsd-tips

    $ touch ~/.notips

		Cheers,

		Mark.

-- 
Mark Valentine, Thuvia Labs <mark@thuvia.co.uk>       <http://www.thuvia.co.uk>;
"Tigers will do ANYTHING for a tuna fish sandwich."       Mark Valentine uses
"We're kind of stupid that way."   *munch* *munch*        and endorses FreeBSD
  -- <http://www.calvinandhobbes.com>;                  <http://www.freebsd.org>;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106200525.f5K5P9Y31720>