xdg-su should not care if there is no GUI when being run as root.
Submitted by Tom Whipple
Assigned to Fathi Boudra
Description
Suppose we are already root. Then,
xdg-su -c whoami
Should simply print "root" without any difficulty. Instead, Command (xdg-su -c whoami) gave exit code 3, expected 0 Incorrect output written to stdout, as shown below expected stdout:root
Unexpected output written to stderr, as shown below: stderr:xdg-su: no graphical method available for invoking 'whoami' as 'root'
See test case xdg-su/t.su_basic_asroot