Welcome to mirror list, hosted at ThFree Co, Russian Federation.

remmina-file-wrapper.in « desktop « data - gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2033a1576cb99541616cf2ede942761881fa48a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
#===============================================================================
#
#          FILE: remmina-file-wrapper
#
#         USAGE: ./remmina-file-wrapper
#
#   DESCRIPTION: Wrapper used by xdg to connect or edit a remmina file clicking
#                on it, or clicking to an URL like remmina:///profile.remmina
#
#       OPTIONS: File path or URL
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Antenore Gatta (tmow), antenore@simbiosi.org
#  ORGANIZATION: Remmina
#       CREATED: 15. 06. 19 00:32:11
#      REVISION:  ---
#       LICENSE: GPLv2
#===============================================================================

set -o nounset                                  # Treat unset variables as an error

USRBIN="$(dirname "$(readlink -f "${0}")")"
REMMINA="@REMMINA_BINARY_PATH@"

if [[ ! -f "$REMMINA" ]] ; then
    REMMINA="${USRBIN}/remmina"
else
    REMMINA="remmina"
fi

export GLADE_HOME="$USRBIN/../share/remmina/ui/"

case "$@" in
    *rdp:*)
        "$REMMINA" "${@}"
        ;;
    *spice:*)
        "$REMMINA" "${@}"
        ;;
    *vnc:*)
        "$REMMINA" "${@}"
        ;;
    *ssh:*)
        "$REMMINA" "${@}"
        ;;
    *remmina:*)
        "$REMMINA" "${@#remmina:\/\/}"
        ;;
    *)
        "$REMMINA" "${@}"
        ;;
esac