1

In a previous question I made this line:

trap 'clear; ~/ascii3.sh; spd-say "Exit"; sleep 2' EXIT

The content of ascii3.sh is:

echo -e "\033[01;31m"
echo " _  _   __   _  _  ____     __     __ _  __  ___  ____    ____   __   _  _  _   "
echo "/ )( \ / _\ / )( \(  __)   / _\   (  ( \(  )/ __)(  __)  (    \ / _\ ( \/ )/ \  "
echo ") __ (/    \\\ \/ / ) _)   /    \  /    / )(( (__  ) _)    ) D (/    \ )  / \_/  "
echo "\_)(_/\_/\_/ \__/ (____)  \_/\_/  \_)__)(__)\___)(____)  (____/\_/\_/(__/  (_)  "

and put it at the end of the ~/.bashrc file, but every time I make the exit command or just quit the terminal by Alt+F4 or the ☒ mark in the GUI, the speech-dispatcher is no longer working just like I stopped it.

Note: i am working on Ubuntu 14.04, GNU bash, version 4.3.11(1), and i am using the default terminal on Ubuntu.

So what is going on please?

Black Block
  • 4,991
  • 1
    post the content of ~/ascii3.sh – A.B. Apr 11 '15 at 13:59
  • It doesn't have anything to do with the problem of mine but it is already found in the 2nd answer of the link in the 1st line of my question. – Black Block Apr 11 '15 at 14:14
  • Can I exclude that in "ascii3.sh" nothing is included, which can have a negative impact? No. You want to be helped you. – A.B. Apr 11 '15 at 14:19
  • Then are there any thing weired about the trap command? – Black Block Apr 11 '15 at 15:13
  • Does it work if you run spd-say foo manually? What you describe works as expected on my system. – terdon Apr 11 '15 at 15:20
  • Manually before closing the terminal yes works, but after closing it it's not working at all(no sound given to me). – Black Block Apr 11 '15 at 15:40
  • There's something different going on then. I tried and it worked as expected. Please [edit] your question and include your bash version, your terminal name and version, and how you're logging on to this machine. Are you sure your .bashrc is being read? Try adding a line like foo="bar" and then running echo $foo. Does it print bar? – terdon Apr 12 '15 at 00:27
  • ok i added them, and about what you say of testing the .bashrc file everything work just well. – Black Block Apr 12 '15 at 09:51
  • There might be something strange in your ~/.bashrc then. Could you show us the entire thing? Also, do you have anything in ~/.bash_logout? Finally, I would also try with full paths, so /usr/bin/spd-say instead of spd-say. – terdon Apr 12 '15 at 09:56

0 Answers0