I've automated a daily restart for Firefox (edited by running crontab -e) and forgot to take into account whether the program would launch with administrator privileges.
killall -s SIGTERM firefox; sleep 15
export DISPLAY=:0.0
firefox -P "user" &
Browsing Javascript webpages as root presumably would be an extremely high security risk — Firefox thankfully seems to reject the request (from a VM):
restorecon: restorecon: SELinux: Could not get canonical path for /root/.mozilla/firefox/* restorecon: No such file or directory.
SELinux: Could not get canonical path for /root/.mozilla/firefox/* restorecon: No such file or directory.
Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /run/user/1000/.mutter-Xwaylandauth.<a potential ID string> which is owned by user.)
Will even web browsers be ran as root by cron? What if the root's crontab was used instead?