Introduction to Gparted

Gparted is the Gnome Partition Editor, a Gtk 2 GUI for other command line tools that can create, reorganise or delete disk partitions.

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

Gparted Dependencies


Gtkmm-2.24.4 and parted-3.2


GNOME Doc Utils and Rarian-0.8.1

User Notes:

Installation of Gparted

Install Gparted by running the following commands:

./configure --prefix=/usr    \
            --disable-doc    \
            --disable-static &&

This package does not come with a testsuite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--disable-doc: This switch disables building of the optional documentation. Remove it if you have installed GNOME Doc Utils.

Using Gparted

To manipulate file systems Gparted has a run time dependency on various file system tools (you only need to install the tools for file systems you actually use): Hdparm-9.48 (required for optionally display serial number device information), e2fsprogs (installed as part of LFS), jfsutils-1.1.15, ntfs-3g-2015.3.14, reiserfsprogs-3.6.24, xfsprogs-4.2.0, btrfs-progs, dosfstools, mtools (required to read and write FAT16/32 volume labels and UUIDs), hfsutils, hfsprogs, nilfs-utils and reiser4progs.

Root privileges are required to run Gparted. If you wish to run the application from the menu, further applications and configurations are necessary. Examples of applications that may be used: gksu, kdesudo, or xdg-su. Other solution is to use pkexec, from Polkit-0.113, but some configuration is necessary. Another simple solution is ssh-askpass-7.1p1. Below, we describe these two alternatives: "ssh-askpass" and "pkexec".


To optionally use ssh-askpass-7.1p1 if it is installed in your system, run the following commands as the root user:

cp -v /usr/share/applications/gparted.desktop /usr/share/applications/gparted.desktop.back &&
sed -i 's/Exec=/Exec=sudo -A /'               /usr/share/applications/gparted.desktop

Now, clicking in the menu item for Gparted, a dialog appears in the screen, asking for the administrator password.


To optionally use pkexec, you need polkit-gnome-0.105, and ConsoleKit2-1.0.0 installed with support to Linux-PAM-1.2.1 and Polkit-0.113. As the root user, configure Gparted-0.23.0 and Polkit-0.113 with the following commands:

cp -v /usr/share/applications/gparted.desktop \
                                     /usr/share/applications/gparted.desktop.back &&
sed -i 's:/usr/sbin/gparted:/usr/sbin/gparted_polkit:' \
                                     /usr/share/applications/gparted.desktop      &&

cat > /usr/sbin/gparted_polkit << "EOF" &&

pkexec /usr/sbin/gparted $@
chmod -v 0755 /usr/sbin/gparted_polkit

Still as the root user, configure Polkit-0.113 and Gparted-0.23.0 to use pkexec:

cat > /usr/share/polkit-1/actions/org.gnome.gparted.policy << "EOF"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"

  <action id="">
    <description>Run GParted</description>
    <message>Authentication is required to run GParted</message>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>

chmod -v 0644 /usr/share/polkit-1/actions/org.gnome.gparted.policy

Now, clicking in the menu item for Gparted, a dialog appears in the screen, asking for the administrator password.


Installed Programs: gparted, gpartedbin and gparted_polkit (optional)
Installed Libraries: None
Installed Directories: /usr/share/gnome/help/gparted and /usr/share/omf/gparted

Short Descriptions


is a shell script which sets up the environment before calling gpartedbin.


is the Gparted binary.


is an optional script which can be used to run gparted with polkit, from a menu.

Last updated on 2015-09-22 18:46:01 +0000