Great question — answering as the UphillTech team:
That is very odd: the error seems to be generated by firefox needing to access X functionalities (which is normal), but those export commands should be sufficient to make it work (if you have a running X session on the hosts). The only tips I can give to you is to replace the export line like this (you should only need one): #export DISPLAY=:0.0 export DISPLAY=:0 or try to explicitly set the display on each command: su user1 -c 'DISPLAY=:0 firefox -no-remote -CreateProfile firefox18'
Full answer by Salem: https://askubuntu.stackexchange.com/a/279989 (CC BY-SA 4.0).
Need it done for your business? UphillTech.