Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion desktop/tauri/src-tauri/tauri.conf.json5
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"/usr/lib/portmaster/portmaster-core": "binary/portmaster-core",
"/usr/lib/portmaster/portmaster.zip": "binary/portmaster.zip",
"/usr/lib/portmaster/assets.zip": "binary/assets.zip",

// Intel files
"/var/lib/portmaster/intel/index.json": "intel/index.json",
"/var/lib/portmaster/intel/base.dsdl": "intel/base.dsdl",
Expand All @@ -79,6 +78,9 @@
"/var/lib/portmaster/intel/notifications.yaml": "intel/notifications.yaml",
"/var/lib/portmaster/intel/news.yaml" : "intel/news.yaml",

// Scripts
"/usr/lib/portmaster/ui-wrapper": "../../../packaging/linux/ui-wrapper",

// Shortcut
"/etc/xdg/autostart/portmaster.desktop": "../../../packaging/linux/portmaster-autostart.desktop"
},
Expand Down Expand Up @@ -113,6 +115,9 @@
"/var/lib/portmaster/intel/notifications.yaml": "intel/notifications.yaml",
"/var/lib/portmaster/intel/news.yaml" : "intel/news.yaml",

// Scripts
"/usr/lib/portmaster/ui-wrapper": "../../../packaging/linux/ui-wrapper",

// Shortcut
"/etc/xdg/autostart/portmaster.desktop": "../../../packaging/linux/portmaster-autostart.desktop"
},
Expand Down
11 changes: 9 additions & 2 deletions packaging/linux/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,15 @@ if command -V semanage >/dev/null 2>&1; then
fi

echo "[ ] Initializing binary files"
mv /usr/bin/portmaster /usr/lib/portmaster/portmaster
ln -s /usr/lib/portmaster/portmaster /usr/bin/portmaster
# Upon initial install, /usr/bin/portmaster gets foisted from archive unpacking.
# Upon reconfiguration or reinstall, this state is undefined.
if ! test -L "/usr/bin/portmaster" || ! test -e "/usr/bin/portmaster"; then
# When /usr/bin/portmaster is not the ui-wrapper, the state must be either
# a reinstall or upgrade and not reconfigure.
mv /usr/bin/portmaster /usr/lib/portmaster/portmaster-ui;
fi;
chmod +x /usr/lib/portmaster/ui-wrapper;
ln -srf /usr/lib/portmaster/ui-wrapper /usr/bin/portmaster;

chmod +x /usr/lib/portmaster/portmaster-core

Expand Down
22 changes: 22 additions & 0 deletions packaging/linux/ui-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh -e

# NOTE: This is a workaround for a WebkitGTK issue detailed in:
# -> https://github.com/flusterIO/fluster/issues/11
if command -v "loginctl" >/dev/null 2>&1; then
case "$(loginctl -P Type show-session auto)" in
("x11")
exec /usr/lib/portmaster/portmaster-ui "$@";
;;
(*)
WEBKIT_DISABLE_DMABUF_RENDERER=1 \
WEBKIT_DISABLE_COMPOSITING_MODE=1 \
exec /usr/lib/portmaster/portmaster-ui "$@";
;;
esac;
else
# Assume worst case scenario for compatibility with Wayland in
# distributions that choose to avoid Systemd.
WEBKIT_DISABLE_DMABUF_RENDERER=1 \
WEBKIT_DISABLE_COMPOSITING_MODE=1 \
exec /usr/lib/portmaster/portmaster-ui "$@";
fi;
Comment thread
M3TIOR marked this conversation as resolved.