Files
fedora-OEMDRV/client_software/0120_xrdp/install.sh
T
2026-03-31 19:45:36 +02:00

30 lines
1000 B
Bash
Executable File

#!/usr/bin/env sh
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Sofwareinstallation script for Nextcloud Talk.
#
#Check for root
if [ "$EUID" -ne 0 ]; then
echo "Error: Script requires root. Please check if ${SCRIPTPATH}/${SCRIPTNAME} is in sudoers rules and if you are a member. And if executed via sudo."
exit 1
fi
#Currently xrdp needs X11 - wayland not yet possible
rpm -qa | grep xorgxrdp || dnf install xrdp xorgxrdp plasma-workspace-x11 -y
XRDP_SERVICESTATUS=$( systemctl is-enabled xrdp )
if [ ${XRDP_SERVICESTATUS} != "enabled" ]; then
echo "Enabling XRDP Service and Firewall:"
systemctl enable xrdp
systemctl enable xrdp-sesman
systemctl start xrdp
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
fi
cp -f .Xclients ~/.Xclients
chown $SUDO_USER:$SUDO_USER $SUDO_HOME/.Xclients
chmod u+x $SUDO_HOME/.Xclients