summaryrefslogtreecommitdiffstats
path: root/files/50gdm-disable-wayland.xsetup
blob: 1b4194cbc5a3473987eeadc10f5f1493664d82dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# to be sourced

disable=0

# disable Wayland if the user asks us to.
if /bin/grep -q nowayland /proc/cmdline; then
    disable=1
fi

# nokmsboot implies we are using a driver that won't work with Wayland,
# which prevents autologin working (mga#20079).
if [ -e /run/mgalive ]; then
    if /bin/grep -q nokmsboot /proc/cmdline; then
	disable=1
    fi
fi

if [ $disable -eq 1 -a -f /etc/X11/gdm/custom.conf ]; then
    sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/X11/gdm/custom.conf
fi