Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
slayer29179
Posts: 9
Joined: 2017-03-13 18:22

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

#1 Post by slayer29179 »

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.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

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

#2 Post by bw123 »

$ 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.
resigned by AI ChatGPT

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

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

#3 Post by Segfault »

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.

slayer29179
Posts: 9
Joined: 2017-03-13 18:22

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

#4 Post by slayer29179 »

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

User avatar
roseway
Posts: 1528
Joined: 2007-12-31 22:50
Location: Kent, UK
Has thanked: 3 times
Been thanked: 4 times

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

#5 Post by roseway »

Try

Code: Select all

gksu gparted
(You run this as a normal user, and it asks for the root password.)
Eric

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#6 Post by pylkko »

Are you running X at all?

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

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

#7 Post by Segfault »

What is your actual DISPLAY?

Code: Select all

echo $DISPLAY

slayer29179
Posts: 9
Joined: 2017-03-13 18:22

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

#8 Post by slayer29179 »

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# 

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

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

#9 Post by pendrachken »

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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#10 Post by pylkko »

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).

slayer29179
Posts: 9
Joined: 2017-03-13 18:22

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

#11 Post by slayer29179 »

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!!

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#12 Post by pylkko »

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.

slayer29179
Posts: 9
Joined: 2017-03-13 18:22

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

#13 Post by slayer29179 »

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!

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#14 Post by pylkko »

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
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

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

#15 Post by phenest »

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.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#16 Post by pylkko »

phenest wrote:
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.
You are running the X session. If you log on with Gnome with Wayland then gparted will no longer work. You can always verify this by looking at the output of top. If X is started then you are on X, if xwayland is in the list, you are on Wayland. The few x apps that require privileges will not run on xwayland at all (gparted, synaptic package manager )

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#17 Post by pylkko »

pylkko wrote:
phenest wrote:
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.
You are running the X session. If you log on selecting 'Gnome with Wayland', then gparted will no longer work. You can always verify this by looking at the output of top. If X is started then you are on X, if xwayland is in the list, you are on Wayland. The few x apps that require privileges will not run on xwayland at all (gparted, synaptic package manager )

Post Reply