The desktop entry claimed `application/x-zapret-preset` (*.zapretpreset), a type nothing in the program produces or reads (presets are .txt/.zip and are imported by drop or the import dialog). Removed the MIME file, the `MimeType` line, `%U`, and the mime-database calls from the install/uninstall and .deb scripts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
1.1 KiB
Shell
22 lines
1.1 KiB
Shell
#!/bin/sh
|
|
set -e
|
|
# The person who installed (sudo or pkexec) is added to the group that may talk to the helper; others add themselves:
|
|
# sudo usermod -aG zapretgui NAME
|
|
if [ "$1" = configure ]; then
|
|
getent group zapretgui >/dev/null || groupadd --system zapretgui
|
|
WHO="${SUDO_USER:-}"
|
|
[ -z "$WHO" ] && [ -n "${PKEXEC_UID:-}" ] && WHO="$(getent passwd "$PKEXEC_UID" | cut -d: -f1)"
|
|
if [ -n "$WHO" ] && [ "$WHO" != root ] && id "$WHO" >/dev/null 2>&1; then
|
|
usermod -aG zapretgui "$WHO" && echo "zapretgui: $WHO was added to the group zapretgui (log in again for it to apply)"
|
|
else
|
|
echo "zapretgui: add each person who uses it to the group: sudo usermod -aG zapretgui NAME"
|
|
fi
|
|
command -v update-desktop-database >/dev/null && update-desktop-database -q /usr/share/applications || true
|
|
command -v gtk-update-icon-cache >/dev/null && gtk-update-icon-cache -q /usr/share/icons/hicolor || true
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl daemon-reload || true
|
|
systemctl enable zapretgui-helper.service || true
|
|
systemctl restart zapretgui-helper.service || true
|
|
fi
|
|
fi
|
|
exit 0
|