How to run a GUI application as a different user:
Suppose you are logged into your Linux box as user1 using some X window system already (with GNOME/Unity/..). Now you want to run some gui app as another user, user2.
Run:
xhost +
- Run as the user1. This enables access to user1's X window system from other users. You should see following output: 'access control disabled, clients can connect from any host'sudo su - user2
- Using your favorite terminal, log-in to second user.export DISPLAY=:0.0
- optional for some apps.