When you call a command like this:
sudo someCommand
and you get an error message saying Cannot Connect to X Server, while if you executed that command without the sudo it would execute properly, you can resolve this issue by replacing “sudo” with “xgd-su -u root -c” resulting the following command:
xgd-su -u root -c someCommand
xdg-su provides a graphical dialog that prompts the user for a password to run a command as another user.
This post is also available in: Greek
not working…
>If ‘xgd-su’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf xgd-su
Hello 🙂
xgd-su is not a typo, it is a script that is part of the xdg-utils package xdg-utils
Hi.
I don’t know if xgd-su is a typo or not but it didn’t work for me. xdg-su worked though.