You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
msvsphere-configs/bin/sphere-wayland-configure

38 lines
891 B

#!/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