cannot run X application with su after a ssh login, one can face the following error :

root@ctrldb2:/home/ctrluser# emacs
X11 connection rejected because of wrong authentication.
Display localhost:10.0 unavailable, simulating -nw

In that case, solutions are 1)

ssh -X

su -

xauth merge /home/test/.Xauthority

or 2)

use sux

posted by citadel
To remove the following message when you execute xterm,

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

$ sudo passwd root


$ cd $HOME && touch .sudo_as_admin_successful

posted by citadel