From 71989cf72d1c4c9c4fd616447c74a4d11a0da379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Tue, 30 Apr 2019 17:22:50 +0200 Subject: [PATCH] Rename qvm-showterminal to qvm-terminal and add print_usage --- Makefile | 2 +- debian/qubes-core-agent.install | 2 +- misc/{qvm-showterminal => qvm-terminal} | 18 ++++++++++++++++-- rpm_spec/core-agent.spec.in | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) rename misc/{qvm-showterminal => qvm-terminal} (58%) diff --git a/Makefile b/Makefile index ccac628..85a5b66 100644 --- a/Makefile +++ b/Makefile @@ -317,7 +317,7 @@ install-common: install-doc install -m 0755 misc/tinyproxy-wrapper $(DESTDIR)/usr/lib/qubes/tinyproxy-wrapper - install -m 0755 misc/qvm-showterminal $(DESTDIR)$(BINDIR)/qvm-showterminal + install -m 0755 misc/qvm-terminal $(DESTDIR)$(BINDIR)/qvm-terminal install -d $(DESTDIR)/var/run/qubes install -d $(DESTDIR)/rw diff --git a/debian/qubes-core-agent.install b/debian/qubes-core-agent.install index daa64f2..0d7535e 100644 --- a/debian/qubes-core-agent.install +++ b/debian/qubes-core-agent.install @@ -100,7 +100,7 @@ usr/bin/qvm-move-to-vm usr/bin/qvm-open-in-dvm usr/bin/qvm-open-in-vm usr/bin/qvm-run-vm -usr/bin/qvm-showterminal +usr/bin/qvm-terminal usr/bin/qvm-sync-clock usr/bin/xenstore-watch-qubes usr/lib/python2.7/dist-packages/qubesagent-*.egg-info/* diff --git a/misc/qvm-showterminal b/misc/qvm-terminal similarity index 58% rename from misc/qvm-showterminal rename to misc/qvm-terminal index c7f84ad..e0d0ba7 100755 --- a/misc/qvm-showterminal +++ b/misc/qvm-terminal @@ -1,12 +1,25 @@ #!/bin/bash + +print_usage() { +cat >&2 </dev/null + qrexec-client-vm "$QREXEC_REQUESTED_TARGET" admin.vm.Terminal - # exit code 200 is flock exit code in qubes.ShowTerminal + # exit code 200 is flock exit code in admin.vm.Terminal exit_code=$? if [ $exit_code -gt 0 ]; then if [ $exit_code -ne 200 ]; then @@ -20,5 +33,6 @@ qrexec_console() { export -f qrexec_console +printf 'Use "Control-Shift-o" to exit remote console\n' socat file:/dev/tty,rawer,escape=0x0f SYSTEM:"qrexec_console $QREXEC_REQUESTED_TARGET" 2>/dev/null printf '\n' diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index c9c4740..d46f981 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -627,7 +627,7 @@ rm -f %{name}-%{version} /usr/bin/qubes-run-terminal /usr/bin/qubes-open /usr/bin/qubes-session-autostart -/usr/bin/qvm-showterminal +/usr/bin/qvm-terminal %dir /usr/lib/qubes /usr/lib/qubes/prepare-suspend /usr/lib/qubes/qfile-agent