gksudo seeming to be somehow depreciated since 2017 as I see on the french forum documentation, is there an environment and version agnostic best practice allowing to use gedit as root?
(excluding vim, nano or tee: the use case being a GUI amendment of sources.list for instance)
My researchs brought me these proposals, are they equivalent or to be rejected :
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY geditgedit admin:///path/to/documentsudo -i geditsudo -H gedit
Any other ?