Ask Your Question
0

Can't launch Gparted from terminal with sudo.

asked 2017-03-08 02:44:02 -0500

TheSpanishInquisition gravatar image

updated 2017-03-08 02:46:46 -0500

Hi
I need to shrink my /home partition to make room to enlarge my /root partition (I am using LVM). I tried launching Gparted from gnome, but it does nothing. I tried launching it from terminal with su, sudo and both give me the following error:
(gpartedbin:16061): Gtk-WARNING **: cannot open display: :0
I tried installing beesu and that didn't change anything.
Thanks in advance

edit retag flag offensive close merge delete

Comments

Gparted is not able to resize LVMs. What you need to do is boot a live system and use blivet-gui to resize your volumes. Blivet needs to be installed on the live system first.

florian gravatar imageflorian ( 2017-03-08 08:38:23 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2017-03-08 04:13:54 -0500

SauravSengupta gravatar image

updated 2017-03-08 05:41:04 -0500

It seems that you are trying to run it in a Wayland session, which will not work. This would be the default case in Fedora 25; see here. There are two common solutions:-

  • Log out and, on the login screen where you type your password, click the small cogwheel icon next to the Sign In button and select GNOME on Xorg, then log in and run GParted. (I'm assuming that you are using GDM. If you are using SDDM, select GNOME on Xorg (or Plasma if you have KDE installed) from the list at the bottom left corner.)

  • Use a different disk management application, such as GNOME Disks (gnome-disks) or gdisk or parted (the last two are text-mode applications; the last is the text-mode counterpart of GParted).

    N.B. GNOME Disks is mentioned as a suggestion on the page linked above, but I don't know if it really can resize existing partitions.

edit flag offensive delete link more

Comments

This workaround works for me:

$ xhost si:localuser:root
$ sudo zenmap
alcir gravatar imagealcir ( 2017-03-08 09:30:33 -0500 )edit
0

answered 2018-02-19 11:07:39 -0500

Only use $ xhost +

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-08 02:44:02 -0500

Seen: 4,842 times

Last updated: Mar 08 '17