gksudo (kdesudo under KDE) runs the apps as root user thus any file permissions touched are on root's files, not the users files. ... gksudo sets HOME=~root, and copies . Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root.
What is Gksudo command?
gksu is a frontend to su and gksudo is a frontend to sudo. Their primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly. ... You can force the backend by using the gksudo command, or by using the --sudo-mode and --su-mode options.
What is the difference between sudo and Gksudo?
gksudo is a GTK-based frontend of sudo (BTW, kdesudo is a Qt-based frontend), however it (by default) handles more environmental variables( HOME , XAUTHORITY , etc.) than sudo thus making running commands as root safer.