[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Off-topic: Gmail Grrrr.



On 25/12/13 14:08, Joel Rees wrote:
> On Tue, Dec 24, 2013 at 9:42 PM, Reco <recoverym4n@gmail.com> wrote:
>>  Hi.
>>
>> On Tue, 24 Dec 2013 13:29:28 +0100
>> Ralf Mardorf <ralf.mardorf@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.


Reply to: