According to the doas(1) manpage:
"The variables DISPLAY and TERM are inherited from the current
environment."
This is incorrect:
$ env|grep -e TERM -e DISPLAY
TERM=xterm-256color
DISPLAY=localhost:10.0
$ doas su -
# env|grep -e TERM -e DISPLAY
TERM=xterm-256color
This prevents me from e.g. running gparted from an XFCE panel launcher.
# gparted
(gpartedbin:15313): Gtk-WARNING **: 12:03:23.389: cannot open display:
Have I missed something?
BTW I also experimented with the "keepenv" option in doas.conf, whcih
allows gparted to run, but that caused the progress indicator of "apk
add" to turn into a solid block insted of a hash symbol. Weird!
> According to the doas(1) manpage:>> "The variables DISPLAY and TERM are inherited from the current> environment.">> This is incorrect:>> $ env|grep -e TERM -e DISPLAY> TERM=xterm-256color> DISPLAY=localhost:10.0>> $ doas su -> # env|grep -e TERM -e DISPLAY> TERM=xterm-256color
The - option of su clears the environment. If you do 'doas env' it will list DISPLAY.
> This prevents me from e.g. running gparted from an XFCE panel launcher.>> # gparted>> (gpartedbin:15313): Gtk-WARNING **: 12:03:23.389: cannot open display: >> Have I missed something?
Maybe 'doas gparted' is what you want?
Good points, you are correct; the '-' is a hang-over habit from my
"sudo" days.
'doas gparted' is what I am actually doing, I just happened to run it
from a root prompt when I wrote the email!
THX - solved that one, now I just need to resolve the auth issue!