summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2015-02-20 12:55:25 -0800
committerAndy Zhou <azhou@nicira.com>2015-02-22 16:58:56 -0800
commit4cf272aaf6bc18cb87931c4487095ec1372a0ffd (patch)
treed01d9b249d90a5708fdd74a7fa588305a9037319 /tutorial
parent2d79a600a6bafe290b4fca62062ea6bb3993578d (diff)
downloadopenvswitch-4cf272aaf6bc18cb87931c4487095ec1372a0ffd.tar.gz
ovs-sandbox: Show the running program on xterm's title
When debugging multiple programs under GDB, it will be easier to identify xterms with the program name displayed as title. Without this patch, xterms will have the title of "gdb", which is the first program the xterm executes. This change is useful for the next patch. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tutorial')
-rwxr-xr-xtutorial/ovs-sandbox7
1 files changed, 5 insertions, 2 deletions
diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 5663acd58..bced8f468 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -21,7 +21,9 @@ run() {
}
run_xterm() {
- run xterm -e "$@" &
+ title=$1;
+ shift
+ run xterm -T "$title" -e "$@" &
}
rungdb() {
@@ -33,7 +35,8 @@ rungdb() {
# Use "DISPLAY" variable to determine out if X is supported
if $under_gdb && [ "$DISPLAY" ]; then
args=`echo $@ |sed s/--detach//g | sed s/--vconsole:off//g`
- run_xterm gdb --args $args
+ xterm_title=$1
+ run_xterm $xterm_title gdb --args $args
else
run $@
fi