<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=8001&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [HowTo] Portmaster v2 on Devuan 6 Excalibur Desktop]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=8001</link>
		<description><![CDATA[The most recent posts in [HowTo] Portmaster v2 on Devuan 6 Excalibur Desktop.]]></description>
		<lastBuildDate>Tue, 26 May 2026 18:12:42 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[[HowTo] Portmaster v2 on Devuan 6 Excalibur Desktop]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=64000#p64000</link>
			<description><![CDATA[<p>Installed Portmaster v2 via .deb file on Devuan then alerted this error message.<br />&quot;Your System Service Manager is not supported. Please make sure Portmaster is running.&quot;</p><p>I&#039;m going to fix this error.</p><p>I tried to replace the systemd part with SysVinit of this manual installation script.<br /><a href="https://wiki.safing.io/en/Portmaster/Install/Linux#manual-installation" rel="nofollow">https://wiki.safing.io/en/Portmaster/In … stallation</a></p><p><em>How to install portmaster v2 on Devuan 6 Excalibur Desktop.</em><br />1. Create a script file &#039;install-portmaster.sh&#039;<br />2. Fill it with the content presented below<br />3. Don&#039;t forget to set the correct access rights </p><div class="codebox"><pre><code>sudo chmod a+x install-portmaster.sh</code></pre></div><p>4. Run it with administrative privileges: </p><div class="codebox"><pre><code>sudo ./install-portmaster.sh</code></pre></div><p>And Restart/Reboot your computer.</p><p><em>my installation script</em></p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh

# ===================================
# STEP 1: Install Portmaster
# (install all necessary files)
# ===================================

# Create directory for binaries
mkdir -p /usr/lib/portmaster
cd /usr/lib/portmaster

# Download Portmaster UpdateManager utility
echo &quot;[+] Downloading Portmaster UpdateManager...&quot;
wget https://updates.safing.io/latest/linux_amd64/updatemgr/updatemgr
chmod a+x updatemgr

# Download latest binaries
echo &quot;[+] Downloading Portmaster binaries...&quot;
./updatemgr download https://updates.safing.io/stable.v3.json &quot;/usr/lib/portmaster&quot;
chmod a+x /usr/lib/portmaster/portmaster        # Ensure binary is executable
chmod a+x /usr/lib/portmaster/portmaster-core   # Ensure binary is executable

# Download latest data files
echo &quot;[+] Downloading Portmaster data files...&quot;
mkdir -p /var/lib/portmaster/intel
./updatemgr download https://updates.safing.io/intel.v3.json &quot;/var/lib/portmaster/intel&quot;

# (Optional)
# If the SELinux module is enabled, set correct SELinux context for the Portmaster core binary.
# This ensures the binary can be executed properly under SELinux policies, avoiding permission issues.
if command -v semanage &gt;/dev/null 2&gt;&amp;1; then
    echo &quot;[ ] Fixing SELinux permissions&quot;
    semanage fcontext -a -t bin_t -s system_u $(realpath /usr/lib)&#039;/portmaster/portmaster-core&#039; || :
    restorecon -R /usr/lib/portmaster/portmaster-core 2&gt;/dev/null &gt;&amp;2 || :
fi

# Clean up
rm -f /usr/lib/portmaster/updatemgr

# Done
echo &quot;[i] At this point, Portmaster is installed.&quot;
echo &quot;    You can start manually running the Portmaster daemon with:&quot;
echo &quot;        sudo /usr/lib/portmaster/portmaster-core --log-stdout&quot;
echo &quot;    To start User Interface, run:&quot;
echo &quot;        /usr/lib/portmaster/portmaster&quot;

# ===================================
# STEP 2: Register Portmaster service
# (for systemd-based systems)
# ===================================

#echo &quot;[+] Registering Portmaster service&quot;
#cat &lt;&lt;EOF &gt; /usr/lib/systemd/system/portmaster.service
#[Unit]
#Description=Portmaster by Safing
#Documentation=https://safing.io
#Documentation=https://docs.safing.io
#Before=nss-lookup.target network.target shutdown.target
#After=systemd-networkd.service
#Conflicts=shutdown.target
#Conflicts=firewalld.service
#Wants=nss-lookup.target
#
#[Service]
#Type=simple
#Restart=on-failure
#RestartSec=10
#RestartPreventExitStatus=24
#LockPersonality=yes
#MemoryDenyWriteExecute=yes
#MemoryLow=2G
#NoNewPrivileges=yes
#PrivateTmp=yes
#PIDFile=/var/lib/portmaster/core-lock.pid
#Environment=LOGLEVEL=info
#Environment=PORTMASTER_ARGS=
#EnvironmentFile=-/etc/default/portmaster
#ProtectSystem=true
#ReadWritePaths=/usr/lib/portmaster
#RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
#RestrictNamespaces=yes
#ProtectHome=read-only
#ProtectKernelTunables=yes
#ProtectKernelLogs=yes
#ProtectControlGroups=yes
#PrivateDevices=yes
#AmbientCapabilities=cap_chown cap_kill cap_net_admin cap_net_bind_service cap_net_broadcast cap_net_raw cap_sys_module cap_sys_ptrace cap_dac_override cap_fowner cap_fsetid cap_sys_resource cap_bpf cap_perfmon
#CapabilityBoundingSet=cap_chown cap_kill cap_net_admin cap_net_bind_service cap_net_broadcast cap_net_raw cap_sys_module cap_sys_ptrace cap_dac_override cap_fowner cap_fsetid cap_sys_resource cap_bpf cap_perfmon
#StateDirectory=portmaster
#WorkingDirectory=/var/lib/portmaster
#ExecStart=/usr/lib/portmaster/portmaster-core --log-dir=/var/lib/portmaster/log -- $PORTMASTER_ARGS
#ExecStopPost=-/usr/lib/portmaster/portmaster-core -recover-iptables
#
#[Install]
#WantedBy=multi-user.target
#EOF

# ===================================
# STEP 2: Register Portmaster service
# (for SysVinit-based systems)
# ===================================

echo &quot;[+] Registering Portmaster service&quot;
cat &lt;&lt; &#039;EOF&#039; &gt; /etc/init.d/portmaster
#!/bin/sh
### BEGIN INIT INFO
# Provides:          portmaster
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 6
# Short-Description: Portmaster by Safing
# Description:       Portmaster is a free and open-source application firewall that does the heavy lifting for you.
### END INIT INFO

DAEMON=&quot;/usr/lib/portmaster/portmaster-core&quot;
PIDFILE=&quot;/var/run/portmaster.pid&quot;

case &quot;$1&quot; in
    start)
        echo &quot;Starting portmaster&quot;
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
        ;;
    stop)
        echo &quot;Stopping portmaster&quot;
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        ;;
    restart)
        portmaster stop
        portmaster start
        ;;
    status)
        if [ -f $PIDFILE ]; then
            echo &quot;portmaster is running.&quot;
        else
            echo &quot;portmaster is stopped.&quot;
        fi
        ;;
    *)
        echo &quot;Usage: portmaster {start|stop|restart|status}&quot;
        exit 1
        ;;
esac
exit 0

EOF

chmod a+x /etc/init.d/portmaster

#systemctl daemon-reload
#systemctl enable portmaster
update-rc.d portmaster defaults

# ===================================
# STEP 3: Register Portmaster UI
# (for desktop environments)
# ===================================

# Install Portmaster UI start script
echo &quot;[+] Installing Portmaster UI start script&quot;

cat &lt;&lt;EOF &gt; /usr/lib/portmaster/portmaster-ui-start.sh
#!/bin/sh
WEBKIT_DISABLE_COMPOSITING_MODE=1 /usr/lib/portmaster/portmaster &quot;$@&quot;
EOF

chmod a+x /usr/lib/portmaster/portmaster-ui-start.sh
ln -sf /usr/lib/portmaster/portmaster-ui-start.sh /usr/bin/portmaster

# Register Portmaster UI in the system
echo &quot;[+] Registering Portmaster UI .desktop file&quot;

cat &lt;&lt;EOF &gt; /usr/share/applications/portmaster.desktop
[Desktop Entry]
Name=Portmaster
GenericName=Application Firewall
Exec=/usr/bin/portmaster --with-prompts --with-notifications
Icon=portmaster
StartupWMClass=portmaster
Terminal=false
Type=Application
Categories=System
EOF

# Register Portmaster UI to automatically start on login
echo &quot;[+] Registering Portmaster UI to start on login&quot;

mkdir -p /etc/xdg/autostart

cat &lt;&lt;EOF &gt; /etc/xdg/autostart/portmaster-autostart.desktop
[Desktop Entry]
Name=Portmaster
GenericName=Application Firewall Notifier
Exec=/usr/bin/portmaster --with-prompts --with-notifications --background
Icon=portmaster
Terminal=false
Type=Application
Categories=System
NoDisplay=true
EOF

# Register Portmaster icon
echo &quot;[+] Registering Portmaster icon&quot;
sudo wget https://raw.githubusercontent.com/safing/portmaster-packaging/master/linux/portmaster_logo.png -O /usr/share/pixmaps/portmaster.png

# ===================================
# Final notes
# ===================================

echo
cat &lt;&lt;&#039;EOF&#039;
[✓] Portmaster installation complete.

    NOTE:
    The Portmaster User Interface requires the following runtime libraries for tray integration and embedded web content:
      - AppIndicator (Ayatana / libappindicator) — system tray / indicator support
      - WebKitGTK 4.1 (libwebkit2gtk-4.1) — embedded web rendering
    Package names vary by distribution — use your distribution’s package manager or search tool to find the exact package names:
      - Debian / Ubuntu / openSUSE: `libayatana-appindicator3-1`, `libwebkit2gtk-4.1-0`
      - Fedora / RHEL: `libayatana-appindicator-gtk3`, `webkit2gtk4.1`
    If the UI fails to launch, verify the dependencies above are installed.
    You can run the UI from a terminal to view error output and diagnostics: `/usr/lib/portmaster/portmaster`
EOF</code></pre></div><p><em>my uninstallation script</em></p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh

# Stop and disable Portmaster service
echo &quot;[+] Stopping and disabling Portmaster service...&quot;
service stop portmaster 2&gt;/dev/null || :
update-rc.d -f portmaster remove 2&gt;/dev/null || :

# Remove SysVinit service file
echo &quot;[+] Removing SysVinit service file...&quot;
rm -f /etc/init.d/portmaster

# Reload systemd daemon
#systemctl daemon-reload 2&gt;/dev/null || :

# Remove symlink to Portmaster UI
echo &quot;[+] Removing symlink /usr/bin/portmaster...&quot;
rm -f /usr/bin/portmaster

# Remove desktop files
echo &quot;[+] Removing desktop files...&quot;
rm -f /usr/share/applications/portmaster.desktop
rm -f /etc/xdg/autostart/portmaster-autostart.desktop

# Remove SELinux contexts if semanage is available
if command -v semanage &gt;/dev/null 2&gt;&amp;1; then
    echo &quot;[+] Removing SELinux contexts...&quot;
    semanage fcontext -d $(realpath /usr/lib)&#039;/portmaster/portmaster-core&#039; 2&gt;/dev/null || :
fi

# Remove folder /usr/lib/portmaster
echo &quot;[+] Removing folder /usr/lib/portmaster...&quot;
rm -fr /usr/lib/portmaster

# Remove folder /var/lib/portmaster
echo &quot;[+] Removing folder /var/lib/portmaster...&quot;
rm -fr /var/lib/portmaster

# Remove Portmaster icon
rm -f /usr/share/icons/hicolor/scalable/apps/portmaster.svg
rm -f /usr/share/pixmaps/portmaster.png

echo &quot;[i] Portmaster has been uninstalled.&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (matthew)]]></author>
			<pubDate>Tue, 26 May 2026 18:12:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=64000#p64000</guid>
		</item>
	</channel>
</rss>
