From: Nikos Chantziaras <realnc@arcor.de>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: X programs as root
Date: Sun, 17 Oct 2010 16:00:05 +0300 [thread overview]
Message-ID: <i9es0k$9ug$1@dough.gmane.org> (raw)
In-Reply-To: <AANLkTinBaqD3JSdRveng96=htC=P_NCbgX85O2fr6LLi@mail.gmail.com>
On 09/22/2010 09:48 PM, Andrey Vul wrote:
> When I launch X programs via sudo, I get the following:
>
> $sudo gui-admin
> No protocol specified
> gui-admin: cannot connect to X server :0
>
> ( Assume gui-admin is an X program )
>
> But (gk|kde)su(do)? works. This is somewhat confusing.
I just discovered something. Keeping HOME is not really recommended,
because the programs that run as root will then use your user's
configuration files and sometimes will set 'root' as their owner. As
you can imagine, this is not a good thing.
It seems what X programs really need is the .Xauthority file of the
current X session. All you have to do is add this line to your ~/.bashrc:
export XAUTHORITY="$HOME/.Xauthority"
Then you don't have to configure sudoers to keep the HOME env var.
next prev parent reply other threads:[~2010-10-17 13:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 18:48 [gentoo-user] X programs as root Andrey Vul
2010-09-22 19:01 ` Volker Armin Hemmann
2010-09-22 19:08 ` [gentoo-user] " Nikos Chantziaras
2010-09-23 1:18 ` Dale
2010-09-24 22:24 ` Andrey Vul
2010-09-24 23:35 ` Nikos Chantziaras
2010-09-25 3:03 ` Dale
2010-09-25 7:43 ` Volker Armin Hemmann
2010-09-25 9:09 ` Dale
2010-09-25 8:14 ` Yohan Pereira
2010-09-25 9:21 ` Dale
2010-09-25 9:37 ` Yohan Pereira
2010-09-25 10:18 ` Dale
2010-09-26 11:06 ` Dale
2010-09-26 14:11 ` Robin Atwood
2010-09-26 14:28 ` Dale
2010-09-27 17:54 ` Helmut Jarausch
2010-10-05 5:22 ` Andrey Vul
2010-10-17 12:45 ` Kevin O'Gorman
2010-10-17 13:00 ` Nikos Chantziaras [this message]
2010-10-17 13:03 ` Nikos Chantziaras
2010-10-17 15:37 ` Alan McKinnon
2010-10-17 17:13 ` Kevin O'Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i9es0k$9ug$1@dough.gmane.org' \
--to=realnc@arcor.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox