[Solved] Gparted - Gtk-WARNING **: cannot open display: :0

Everything about X, Gnome, KDE, ... and everything running on it

[Solved] Gparted - Gtk-WARNING **: cannot open display: :0

Postby slayer29179 » 2017-03-20 22:32

Hello!

Sorry for having to post another question!

Recently my Gparted has suddenly stopped working!

I haven't changed anything that I can think which would have affected it.

I'm using Debian GNU/Linux 9 (stretch) 64-bit with Gnome Version 3.22.2.

If I try to run it through my applications menu, it asks me the root password, like normal. After typing it in, it loads for a little bit, then just stops.

If I run it from terminal using:
Code: Select all
gparted

as my user I get:
Code: Select all
bash: gparted: command not found


If I run it as root or run it as:
Code: Select all
gparted-pkexec


I always get:
Code: Select all
dan@Dan:~$ su
Password:
root@Dan:/home/dan# gparted
Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/home.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-LocalStorage.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-USBHDD1.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-USBHDD21.mount → /dev/null.
Created symlink /run/systemd/system/run-rpc_pipefs.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-116.mount → /dev/null.
Created symlink /run/systemd/system/tmp.mount → /dev/null.
No protocol specified

(gpartedbin:4258): Gtk-WARNING **: cannot open display: :0
Removed /run/systemd/system/-.mount.
Removed /run/systemd/system/home.mount.
Removed /run/systemd/system/media-dan-LocalStorage.mount.
Removed /run/systemd/system/media-dan-USBHDD1.mount.
Removed /run/systemd/system/media-dan-USBHDD21.mount.
Removed /run/systemd/system/run-rpc_pipefs.mount.
Removed /run/systemd/system/run-user-1000.mount.
Removed /run/systemd/system/run-user-116.mount.
Removed /run/systemd/system/tmp.mount.


I've tired researching the issue but its getting a bit beyond me now with all the XOrg stuff! Slowly trying to learn!

Some people have said it can be a network issue and recommended disconnecting from it to see if it works. However, disconnecting from any network (WIFI or LAN) still doesn't make it work. I've tried pulling the cable out, the dongle (for WIFI), and choosing disconnect.

Some people have said I need to not be running in VNC, RDP, SSH or anything like that. But I'm not, I'm physically on the computer.

One post I found for Ubuntu (Which is based on Debian so most things should work... :?: )
Code: Select all
dan@Dan:~$ xhost +localhost
localhost being added to access control list
dan@Dan:~$ xhost +
access control disabled, clients can connect from any host


But it still doesn't work. :(

I'm not quite sure what information I need to provide!
So... have the journal?
http://pastebin.com/kLBQGHgu

Really sorry I can't provide more but this is all new too me! Fingers crossed, I'll soon be back answering other peoples questions! :)

Thanks

- Dan
Last edited by slayer29179 on 2017-03-21 19:23, edited 1 time in total.
slayer29179
 
Posts: 7
Joined: 2017-03-13 18:22

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby bw123 » 2017-03-21 00:21

$ su
Password:
root@Dan:/home/dan# gparted


Not sure about how to launch gparted on gnome, but in general I think this idea of su to root, then launching an x based app is not a good idea. There's probably a gparted.desktop file r some such around somewhere on your system, use it instead?

using Debian GNU/Linux 9 (stretch)

Adds more complication, check the bug reports, use parted or some other app until it's resolved.
jessie/KDE4.14.2 plasma netbook, 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
User avatar
bw123
 
Posts: 2378
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby Segfault » 2017-03-21 00:38

Try this
Code: Select all
su -
DISPLAY=:0 gparted

I do not have gparted, so I can't check it, plain parted is good enough for me.
Segfault
 
Posts: 412
Joined: 2005-09-24 12:24

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby slayer29179 » 2017-03-21 06:15

HI Segfault!

Thanks for your reply!

Unfortunately, it produces the same error :(

Code: Select all
root@Dan:/home/dan# DISPLAY=:0 gparted
Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/home.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-LocalStorage.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-USBHDD1.mount → /dev/null.
Created symlink /run/systemd/system/media-dan-USBHDD21.mount → /dev/null.
Created symlink /run/systemd/system/run-rpc_pipefs.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-116.mount → /dev/null.
Created symlink /run/systemd/system/tmp.mount → /dev/null.
No protocol specified

(gpartedbin:2882): Gtk-WARNING **: cannot open display: :0
Removed /run/systemd/system/-.mount.
Removed /run/systemd/system/home.mount.
Removed /run/systemd/system/media-dan-LocalStorage.mount.
Removed /run/systemd/system/media-dan-USBHDD1.mount.
Removed /run/systemd/system/media-dan-USBHDD21.mount.
Removed /run/systemd/system/run-rpc_pipefs.mount.
Removed /run/systemd/system/run-user-1000.mount.
Removed /run/systemd/system/run-user-116.mount.
Removed /run/systemd/system/tmp.mount.


Thanks

- Dan
slayer29179
 
Posts: 7
Joined: 2017-03-13 18:22

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby roseway » 2017-03-21 11:35

Try
Code: Select all
gksu gparted


(You run this as a normal user, and it asks for the root password.)
Eric
User avatar
roseway
 
Posts: 1466
Joined: 2007-12-31 22:50
Location: Kent, UK

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby pylkko » 2017-03-21 14:21

Are you running X at all?
User avatar
pylkko
 
Posts: 965
Joined: 2014-11-06 19:02

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby Segfault » 2017-03-21 15:13

What is your actual DISPLAY?
Code: Select all
echo $DISPLAY
Segfault
 
Posts: 412
Joined: 2005-09-24 12:24

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby slayer29179 » 2017-03-21 18:38

HI Roseway!
I don't have gksu installed! Normally I would use su or sudo :)

Hi Pyikko,
Sorry my knowledge is limited in this! I have a GUI interface I use if that helps? Using Gnome.

HI Segfault!
It doesn't seem to return anything?

Code: Select all
root@Dan:/home/dan# echo $Display

root@Dan:/home/dan#
slayer29179
 
Posts: 7
Joined: 2017-03-13 18:22

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby pendrachken » 2017-03-21 18:44

slayer29179 wrote:HI Roseway!
I don't have gksu installed! Normally I would use su or sudo :)

Hi Pyikko,
Sorry my knowledge is limited in this! I have a GUI interface I use if that helps? Using Gnome.

HI Segfault!
It doesn't seem to return anything?

Code: Select all
root@Dan:/home/dan# echo $Display

root@Dan:/home/dan#



That isn't what he wrote:

Code: Select all
echo $DISPLAY


Unix / Linux is CasEsEnSiTiVe, which can throw people used to Windows / OS/X off, the variable after the $ MUST be typed as it was when it was set:

$Display is NOT the same as $DISPLAY - as in this example. It's just another little pitfall that many people stumble over when setting up environment variables.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P
pendrachken
 
Posts: 1257
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby pylkko » 2017-03-21 18:50

I think the problem is that you are using GNOME on stretch and that uses Wayland (not X) by default now. Therefore Gparted is claiming it does not see a display (it is looking for an X display).
User avatar
pylkko
 
Posts: 965
Joined: 2014-11-06 19:02

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby slayer29179 » 2017-03-21 18:56

Hi Pendrachken,

Sorry! Here you go:

Code: Select all
root@Dan:/home/dan# echo $DISPLAY
:0
root@Dan:/home/dan#


Hi Pyikko.

I'm not 100% sure what that means, but if I want to use GParted again, do I need to move to Wayland? Or can I make GParted see use the X Display? :)

Thanks!!
slayer29179
 
Posts: 7
Joined: 2017-03-13 18:22

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby pylkko » 2017-03-21 19:08

It means that you need to log out of Wayland session and thus go back to the login in screen and select "Gnome" without wayland and then you can use gparted... but after you have used it, you would need to log out once again and log in again in order to continue using Wayland. Wayland is a more modern display protocol, but some older programs don't work on it.
User avatar
pylkko
 
Posts: 965
Joined: 2014-11-06 19:02

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby slayer29179 » 2017-03-21 19:23

Oh sweet! It worked straight away!

Thank you so much! :)

I'll keep switching back to it when I need to use GParted.

I'm assuming as you said older programs it should get updated not too soon if Debian has it by default now.

Thanks everyone again!

Love these forums!
slayer29179
 
Posts: 7
Joined: 2017-03-13 18:22

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby pylkko » 2017-03-21 20:12

Or you an use the "Disks" application in GNOME it has most of the things that Gparted has. Or you can use parted in a terminal window. Most X apps work on Wayland via a "translator app" called Xwayland, so old X apps can work on Wayland with that, but some just don't or it is hard to get them to work.
User avatar
pylkko
 
Posts: 965
Joined: 2014-11-06 19:02

Re: Gparted - Gtk-WARNING **: cannot open display: :0

Postby phenest » 2017-03-21 22:01

pylkko wrote:It means that you need to log out of Wayland session and thus go back to the login in screen and select "Gnome" without wayland and then you can use gparted... but after you have used it, you would need to log out once again and log in again in order to continue using Wayland. Wayland is a more modern display protocol, but some older programs don't work on it.

I have a package installed called xwayland which "provides an X server running on top of wayland". Does that mean I'm running both, sort of? I'm running Gnome on Stretch and gparted works fine, and I'm logged in with the default Gnome session.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Next

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable