diff --git a/src/ubuntu/install/remmina/custom_startup.sh b/src/ubuntu/install/remmina/custom_startup.sh index 80394eb..213c4a4 100644 --- a/src/ubuntu/install/remmina/custom_startup.sh +++ b/src/ubuntu/install/remmina/custom_startup.sh @@ -6,6 +6,19 @@ DEFAULT_ARGS="" MAXIMUS="false" ARGS=${APP_ARGS:-$DEFAULT_ARGS} +update_profile() { + if [ -n "$REMMINA_OPTIONS" ] && [ -n "$REMMINA_PROFILE" ] ; then + R_OPTIONS="" + for i in ${REMMINA_OPTIONS//,/ } + do + R_OPTIONS="$R_OPTIONS --set-option $i" + done + + remmina --update-profile $REMMINA_PROFILE $R_OPTIONS + unset REMMINA_OPTIONS + fi +} + options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit eval set -- "$options" @@ -64,7 +77,8 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e - $START_COMMAND $ARGS $URL + update_profile + $START_COMMAND $ARGS $URL $REMMINA_PROFILE set -e fi sleep 1 diff --git a/src/ubuntu/install/remmina/install_remmina.sh b/src/ubuntu/install/remmina/install_remmina.sh index 0b41650..1e5a11a 100644 --- a/src/ubuntu/install/remmina/install_remmina.sh +++ b/src/ubuntu/install/remmina/install_remmina.sh @@ -8,4 +8,138 @@ apt-get update apt-get install -y remmina remmina-plugin-rdp remmina-plugin-secret remmina-plugin-spice xdotool cp /usr/share/applications/org.remmina.Remmina.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/org.remmina.Remmina.desktop -chown 1000:1000 $HOME/Desktop/org.remmina.Remmina.desktop \ No newline at end of file +chown 1000:1000 $HOME/Desktop/org.remmina.Remmina.desktop + +DEFAULT_PROFILE_DIR=$HOME/.local/share/remmina/defaults + +mkdir -p $DEFAULT_PROFILE_DIR +cat >> $DEFAULT_PROFILE_DIR/default.vnc.remmina <> $DEFAULT_PROFILE_DIR/default.rdp.remmina <