You are not logged in.

#1 2006-05-01 10:49:13

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Displaying a quotation at login. [Solved]

Hello, I remember that when I was running some other distro I got some random quote every time i logged in, I thought this would be a nice thing to have, but i can't find anything because when i search for things about quotes i only find things bout programming and the " mark.
Does anybody know how to do this?

Offline

#2 2006-05-01 12:03:24

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: Displaying a quotation at login. [Solved]

There's a program called fortune that prints a random quote every time you run it. There's also lots of mods with different quotations to download. You can add it in your .bashrc or .profile file to have it run every time you log in.


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#3 2006-05-01 12:10:57

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Displaying a quotation at login. [Solved]

man motd

Offline

#4 2006-05-01 12:19:42

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: Displaying a quotation at login. [Solved]

However, unless I'm wrong, you can't display a random quote with motd. I remember adding some command only to have the command printed at login. Actually, coming to think about it, I didn't tell it to run with an interpreter. I'll try it out and get back to you.

[edit]
Nope. Couldn't get it to work. I think you have to do it with an external program.
[/edit]


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#5 2006-05-01 13:06:38

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Displaying a quotation at login. [Solved]

Fortune seemed fine, but i don't want it every time i start a terminal.
only way i could find to make motd show a fortune message was to run 'fortune > /etc/motd' at startup, but that will only give me a new quote every time i reboot.

Offline

#6 2006-05-01 13:11:17

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

Re: Displaying a quotation at login. [Solved]

Then put it in /etc/profile. That script only runs every time you login.


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#7 2006-05-01 13:21:25

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Displaying a quotation at login. [Solved]

ah, perfect, thanks!

Offline

Board footer

Powered by FluxBB