Add qvm-terminal-dispvm
This commit is contained in:
parent
b0e027ed1c
commit
4b86606890
1
Makefile
1
Makefile
@ -196,6 +196,7 @@ endif
|
||||
install -m 0755 qvm-tools/qubes-bug-report $(DESTDIR)/usr/bin/qubes-bug-report
|
||||
install -m 0755 qvm-tools/qubes-hcl-report $(DESTDIR)/usr/bin/qubes-hcl-report
|
||||
install -m 0755 qvm-tools/qvm-sync-clock $(DESTDIR)/usr/bin/qvm-sync-clock
|
||||
install -m 0755 qvm-tools/qvm-terminal-dispvm $(DESTDIR)/usr/bin/qvm-terminal-dispvm
|
||||
for method in $(ADMIN_API_METHODS_SIMPLE); do \
|
||||
ln -s ../../usr/libexec/qubes/qubesd-query-fast \
|
||||
$(DESTDIR)/etc/qubes-rpc/$$method || exit 1; \
|
||||
|
18
qvm-tools/qvm-terminal-dispvm
Executable file
18
qvm-tools/qvm-terminal-dispvm
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
print_usage() {
|
||||
cat >&2 << USAGE
|
||||
Usage: $0 vmname
|
||||
Connects to VM console throught DispVM using the admin.vm.TerminalDispVM RPC service.
|
||||
USAGE
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
QREXEC_REQUESTED_TARGET="$1"
|
||||
|
||||
qvm-check --quiet "$QREXEC_REQUESTED_TARGET" > /dev/null 2>&1 || { echo "Error: no such domain: '$QREXEC_REQUESTED_TARGET'"; exit 1; }
|
||||
|
||||
sudo qvm-run -p --localcmd="QREXEC_REQUESTED_TARGET=$QREXEC_REQUESTED_TARGET /etc/qubes-rpc/admin.vm.Terminal" --service --dispvm="$(qubes-prefs management_dispvm)" -- admin.vm.TerminalDispVM
|
Loading…
Reference in New Issue
Block a user