The same fix works for LibreOffice, the soffice file is in /usr/bin/soffice