Installed GParted but it's not opening

I tried to open GParted after installing it, as it was not preinstalled in Ubuntu Gnome 16.10, but it just asked for root password but didn't open.

Then I tried to open from terminal and it showed this

jp@JP-PC:~$ sudo gparted
Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/home.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-121.mount → /dev/null.
Created symlink /run/systemd/system/tmp.mount → /dev/null.
No protocol specified

(gpartedbin:3426): Gtk-WARNING **: cannot open display: :0
Removed /run/systemd/system/-.mount.
Removed /run/systemd/system/home.mount.
Removed /run/systemd/system/run-user-1000.mount.
Removed /run/systemd/system/run-user-121.mount.
Removed /run/systemd/system/tmp.mount.
jp@JP-PC:~$ 

But it didn't start. I also tried restarting computer. Can anyone tell what's the problem with it. Thank you.


The issue is there in Ubuntu 17.10. Solved it by running the following command:

xhost +local: