Skip to content

fix(linux): KDE Neon / Wayland support and NetworkManager DNS - #210

Open
saremeskandary wants to merge 1 commit into
DnsChanger:mainfrom
saremeskandary:fix/kde-neon-linux-support
Open

fix(linux): KDE Neon / Wayland support and NetworkManager DNS#210
saremeskandary wants to merge 1 commit into
DnsChanger:mainfrom
saremeskandary:fix/kde-neon-linux-support

Conversation

@saremeskandary

Copy link
Copy Markdown

Summary

  • NetworkManager DNS: Rewrote LinuxPlatform to use nmcli instead of writing directly to /etc/resolv.conf. On KDE Neon (and any distro using NetworkManager), resolv.conf is managed by NM and overwritten immediately — changes never persisted. nmcli con mod + nmcli con up persists DNS across reboots.
  • Wayland / KDE rendering: Added --ozone-platform-hint=auto and --enable-features=UseOzonePlatform,WaylandWindowDecorations on Linux so Electron uses the native Wayland backend under KDE Plasma 6 instead of falling back to XWayland, fixing DPI, window decoration, and rendering issues.
  • Build fixes:
    • Fixed Linux icon from icon.icns (macOS format) → icon.png
    • Set executableName: dnschanger to avoid a space in the install path (/opt/DNS Changer/) which caused Chromium's zygote launcher to split the path and crash (execvp: /opt/DNS)
    • Pinned explicit deb dependencies including network-manager
    • Added build/postinst.sh — runs after dpkg -i, sets chrome-sandbox SUID permissions and creates /usr/bin/dnschanger symlink automatically
  • getInterfacesList(): Now returns connected interfaces via nmcli device status instead of an empty array
  • flushDns(): Tries resolvectl flush-caches (systemd 239+) first, falls back to systemd-resolve --flush-caches

Test plan

  • Install .deb on KDE Neon — dnschanger command available after install with no manual steps
  • App launches without sandbox/execvp errors
  • DNS change applies and persists after reconnect (nmcli con show <active> | grep DNS)
  • Clear DNS restores automatic DNS from DHCP
  • App renders natively under Wayland (check with xlsclients — should not appear)

🤖 Generated with Claude Code

…ager

- Rewrite LinuxPlatform to use nmcli instead of writing /etc/resolv.conf
  directly; KDE Neon uses NetworkManager which overwrites resolv.conf
- Implement getInterfacesList() via nmcli device status
- Add flushDns() fallback: resolvectl first, then systemd-resolve
- Add Wayland/Ozone flags (ozone-platform-hint=auto) for native KDE rendering
- Fix electron-builder.yml: use icon.png (not .icns) for Linux, set
  executableName=dnschanger to avoid spaces in install path, pin deb depends,
  add postinst.sh to set chrome-sandbox SUID and create /usr/bin symlink

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant