#!/bin/sh
# SPDX-FileCopyrightText: © 2009 Back In Time team
#
# SPDX-License-Identifier: CC0-1.0
#
# This file is released under Creative Commons Zero 1.0 (CC0-1.0) and part of
# the program "Back In Time". The program as a whole is released under GNU
# General Public License v2 or any later version (GPL-2.0-or-later).
# See LICENSES directory or go to <https://spdx.org/licenses/CC0-1.0.html>
# and <https://spdx.org/licenses/GPL-2.0-or-later.html>.
if [ "x$XDG_SESSION_TYPE" = "xwayland" ]; then
    # PREFIX="env QT_QPA_PLATFORM=wayland-egl XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR"
    # Empty prefix to use the default Qt platform plugin (normally xcb) to fix #836 and #1350
    PREFIX=""
else
    # X11
    PREFIX=""
fi

pkexec --disable-internal-agent $PREFIX "/usr/bin/backintime-qt" "$@"
