LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fortune and konsole (kde question) (https://www.linuxquestions.org/questions/linux-software-2/fortune-and-konsole-kde-question-720192/)

alaios 04-19-2009 08:37 AM

Fortune and konsole (kde question)
 
Hey i was wondering if it is possible to execute fortune command when i start a new konsole session. I need some help cause i am new to the kde environment

brianL 04-19-2009 09:18 AM

In Slackware it's done with a script: /etc/profile.d/bsd-games-login-fortune.sh
Code:

#!/bin/sh
# Print a fortune cookie for interactive shells:
if [[ $- = *i* ]]; then
  echo
  fortune fortunes fortunes2 linuxcookie
  echo
fi

or this in ~/.bashrc, from:
http://tldp.org/LDP/abs/html/sample-bashrc.html
Code:

if [ -x /usr/games/fortune ]; then
    /usr/games/fortune -s
fi


alaios 04-22-2009 09:35 AM

thx it worked! (suse 11.1)

brianL 04-22-2009 09:47 AM

Good. Which one did you use?

alaios 04-22-2009 11:12 AM

2nd one


All times are GMT -5. The time now is 10:35 AM.