Friday, March 13, 2015

Create desktop file to see freespace

You need gnome terminal to create editable profile.

Open terminal and run

df -h

to see free space and identify the name of your system partition.

Let's say your system partition is /devsda5.

Then, create a desktop file with the content:

[Desktop Entry]
Name=Show free spacce
Comment=Show free space
Exec=gnome-terminal --window-with-profile=new1 -e "df -h /dev/sda5"
Icon=gnome-disks
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;

Save it to usr/share/applications and make it executable. Now you can run it from search.

To see space on all partitions, just use this line:

 Exec=gnome-terminal --window-with-profile=new1 -e "df -h"

No comments:

Post a Comment