Gparted error

Hi, I just installed openSUSE Tumbleweed and installed GParted, but when I try to execute it I get the following error.

(gpartedbin:2013): Gtk-WARNING **: cannot open display:

Does any one knows how to fix this?

Aside from this being the wrong forum (All problems running on Tumbleweed should be posted to the Tumbleweed forum), is there some reason you’re installing gparted? You should already find parted as the partitioner and easily found and launched in YAST.


“gparted” works fine for me on Tumbleweed.

How are you starting it?

I would expect that error with

sudo gparted

Instead, use

su -

and then start at the root command line.

Thanks for the reply, sorry for posting it on the wrong forum but I don’t think that you helped me very much saying that I should use another program. I honestly think that if this happened with GParted it could easely happen to another programs, and my pourpose was to find the cause of the error to see if there was any fix to it, because regardless of the program what I want to do is contribute to the openSUSE community in some way, even if that way is finding bugs.


Thanks for the suggestion but I tryied to open using the GUI and it didn’t worked, so I went to the terminal and used

 sudo gparted

and got that error message, do you know what might be causing that?

I read that it could be caused because the xsession was under my user and while opening GParted it uses the root user and it can’t find the xsession.**-cannot-open-display-0-0-a-807450/

Could that be the reason? And if so how could I fix it? Because if so that any application with super user privileges would require to be run form the command line using

su -; <name-of-the-aplication> -<params>

, or am I wrong?

Moving to the tumbleweed forum, nntp please hold off any replies.

Moved to correct forum and re-opened.

Thanks for moving it malcomlewis.

To open a GUI requires the X-windows information be passed. And “sudo” does not do that, while “su -” does.

You could also use “kdesu” or “gnomesu” or “xdg-su”.

I don’t think you mentioned your desktop. I seem to recall that the menu item for “gparted” via XFCE is broken, while that for kde worked. I never tested with Gnome. I think I reported a bug on the XFCE problem for the live rescue CD.

Most admin commands that you use don’t need to open a GUI, so “sudo” is fine for that. I think there’s a way of configuring “sudo” to also handle GUI commands, but I normally don’t use “sudo” anyway.

To use plain “su” for a command, try:

su - -c "gparted"

You can use any command in place of “gparted”, including a full command line (as long as the quotes are used).

My desktop environment is GNOME 3.16.

I am able to call using the

su - -c gparted


For now this is the only program that I used and had this issue, but if I find another one i’ll let everybody know to help fix it.

Thanks for the help.

On 2015-05-20 02:26, cesar rickinho wrote:

> For now this is the only program that I used and had this issue, but if
> I find another one i’ll let everybody know to help fix it.

No need. Just apply the same solution.

Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Many non Tumbleweed users will stop reading from this point on. Your real audience is in the Tumbleweed forum. This will be moved there and is CLOSED for the moment.

Sorry, misunderstanding, it was already moved. Open and kicking.