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

Re: Bullseye: setting and using $DISPLAY after su -



On Mon, 4 Jan 2021 07:25:30 -0500
Greg Wooledge <wooledg@eeg.ccf.org> wrote:

> > Today is Setting Orange, the 73rd of The Aftermath, 3186. All Hail
> > Discordia! root@hawk:~# env | grep DISPLAY
> > DISPLAY=:0  
> 
> Clearly you're doing something special in root's .profile -- at the
> very least, you're running that ddate command.  Is it possible you're
> also hard-coding something like 'export DISPLAY=:0' there?
> 
> > root@hawk:~# xclock &
> > [1] 3550
> > root@hawk:~# 
> > 
> > (xclock ran successfully.)  
> 
> Is it possible you also hard-coded something like
> 'export XAUTHORITY=/home/charles/.Xauthority' in root's .profile?
> 

Good thoughts, both. But, no such luck. I also checked the /etc
equivalents, and others mentioned in man bash, and found none such.

However, in the course of doing that I noticed that .Xauthority is now
a regular file, owned by root:root and 0600, as it should be. The date
on it is earlier this morning, when I logged in via SSH from another
machine. With the su alias I described earlier, xclock works.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: