So what is the proper way now to open file as root in linux?
Well luckily there is a way that is rather easy. It involves using the admin command instead of gksu or gksudo which presents you with a user password prompt just like gksu. Here’s what the admin command looks like.
Lets say you need to open a file in a text editor like gedit as root. Enter the following command in a terminal to open a file in gedit as root. Make sure to change “/path/to/file/name” to the actual path to a file you wish to open as root.
To open a directory as root with your file manager, enter the following in a terminal. In this example we’ll be using thunar file manager, but you can use nautilus or whichever you have installed on your system. Again replace “/path/to/directory/name” to the actual directory path you wish to open as root.
So there you have it, a proper way to open graphical applications as root. If this is at all confusing just leave a comment below and we’ll try to help.