News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

terminal to launch console apps

Started by danielking, June 23, 2007, 07:40:47 PM

Previous topic - Next topic

danielking

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.
#!/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
cbterm $TITLE
I am a newbie to shell programming. This script maybe not very good. But it works.  :D