mirror of
https://github.com/ben-grande/qusal.git
synced 2025-02-08 19:08:32 -05:00
feat: allow terminal and file manager choice
The gnome-terminal can't start as root, related to dbus.
This commit is contained in:
parent
bb384403ad
commit
efc3984df3
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
@ -9,17 +9,20 @@ set -eu
|
|||||||
me="${0##*/}"
|
me="${0##*/}"
|
||||||
|
|
||||||
usage(){
|
usage(){
|
||||||
printf '%s\n' "Usage: ${me} [QVM-RUN_OPTIONS] QUBE
|
printf '%s\n' "Usage: ${me} [QVM-RUN_OPTIONS] <QUBE>
|
||||||
Examples:
|
Examples:
|
||||||
${me} --dispvm=DVM_TEMPLATE
|
${me} --dispvm=<DVM_TEMPLATE>
|
||||||
${me} -u root QUBE
|
${me} -u root <QUBE>
|
||||||
${me} QUBE" >&2
|
${me} <QUBE>
|
||||||
|
The application to open can be specified with environment variables:
|
||||||
|
QVM_TERMINAL=xterm ${me} -u root <QUBE>
|
||||||
|
QVM_FILE_MANAGER=thunar ${me} -u root <QUBE>" >&2
|
||||||
exit "${1-"1"}"
|
exit "${1-"1"}"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${me}" in
|
case "${me}" in
|
||||||
*-terminal) service=qubes-run-terminal ;;
|
*-terminal) service="${QVM_TERMINAL:-"qubes-run-terminal"}";;
|
||||||
*-file-manager) service=qubes-open-file-manager ;;
|
*-file-manager) service="${QVM_FILE_MANAGER:-"qubes-open-file-manager"}";;
|
||||||
*) printf '%s\n' "Invalid script name: ${me}" exit 1 ;;
|
*) printf '%s\n' "Invalid script name: ${me}" exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user