mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
run remmina even without profile.
This commit is contained in:
parent
49015a81c4
commit
0933235060
1 changed files with 20 additions and 16 deletions
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
err() {
|
||||
echo "ERROR: $*" >&2
|
||||
|
@ -16,8 +15,7 @@ if [[ -n "$REMMINA_PROFILE" ]]; then
|
|||
exec remmina -c "$profile"
|
||||
fi
|
||||
|
||||
[[ -z "$REMMINA_URL" ]] && err "Neither 'REMMINA_PROFILE' nor 'REMMINA_URL' found in env vars"
|
||||
|
||||
if [[ ! -z "$REMMINA_URL" ]]; then
|
||||
readarray -t arr < <( echo -n "$REMMINA_URL" | perl -pe 's|^(\w+)\:\/\/(?:([^:]+)(?::([^@]+))?@)?(.*)$|\1\n\2\n\3\n\4|' )
|
||||
proto="${arr[0]}"
|
||||
user="${arr[1]}"
|
||||
|
@ -35,4 +33,10 @@ remmina --set-option server="$host" --update-profile "$profile"
|
|||
# remmina --set-option window_maximize=1 --update-profile "$profile"
|
||||
# remmina --set-option scale=1 --update-profile "$profile"
|
||||
|
||||
echo "Running remmina with URL $REMMINA_URL"
|
||||
exec remmina -c "$profile"
|
||||
fi
|
||||
|
||||
|
||||
echo "Running remmina without connection profile"
|
||||
exec remmina
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue