#!/bin/sh remove_entry() { local profile="$1" grep -v '^XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/share:/usr/local/share}:/opt/share"$' "${profile}" >"${profile}.new" && mv "${profile}.new" "${profile}" } update-mime-database /opt/share/mime update-desktop-database /opt/share/applications #osso-update-category-database /usr/share/mime remove_entry "/etc/profile.env"