X11 Forwarding When Issuing: sudo su

by Lalit Kapoor on 2010-01-082010-01-08T13:36:25ZY-m-d">January 8, 20102010-01-08T13:36:25ZF j, Y

If you have Xming installed and are forwarding X11 with putty you may notice that all is well until you need to run a gui application as the root user (after issuing sudo su).

If you just need to run the gui application and don’t require the entire root environment then issuing a sudo app should launch your application in Xming.

However, if you do require the root environment then follow these steps.

sudo su
cat /home/your_username/.Xauthority >> /root/.Xauthority

or you could do this

sudo su
su - your_username -c "xauth list" > X11auth
xauth add $(<X11auth)

I found this solution here: linuxquestions.org

blog comments powered by Disqus

Previous post:

Next post: