Running some GUI application as another user:
user1@laptop:~$ su - user2
user2@laptop:~$ leafpad ~/somefile.txt
No protocol specified
The problem is user2
doesn’t have access to your screen.
Solution:
xhost +
Probably not the safest one.
Source: thread