for AGES and AGES.

[link|http://fgouget.free.fr/sux/|sux] to not have had this years ago. Oh well you know.

for those of you on Debian (or derivative): apt-get install sux

Auto-transfers your Xauthority from your user to the the user you just switched to. And it works wonders.

sudo sux - allows me to run any X client I need to as root. I can also do sudo su - postgres to get pgaccess to work proper. Now, I can even get rid of gksu and gnomesu. Just make changes to the menu entries in the proper places and voila... all done.

This takes all the security risks of using xhosts out of the question. Now to get rid of all X*.hosts on all of my machines.

something like this will pipeline remotely run root owned X apps to you local machine:

ssh -X somehost
sudo sux -
firefox &


That should make it so that a remote run instance of Firefox, displays on you local machine without stupid "cannot open DISPLAY". WOOT! You can setup remote execute scripts to work magic and make all this stuff transparent.

For me, the FOSS arena never ceases to amaze me.