Editing Forward X11 ssh su

From RHS Wiki
Jump to navigation Jump to search
  • Get from default user the X11 cookie
xauth list $DISPLAY
  • Get default DISPLAY
echo $DISPLAY
  • Change to root user (or a different one)
sudo su -l
  • Add X11 cookie to user (This cookie might change)
xauth add $(sudo -u youruser -H xauth list $DISPLAY)
export DISPLAY=$(sudo -u youruser -H echo $DISPLAY)