Wrong string comparison usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu MATE |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There is a bug in the syntax of /etc/profile.
I get the following errors in ~/.xsession-errors on login
/etc/mdm/Xsession: Beginning session setup...
/etc/mdm/Xsession: 2: [: xcustom: unexpected operator
/etc/mdm/Xsession: 2: [: xcustom: unexpected operator
/etc/mdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- /homes/
mate-qt.sh uses "==" for string comparison with test. This is legal with bash, but not with [da]sh. /etc/mdm/Xsession is run with /bin/sh (#!/bin/sh), which sources /etc/profile, which sources /etc/profile.
*** /etc/profile.
--- /etc/profile.
***************
*** 1,5 ****
# MATE Desktop Qt integrations
! if [ "x$DESKTOP_SESSION" == "xmate" ] || [ "x$XDG_
]; then
# QT apps to use GTK styling
export QT_QPA_
fi
--- 1,5 ----
# MATE Desktop Qt integrations
! if [ "x$DESKTOP_SESSION" = "xmate" ] || [ "x$XDG_
then
# QT apps to use GTK styling
export QT_QPA_
fi
This was fixed via ubuntu- mate-settings 19.10.7 in Ubuntu MATE 19.10.