Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #230320

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

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups linux.debian.user
Subject Re: Bullseye: setting and using $DISPLAY after su -
Date 2021-01-04 13:30 +0100
Message-ID <Btx9L-6C5-9@gated-at.bofh.it> (permalink)
References <Bse9c-5EE-3@gated-at.bofh.it> <BseiS-5Xc-7@gated-at.bofh.it> <Bsesx-60A-1@gated-at.bofh.it> <BsgNI-7hJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 31, 2020 at 05:49:02PM -0700, Charles Curley wrote:
> On Thu, 31 Dec 2020 17:15:40 -0500
> Greg Wooledge <wooledg@eeg.ccf.org> wrote:

> Also, if I want to run as root, I want access to all the rootty system
> administrator things like fdisk and fsck. Plain vanilla su leaves one
> with the unprivileged user's PATH.

Only since buster, and this is fixable.  Just create this file with this
content:

unicorn:~$ cat /etc/default/su
ALWAYS_SET_PATH yes


> > It's worth pointing out that even on buster, "su -" does in fact clear
> > the value of DISPLAY,

> Also on buster:

> charles@hawk:~$ su -
> Password: 
> 
> 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?

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2020-12-31 23:00 +0100
  Re: Bullseye: setting and using $DISPLAY after su - <tomas@tuxteam.de> - 2020-12-31 23:10 +0100
    Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2020-12-31 23:20 +0100
      Re: Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2021-01-01 01:50 +0100
        Re: Bullseye: setting and using $DISPLAY after su - David Wright <deblis@lionunicorn.co.uk> - 2021-01-01 05:40 +0100
          [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2021-01-01 18:50 +0100
            Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - <tomas@tuxteam.de> - 2021-01-01 20:00 +0100
              Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2021-01-01 22:30 +0100
              Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2021-01-04 13:40 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su  - The Wanderer <wanderer@fastmail.fm> - 2021-01-04 13:50 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2021-01-04 14:40 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - <tomas@tuxteam.de> - 2021-01-04 15:50 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - David Wright <deblis@lionunicorn.co.uk> - 2021-01-06 05:40 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2021-01-06 13:40 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - David Wright <deblis@lionunicorn.co.uk> - 2021-01-06 17:30 +0100
                Re: [SOLUTION] Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2021-01-06 19:50 +0100
        Re: Bullseye: setting and using $DISPLAY after su - Greg Wooledge <wooledg@eeg.ccf.org> - 2021-01-04 13:30 +0100
          Re: Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2021-01-04 19:20 +0100
      Re: Bullseye: setting and using $DISPLAY after su - <tomas@tuxteam.de> - 2021-01-01 10:20 +0100
    Re: Bullseye: setting and using $DISPLAY after su - Charles Curley <charlescurley@charlescurley.com> - 2021-01-01 02:00 +0100
  Re: Bullseye: setting and using $DISPLAY after su - Mark Neyhart <Mark.Neyhart@akleg.gov> - 2021-01-01 04:10 +0100

csiph-web