running firefox as root in a regular user session is not supported code example

Example 1: running firefox as root in a regular user session is not supported

sudo -i
test -f .Xauthority.bak && mv .Xauthority.bak .Xauthority
exit

Example 2: running firefox as root in a regular user session is not supported

XAUTHORITY=/root/.Xauthority sudo firefox

Example 3: running firefox as root in a regular user session is not supported

cp -a /home/youruser/.Xauthority .Xauthority
chown root: .Xauthority

Example 4: running firefox as root in a regular user session is not supported

test -f .Xauthority && mv .Xauthority .Xauthority.bak

Tags:

Misc Example