LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2013, 01:44 AM   #1
Karmaflute
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Rep: Reputation: 0
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?
 
Old 04-28-2013, 02:08 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
have the system admin change the sudo rule
you have to have read/ write permission to user2's home folder
 
Old 04-28-2013, 02:41 AM   #3
Karmaflute
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
How do I go about doing this?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Impersonating ROOT privileges within a user app Litch84 Programming 6 11-11-2009 01:44 AM
running program remotely on different user learnq Linux - Server 6 03-24-2008 09:23 PM
Running another script from a gtk+ program shandy^^^ Programming 1 02-03-2006 11:53 AM
Running user program from root kilativv Linux - Software 2 07-31-2004 01:49 AM
problem running program as user FlAWD Linux - General 1 10-15-2003 08:31 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration