LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running a GTK program while impersonating a user? (https://www.linuxquestions.org/questions/linux-newbie-8/running-a-gtk-program-while-impersonating-a-user-4175459842/)

Karmaflute 04-28-2013 12:44 AM

Running a GTK program while impersonating a user?
 
I am currently logged in a 'user1' and impersonate 'user2' in the console using 'sudo -u user2 -i'. Now I would like to edit files as that user using gedit; I cannot do so with user1 because it does not have permission.

However, attempting to run any GTK application as user2 while impersonating yields the following error:

Code:

Gtk-WARNING **: cannot open display: :0.0
From my research I understand that the problem (I think) is because the X server is owned by the currently logged in user1 and not user2. Is there a way to allow the behavior I'm looking for?

John VV 04-28-2013 01:08 AM

have the system admin change the sudo rule
you have to have read/ write permission to user2's home folder

Karmaflute 04-28-2013 01:41 AM

How do I go about doing this?


All times are GMT -5. The time now is 04:12 AM.