Opening an application as root

I run GNOME and i want to open a file using gedit as root. I just want it as a shortcut on my desktop panel - so i guess a command or a script should do it. I tried the ‘sudo’ command but it didn’t work. How can i do it?

Never mind. I got the answer in the command

xdg-su -u root -c "gedit <file name>"


Works great !

So the tip goes to the others probably :slight_smile:

An easier one is;

gnomesu gedit <filename>

Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel
up 3:57, 2 users, load average: 0.47, 0.51, 0.32
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18