FreeBSD login message | fortune


Da si malce polepsate login sporocilo v freebsd sistemih z nakljucnimi hinti uporabite programcek fortune, videl pri simonu in se navdusil…

Primer:

[mihapet@hackint0sh ~] ssh mihap.si
Last login: Mon Mar 15 15:59:10 2010 from 217.72.64.46
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
	The Regents of the University of California.  All rights reserved.

FreeBSD 8.0-RELEASE (GENERIC) #0: Sat Nov 21 15:48:17 UTC 2009
[root@mihap ~]#

Spremenimo v

[mihapet@hackint0sh ~] ssh mihap.si

You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
[root@mihap ~]#

Seveda se prompt hinti dinamicno spreminjajo…Kaj potrebujemo?

  1. Games distribution
    Ce ob instalaciji niste izbrali games distribucij morate to storiti sedaj – ce ne obstaja /usr/games/fortune potem v sysinstall izberite Configure -> Distributions in odklikajte games in ok.
  2. prazen /etc/COPYRIGHT
    touch /etc/COPYRIGHT
    
  3. uredimo ~/.profile
    v ~/.profile dodamo na koncu sledec line:

    #fortune
    [ -x /usr/games/fortune ] && /usr/games/fortune freebsd-tips
    

voila!

[mihapet@hackint0sh ~] ssh mihap.si

You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing

	# cd /usr/ports//

	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports//

	# make deinstall

as root.
[root@mihap ~]#

EDIT: Kot kaze obstaja se veliko modov za fortune, gentoo npr. ima na voljo sledece:

server ~ # emerge -s fortune | egrep "games-misc|Homepage"
*  games-misc/fortune-mod
      Homepage:      http://www.redellipse.net/code/fortune
*  games-misc/fortune-mod-all
      Homepage:      http://www.gentoo.org/
*  games-misc/fortune-mod-at-linux
      Homepage:      http://fortune-mod-fvl.sourceforge.net/
*  games-misc/fortune-mod-bofh-excuses
      Homepage:      http://www.stlim.net/staticpages/index.php?page=20020814005536450
*  games-misc/fortune-mod-calvin
      Homepage:      http://www.netmeister.org/misc.html
*  games-misc/fortune-mod-chucknorris
      Homepage:      http://www.k-lug.org/~kessler/projects.html
*  games-misc/fortune-mod-dubya
      Homepage:      http://dubya.seiler.us/
*  games-misc/fortune-mod-familyguy
      Homepage:      http://jon.oberheide.org/familyguy/
*  games-misc/fortune-mod-firefly
      Homepage:      http://www.daughtersoftiresias.org/progs/firefly/
*  games-misc/fortune-mod-futurama
      Homepage:      http://www.netmeister.org/misc.html
*  games-misc/fortune-mod-fvl
      Homepage:      http://fortune-mod-fvl.sourceforge.net/
*  games-misc/fortune-mod-gentoo-dev
      Homepage:      http://www.gentoo.org/
*  games-misc/fortune-mod-gentoo-forums
      Homepage:      http://forums.gentoo.org/
*  games-misc/fortune-mod-hitchhiker
      Homepage:      http://www.splitbrain.org/projects/fortunes/hg2g
*  games-misc/fortune-mod-homer
      Homepage:      http://www.cs.indiana.edu/~crcarter/homer/homer.html
*  games-misc/fortune-mod-humorixfortunes
      Homepage:      http://i-want-a-website.com/about-linux/downloads.shtml
*  games-misc/fortune-mod-mormon
      Homepage:      http://scriptures.nephi.org/
*  games-misc/fortune-mod-osfortune
      Homepage:      http://www.dibona.com/opensources/index.shtml
*  games-misc/fortune-mod-powerpuff
      Homepage:      http://eol.init1.nl/content/view/43/54/
*  games-misc/fortune-mod-pqf
      Homepage:      http://www.lspace.org/
*  games-misc/fortune-mod-prolinux
      Homepage:      http://www.pro-linux.de/news/2009/14520.html
*  games-misc/fortune-mod-rss
      Homepage:      http://fortune-mod-fvl.sourceforge.net/
*  games-misc/fortune-mod-scriptures
      Homepage:      http://scriptures.nephi.org/
*  games-misc/fortune-mod-simpsons-chalkboard
      Homepage:      http://www.splitbrain.org/projects/fortunes/simpsons
*  games-misc/fortune-mod-slackware
      Homepage:      http://fauxascii.com/linux/mod_quotes.html
*  games-misc/fortune-mod-smac
      Homepage:      http://progsoc.org/~curious/
*  games-misc/fortune-mod-sp-fortunes
      Homepage:      http://eol.init1.nl/content/view/44/54/
*  games-misc/fortune-mod-starwars
      Homepage:      http://www.splitbrain.org/projects/fortunes/starwars
*  games-misc/fortune-mod-strangelove
      Homepage:      http://seiler.us/wiki/index.php/Strangelove
*  games-misc/fortune-mod-tao
      Homepage:      http://fortunes.quotationsbook.com/fortunes/collection/67/TAO
*  games-misc/fortune-mod-taow
      Homepage:      http://www.de-brauwer.be/wiki/wikka.php?wakka=TheArtOfWar
*  games-misc/fortune-mod-thomas-ogrisegg
      Homepage:      http://fortune-mod-fvl.sourceforge.net/
*  games-misc/fortune-mod-woody-allen-it
      Homepage:      http://somemixedstuff.blogspot.com/2007/04/set-of-fortunes-of-woody-allen-quotes.html
*  games-misc/fortune-mod-zx-error
      Homepage:      http://korpus.juls.savba.sk/~garabik/software/fortunes-zx-error.html

Preprosto dodamo fajle v /usr/share/games/fortune/ in namesto freebsd-mod klicemo npr futurama:

[root@mihap /usr/share/games/fortune]# [ -x /usr/games/fortune ] && /usr/games/fortune futurama
"Look, it's our nebula. Whenever I see it I'll think back to when we
almost..." (nebula gets sucked into the black hole)
"Oop. Nevermind." -Fry
[root@mihap /usr/share/games/fortune]#

Your IP Address is:
38.107.179.223

  1. No comments yet.
(will not be published)
*