The console widget provides a bash-like terminal that you can add to your application. The Console application uses this.