Have you tried using gksudo?

This e-mail transmission, including any attachments, is intended only for the named recipient(s) and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this transmission in error, or are not the named recipient(s), please notify the sender immediately by return e-mail and permanently delete this transmission, including any attachments.

On Aug 9, 2011 2:12 PM, "Theodore Ruegsegger" <gruntly@gmail.com> wrote:
> Gregory Avedissian wrote:
>> I can't set you straight, and I don't know the security implications, but
>> this works:
>>
>> ssh -X user@remote-host
>> su-to-root -X -c <command>
>>
>> You might be asked for the root password, the user password or neither,
>> depending on your setup.
>
> Hmm...hadn't heard of su-to-root before; thanks. Googling suggests
> it's a shell script, though it doesn't seem to be available on my
> Ubuntu karmic or the repositories. I did find something called sux
> which is an X-preserving wrapper around su. Alas, since I've disabled
> the root password, I can't use that.
>
> I'm a little surprised sudo doesn't have a way of doing this without
> security risks, since the maintainers are obviously aware of the issue
> and there's enough information in the environment to deduce the
> correct .Xauthority. Perhaps in the next release.
>
> Thanks for the reply,
> Ted
> _______________________________________________
> Wlug mailing list
> Wlug@mail.wlug.org
> http://mail.wlug.org/mailman/listinfo/wlug