Author Topic: terminal to launch console apps  (Read 3156 times)

danielking

  • Guest
terminal to launch console apps
« on: June 23, 2007, 07:40:47 pm »
The default terminal of C::B is xterm.
It will spent a "long" time(about 3 seconds, too long for debugging) on starting up xterm every time.
The option of customizing terminal in Settings->Environment is a little weak.
So I wrote a shell script to resolve this problem.
Code
#!/bin/bash
export ${2:0:34}
cmd=${2:35}
echo `Terminal --hide-toolbars --hide-menubar -T ${1} -e "$cmd"` >> /dev/null
I use xfce4, so "Terminal" and its parameters are here.
I save it to /usr/bin/cbterm, and then set the "Terminal to launch console programs:" with
Code
cbterm $TITLE 
I am a newbie to shell programming. This script maybe not very good. But it works.  :D