I would like to run gedit as root while logged into my regular user account. When I try to launch gedit from the command line as super user, I get this message:
Gtk-WARNING **: cannot open display:
Any suggestions or word arounds? It would make my life a lot simpler to edit files from gedit that only have root write permissions
"To get around this and other idiotic privilege problems created by using sudo, I just open a gnome-terminal window and run "sudo bash". That will give you root privileges with the proper environment setup for starting GUI apps as root. It also allows you to continue running the rest of your GUI applications as a less privileged user."
What do you think?
Since Porter's suggestion works, I don't want to break it to try this out. In the past I have tried simply running " sudo GUIapplication " but I have found this not to be a good idea.
The xauth issue is still going to be a problem afaik. I've always found that the simplest and most scalable way to deal with the 'need access as user 'n' for remote X applications' is to have the user create a ssh key, password protect it, familiarize themselves with ssh-agent for password-less access and use some sort of management solution for the user keys thus distributed. YMMV.