frnmst-archives
/
qvm
Archived
1
0
Fork 0
Browse Source

Fixed path problems if scripts were called from a different directory. Updated readme.

dev
Franco Masotti 5 years ago
parent
commit
1a0763a4a6
  1. 6
      README.md
  2. 11
      automatical_remote_startup.sh
  3. 5
      qvm

6
README.md

@ -140,8 +140,10 @@ connection. Both of them require that SSH is configured correctly on the
computers: the host must be reachable from the client via SSH.
This can be verified by using the `--attach-remote` option.
Once you've checked that everyting works, you can add a command alias in
your shell configuration file (e.g: `~/.bashrc`).
Once you have checked that everyting works, you can add a command alias in
your shell configuration file (e.g: `~/.bashrc`), something like:
alias vm='/home/user/scripts/qvm/automatical_remote_startup.sh'
# Help

11
automatical_remote_startup.sh

@ -16,8 +16,8 @@
# This script is intended to be used along with a shell alias. #
################################################################
# Source variables globally.
. ./configvmrc
program_name="$0"
local_path="${program_name%/automatical_remote_startup.sh}"
help()
{
@ -59,10 +59,9 @@ connect()
fi
if [ "$argc1" = "use_vnc" ]; then
./qvm --remote &
"${local_path}"/qvm --remote &
else
echo in
./qvm --attach-remote
"${local_path}"/qvm --attach-remote
fi
}
@ -88,7 +87,7 @@ main()
eval set -- "$opts"
# Source variables globally.
. ./configvmrc
. "${local_path}"/configvmrc
for opt in $opts; do
case "$opt" in

5
qvm

@ -12,6 +12,9 @@
# with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
program_name="$0"
local_path="${program_name%/qvm}"
help()
{
cat <<-EOF
@ -181,7 +184,7 @@ attach-remote"
eval set -- "$opts"
# Source variables globally.
. ./configvmrc
. "${local_path}"/configvmrc
for opt in $opts; do
case "$opt" in