Window manager (marco) no longer loads

Ah yes, it can't find the "has_option" function.

Luckily @Norbert_X had filed some tips and tricks to get around some quirks in 22.04 LTS.
It seems to be a known issue

Like Norbert_X wrote, you can copy&paste the following code in a terminal and press enter:

cat <<\EOF | sudo tee /etc/X11/Xsession.d/20x11-add-hasoption
# temporary fix for LP# 1922414, 1955135 and 1955136 bugs
# read OPTIONFILE
OPTIONS=$(cat "$OPTIONFILE") || true

has_option() {
 if [ "${OPTIONS#*$1}" != "$OPTIONS" ]; then
   return 0
 else
   return 1
 fi
}
EOF

It literally writes the missing function into a file in /etc/X11/Xsession.d where it will be loaded first, which enables the other files to call it.

Based on the errors you've shown, you definitely need this fix. Good chance that everything will work as expected.

2 Likes