Add qvm-showterminal
This commit is contained in:
parent
0aae0c189c
commit
95e2d11e61
2
Makefile
2
Makefile
@ -317,6 +317,8 @@ 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 -d $(DESTDIR)/var/run/qubes
|
||||
install -d $(DESTDIR)/rw
|
||||
|
||||
|
1
debian/qubes-core-agent.install
vendored
1
debian/qubes-core-agent.install
vendored
@ -100,6 +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-sync-clock
|
||||
usr/bin/xenstore-watch-qubes
|
||||
usr/lib/python2.7/dist-packages/qubesagent-*.egg-info/*
|
||||
|
24
misc/qvm-showterminal
Executable file
24
misc/qvm-showterminal
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
QREXEC_REQUESTED_TARGET="$1"
|
||||
|
||||
qrexec_console() {
|
||||
QREXEC_REQUESTED_TARGET="$1"
|
||||
|
||||
qrexec-client-vm "$QREXEC_REQUESTED_TARGET" qubes.ShowTerminal 2>/dev/null
|
||||
|
||||
# exit code 200 is flock exit code in qubes.ShowTerminal
|
||||
exit_code=$?
|
||||
if [ $exit_code -gt 0 ]; then
|
||||
if [ $exit_code -ne 200 ]; then
|
||||
printf "Cannot connect to %s" "$QREXEC_REQUESTED_TARGET"
|
||||
else
|
||||
printf "A qube is already connected to %s" "$QREXEC_REQUESTED_TARGET"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
export -f qrexec_console
|
||||
|
||||
socat file:/dev/tty,rawer,escape=0x0f SYSTEM:"qrexec_console $QREXEC_REQUESTED_TARGET" 2>/dev/null
|
||||
printf '\n'
|
@ -627,6 +627,7 @@ rm -f %{name}-%{version}
|
||||
/usr/bin/qubes-run-terminal
|
||||
/usr/bin/qubes-open
|
||||
/usr/bin/qubes-session-autostart
|
||||
/usr/bin/qvm-showterminal
|
||||
%dir /usr/lib/qubes
|
||||
/usr/lib/qubes/prepare-suspend
|
||||
/usr/lib/qubes/qfile-agent
|
||||
|
Loading…
Reference in New Issue
Block a user