paperlined.org
apps > host_sudo_su_boundaries
document updated 12 years ago, on Feb 9, 2012
This is an alternative to using sux / sudox to allow you to use X apps after sudoing.

It's hands-off, it lets you use your normal su/sudo commands without any alteration.

Change /etc/sudoers

Run visudo and add this:

Change ~/.bashrc

In the normal user account (before you su to root), change your .bashrc to include this: You'll have to logout and back in, before this will take effect.

Change ~/.ssh/config

This is somewhat tangential, but it's another way to make things convenient.

On your main X machine, add this to the bottom of your ~/.ssh/config: