aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-01-12 10:09:50 +0100
committerGerd Hoffmann <kraxel@redhat.com>2021-01-12 10:09:50 +0100
commit9c5636b913668c53309d9cc6e7bae7d88c131675 (patch)
treee817a6e0fe6316b8e660fc6df198c59a09911e0b
parent017d3fac30a7d6f28046b541e7926b9e151f9d7c (diff)
downloadvconsole-9c5636b913668c53309d9cc6e7bae7d88c131675.tar.gz
show guest name in gterm/xterm title
-rw-r--r--vconsole.c4
-rw-r--r--vconsole.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/vconsole.c b/vconsole.c
index 79fe70f..bd28515 100644
--- a/vconsole.c
+++ b/vconsole.c
@@ -418,6 +418,10 @@ static void run_virsh_edit(struct vconsole_domain *dom)
}
argv[argc++] = app;
+ if (dom->name) {
+ argv[argc++] = "-title";
+ argv[argc++] = dom->name;
+ }
argv[argc++] = "-e";
argv[argc++] = "virsh";
argv[argc++] = "-c";
diff --git a/vconsole.h b/vconsole.h
index 92427f3..31f8596 100644
--- a/vconsole.h
+++ b/vconsole.h
@@ -107,7 +107,7 @@ struct vconsole_domain {
struct vconsole_connect *conn;
char uuid[VIR_UUID_STRING_BUFLEN];
int id;
- const char *name;
+ char *name;
GtkWidget *window, *vbox, *vte, *status;
virStreamPtr stream;