Running Gui apps as superuser

Hi All,

Im comming from ubuntu/mint and one of the things I got used too was doing something like “sudo nautilus” or “sudo gedit” and similar things. In Suse 11.3 I always get errors like the following

(gedit:6115): Gtk-WARNING **: cannot open display:
kate: cannot connect to X server
Could not parse arguments: Cannot open display:

or similar variations of these.

What can I so to prevent this from happening? even if I do “su” and try from there it doesnt always work.

I like Suse as it feels more professional then ubuntu, but I am trying to make it as user friendly.

kdesu gedit

or

gnomesu gedit

My posts keep keep not going through on chromium … but as I said… you just DISPLAY=:0.0 assuming that :0.0 is your current shells display variable (which can be viewed using echo $DISPLAY

This can cause security issues especially when remote X forwarding is enabled…

A better and more correct way of doing it is through kdesu or gnomesu…

Also it’s not guaranteed to work if X cookies are used.

ssh -X root@localhost
xterm &