[ale] I'd like to be able to run X programs from root

Jim Kinney jim.kinney at gmail.com
Tue Jan 31 10:23:19 EST 2012


On Tue, Jan 31, 2012 at 10:00 AM, Lightner, Jeff <JLightner at water.com>wrote:

> On a RHEL6 box I just tested doing standard ssh -X or ssh -Y it works the
> same as it did on RHEL5 (and RHEL4 and HP-UX 11i):
>
> Open the session to the box as normal user.
> Run "echo $DISPLAY" to see what display it set for that user e.g.
> localhost:10.0
>
> sudo su -
>
> After switch to root:
> export DISPLAY=<normal user's display> (e.g. export DISPLAY=localhost:10.0)
> export XAUTHORITY=<normal user's home directory>/.Xauthority  (e.g. export
> XAUTHORITY=/home/jlightner/.Xauthority).
>

These two line are the keys. Glad you tested this. I didn't have a bare
machine available to test.

>
> Run xterm as a test to see if it displays back properly.
>
> If it works on RHEL6 it should work on CentOS6.
>
> I tested this both from a Windows XP workstation running Cygwin (X Win)
> and from a CentOS 5 workstation and it worked to display the Xterm to both
> of those workstations from the RHEL6 server.
>
>
>
>
>
>
> -----Original Message-----
> From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jim
> Lynch
> Sent: Tuesday, January 31, 2012 8:38 AM
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] I'd like to be able to run X programs from root
>
> On 01/31/2012 06:59 AM, Jim Kinney wrote:
> >
> > Ah. Root has to build an xauthority file. Login from console as root
> > and run startx and that should do it. Then ssh -X wiil work as long as
> > you su and not su -.  Your nonroot ssh user also must loginto X once
> > from console as well.
> > Gvim is not a security sensitive application.
> >
> >
> OK thanks, I'll give it a try.
>
> Jim.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
>
>
> Athena(r), Created for the Cause(tm)
> Making a Difference in the Fight Against Breast Cancer
>
> ---------------------------------
> CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential
> information and is for the sole use of the intended recipient(s). If you
> are not the intended recipient, any disclosure, copying, distribution, or
> use of the contents of this information is prohibited and may be unlawful.
> If you have received this electronic transmission in error, please reply
> immediately to the sender that you have received the message in error, and
> delete it. Thank you.
> ----------------------------------
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
-- 
James P. Kinney III

As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as they
please, and those who survive will be left to contemplate the outcome.
- *2011 Noam Chomsky

http://heretothereideas.blogspot.com/
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120131/d457a5fd/attachment.html 


More information about the Ale mailing list