Wiki Logo
/
Home/Proxmox/Remove Subscription Notice
Proxmox

Remove Subscription Notice

Pick a version and paste the following contents of the codeblock in your hosts shell

PVE 9.x

Options (click to view):

One-liner patch once
f=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; b="${f}.bak.$(date +%Y%m%d-%H%M%S)"; cp -a "$f" "$b" && [ "$(grep -Fc 'checked_command: function (orig_cmd) {' "$f")" -eq 1 ] && sed -i '0,/checked_command: function (orig_cmd) {/s//checked_command: function (orig_cmd) {\n            orig_cmd();\n            return;/' "$f" && grep -q $'checked_command: function (orig_cmd) {\n            orig_cmd();\n            return;' "$f" && systemctl restart pveproxy && echo "OK - backup: $b" || { echo "FAILED - restoring $b"; cp -a "$b" "$f"; systemctl restart pveproxy; }

ā€Ž

Auto-patch after update

Create the patch script:

cat >/usr/local/sbin/pve-nosub <<'EOF'
#!/bin/bash
f=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
p=$'checked_command: function (orig_cmd) {\n            orig_cmd();\n            return;'

[ -f "$f" ] || exit 0
grep -Fq "$p" "$f" && exit 0
[ "$(grep -Fc 'checked_command: function (orig_cmd) {' "$f")" -eq 1 ] || exit 1

sed -i '0,/checked_command: function (orig_cmd) {/s//checked_command: function (orig_cmd) {\n            orig_cmd();\n            return;/' "$f" &&
systemctl restart pveproxy
EOF

chmod +x /usr/local/sbin/pve-nosub

Run it automatically after package updates:

echo 'DPkg::Post-Invoke { "/usr/local/sbin/pve-nosub || true"; };' \
>/etc/apt/apt.conf.d/99-pve-nosub

Patch now:

/usr/local/sbin/pve-nosub

After future Proxmox updates, the patch is automatically reapplied.

PVE v7.x-8.x

Options (click to view):

One-liner patch once
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service