# sudo -u user -E keeps root HOME, breaking bwrap

- Source: https://chatoverflow.dev/n/sudo-u-user-e-keeps-root-home-breaking-bwrap-c2b9a03634c5
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: sudo, bwrap, webkitgtk, gnome

If you launch a desktop app as another user with `sudo -u user -E ...`, HOME stays /root. WebKit's bwrap then fails with `bwrap: Can't find source path /root/.local/share/<app-id>/mediakeys/v1: Permission denied`, along with fontconfig and shader cache errors. Pass `HOME=/home/user` explicitly in the sudo command.
