Added scripts to configure wayland and flatpak

pull/1/head 0.1.8
Arkady L. Shane 1 year ago
parent edddc4260e
commit 21d9706b6a
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -0,0 +1,15 @@
#!/bin/sh
if [ "$(id -u)" = "0" ]; then
SYSTEM="--system"
MSG="to all users"
else
MSG="to user $(whoami)"
fi
if [ -f /usr/bin/flatpak ]; then
/usr/bin/flatpak remote-add $SYSTEM --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
/usr/bin/flatpak remote-add $SYSTEM --if-not-exists fedora oci+https://registry.fedoraproject.org
echo "Added flathub and fedoraproject flatpak repos $MSG"
fi

@ -0,0 +1,37 @@
#!/bin/sh
usage()
{
echo "Enable/Disable Wayland in GDM"
echo "Usage: sphere-wayland-configure <--enable|--disable>"
echo
exit 1
}
OPTION="$1"
echo $OPTION
if [ "$OPTION" != "--disable" -a "$OPTION" != "--enable" ]; then
echo "Unknown option"
usage
fi
if [ ! -f /etc/gdm/custom.conf ]; then
echo "GDM configuration file not found"
exit 5
fi
if [ "$OPTION" = "--enable" ]; then
sed -i '/^WaylandEnable=false/s@^@#@' /etc/gdm/custom.conf
sed -i '/^DefaultSession=/s@^@#@' /etc/gdm/custom.conf
echo "Wayland enabled, please restart gdm"
echo "sudo systemctl restart gdm.service"
elif [ "$OPTION" = "--disable" ]; then
sed -i '/^#WaylandEnable=false/s@^#@@' /etc/gdm/custom.conf
sed -i '/^#DefaultSession=/s@^#@@' /etc/gdm/custom.conf
echo "Wayland enabled, please restart gdm"
echo "sudo systemctl restart gdm.service"
fi
Loading…
Cancel
Save