Here's a problem... You are running X-windows successfully as the user you logged on as but need to SU/SUDO to another user and still use the X?

No worries, this can be solved too!

As the user logging on using X11 forwarding:

> xauth nlist > /tmp/savexauth
> echo export DISPLAY=$DISPLAY > /tmp/savedisplay
> sudo /bin/su - [USER]

Then as the new user:

> xauth nmerge /tmp/savexauth
> . /tmp/savedisplay

A good practice is also to remove the files as any other user can "steal" your screen otherwise:

rm /tmp/savexauth
rm /tmp/savedisplay

Good luck!

 

Donate

Please consider supporting my efforts.



Donate

Please consider supporting my efforts.



Google Ads