# change user to root
sudo su
# try to launch any WebBrowser
exo-open --launch WebBrowser
root@Computer:~# Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /home/$USER/.Xauthority which is owned by insert_real_username_here.)
It doesn't work because screen access is not allowed. You can go through the trouble of gaining access to .Xauthority, a pain but possible, OR
# launch application with correct user, NOT root. Here's a link from Synaptic for 2048 game.
su -c 'exo-open --launch WebBrowser "https://github.com/xiaoyong/2048-Qt"' insert_real_username_here
That works. It will open a new browser or open an existing browser if it is the Default.
Don't delay, fix today. Of course it's a bit more complex cause you need to check $SUDO_USER if running with [ $UID -eq 0 ] and translate that to the appropriate code language.
So what happens when Synaptic clicks on a link?
# change user to root USER/.Xauthorit y which is owned by insert_ real_username_ here.)
sudo su
# try to launch any WebBrowser
exo-open --launch WebBrowser
root@Computer:~# Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /home/$
It doesn't work because screen access is not allowed. You can go through the trouble of gaining access to .Xauthority, a pain but possible, OR
# launch application with correct user, NOT root. Here's a link from Synaptic for 2048 game. /github. com/xiaoyong/ 2048-Qt"' insert_ real_username_ here
su -c 'exo-open --launch WebBrowser "https:/
That works. It will open a new browser or open an existing browser if it is the Default.
Don't delay, fix today. Of course it's a bit more complex cause you need to check $SUDO_USER if running with [ $UID -eq 0 ] and translate that to the appropriate code language.