On 25/12/13 14:08, Joel Rees wrote:
> On Tue, Dec 24, 2013 at 9:42 PM, Reco <recovery...@gmail.com> wrote:
>>  Hi.
>>
>> On Tue, 24 Dec 2013 13:29:28 +0100
>> Ralf Mardorf <ralf.mard...@alice-dsl.net> wrote:
>>
>>> This would lead to "Error: cannot open display: :0.0".
>>> Sure, $ xhost +; sudo -u [...] does the trick,
>>
>> No, if you do it smart way, such as (in .xsessionrc):
>>
>> xauth extract - $DISPLAY | sudo -u user1 -- sh -c \
>> "cat -> /home/user1/.Xauthority"
>> xauth extract - $DISPLAY | sudo -u user2 -- sh -c \
>> "cat -> /home/user1/.Xauthority"
>>
>> And configure sudo to keep $DISPLAY.
>> [...]
> 
> I'm using "xhost" to do something similar, maybe the same thing? I
> described it a couple of years ago:
> 
> http://reiisi.blogspot.jp/2011/08/simple-sandbox-for-firefox.html
> 
> I'd be interested in comments.
> 

Why not use sux instead?

from "man sux":-
"sux is a wrapper around the standard su command which will transfer
your X credentials to the target user.

Note, suxterm forces ARGS to be 'xterm', and will try to launch an
xterminal window."


Kind regards.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52be74fe.1000...@gmail.com

Reply via email to