I just installed gparted because I have a 135 GB flash drive that I want to use for bootables for different OSs.

After I installed gparted and opened it from the Dash, I got the prompt for my password, entered it, the window closed, cursor turned to the loading symbol, I waited, the cursor went back to normal, that was it.

I installed it with sudo apt-get install gparted.

The output from gksudo gparted is

Error copying '/home/amolith/.Xauthority' to '/tmp/libgksu-k9KFpI': No such file or directory

The output from gparted-pkexec is

Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/boot.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-120.mount → /dev/null.
Created symlink /run/systemd/system/snap-core-2381.mount → /dev/null.

Created symlink /run/systemd/system/tmp.mount → /dev/null.
No protocol specified

(gpartedbin:6347): Gtk-WARNING **: cannot open display: :0
Removed /run/systemd/system/-.mount.
Removed /run/systemd/system/boot.mount.
Removed /run/systemd/system/run-user-1000.mount.
Removed /run/systemd/system/run-user-120.mount.
Removed /run/systemd/system/snap-core-2381.mount.
Removed /run/systemd/system/tmp.mount.

Any help would be greatly appreciated.

  • 1
    In a terminal run gksudo gparted or gparted-pkexec enter your password see what happens what output do you get ?
    – Ravexina
    Jul 26 '17 at 11:32
  • @Ravexina The output from both commands is in the question now.
    – Amolith
    Jul 26 '17 at 11:45
  • 2
    Seems related to Wayland, run xhost +local: then gparted-pkexec.
    – Ravexina
    Jul 26 '17 at 11:47
  • @Ravexina That fixed it! What does xhost +local: do?
    – Amolith
    Jul 26 '17 at 11:53
  • 1
    @Amolith man xhost explains clearly: The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server. And option +local: means grant access (+) for local family of users/addressese etc., and empty string member, thus : at the end.
    – PeterM
    Nov 8 '17 at 10:30

Your problem seems related to the wayland, run:

xhost +local:

it lets local users to connect to the display, then run gparted:


it should solve the problem.


  • could you give more specific info for wayland pls @Ravexina.. as i know it is an alternative server of XORG
    – solfish
    Jul 26 '17 at 13:54
  • @solfish I'm not really familiar with Wayland but I think it's because of the way it controls display/window permissions, some incomparability between package and Wayland might be the cause of issue. similar question.
    – Ravexina
    Jul 26 '17 at 18:47
  • While this fixes issue, this seems to be not persistent. Any idea of how to make it persistent after reboot?
    – PeterM
    Nov 7 '17 at 22:14
  • 1
    @PeterM Put the command somewhere like ~/.profile, it should get run automatically every time Ubuntu get started ;)
    – Ravexina
    Nov 8 '17 at 5:19
  • the xhost command solved my problem. After executing that I am able to run gparted normally. Thank you very much.
    – Francesco
    Apr 6 '19 at 19:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.