Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X11: run a gnome app as another user

I have ubuntu + x11 + gnome.

I want to run a graphical application as another user.

However, when I start it from the command line using sudo -u otheruser app I get the error "No protocol specified".

How can I work arround this?

like image 857
flybywire Avatar asked Jul 14 '09 08:07

flybywire


2 Answers

xhost '+si:localuser:USERNAME'

like image 190
mykhal Avatar answered Nov 18 '22 12:11

mykhal


Execute this command first:

$ sudo xhost +

Then run the command you want as the other user:

$ sudo -i -u username
$ command you want to run

When you are done:

$ sudo xhost -
like image 8
codeape Avatar answered Nov 18 '22 13:11

codeape