X Display Issues as sudo

When you do sudo to another user, you may have to do extra things to get X display working or any GUI working. Many organizations do not allow root login so X window cookie does not get generated and hence GUI does not work. I prayed to Google God for solutions and...