9

Ubuntu 10.10 warns me about low disk space even when there are about 2 GiB free. For me "low disk space" is 50 MiB or less as I use to use my disks at 100% capacity. The warning could be useful for me if it was warning only when I am really running nearly OUT of space. Can this be configured?

7

The notification is part of the gnome-settings-daemon, you can change its behaviour in gconf-editor. To do so:

  1. Press Alt + F2 and enter gconf-editor
  2. Go to apps > gnome_settings_daemon > plugins > housekeeping
  3. Change free_size_gb_no_notify to 0.05 (for ~50MB) or whatever you'd prefer.

There is also a bunch of other settings in there you may find helpful.

  • 2
    Unfortunately it only accepts integer values, so I can't set it 0.05 - only 1 GB at least. – Ivan Nov 5 '10 at 21:31
  • 1
    If you create the key of type 'Float', you will be able to specify a value of 0.1 (100MB). I was unable to enter lower value, because of the precision limited to 1 decimal digit – Anastas Giokov Sep 12 '13 at 9:10
  • ubuntu 18.04 seems moved to dconf-editor – Aquarius Power Jan 17 at 15:49
1

The terminal way, to get the actual GB value:

gsettings get org.gnome.settings-daemon.plugins.housekeeping free-size-gb-no-notify

to set a new GB value of 35

gsettings set org.gnome.settings-daemon.plugins.housekeeping free-size-gb-no-notify 35
  • or using dconf-editor, but it is very limited, we cant set a float, I want 500MB (0.5GB) and it is an integer that cant be changed... so annoying... – Aquarius Power Jan 17 at 15:49
0

at ubuntu 18.04, as the precision is still low (GB and not MB), do it yourself (btw, I only get warnings for root FS).

script this and add to startup apps:

#/bin/bash

#1st disable system default:
gsettings set org.gnome.settings-daemon.plugins.housekeeping free-size-gb-no-notify 0

nDelayCheck=30;
nDelayTakeAction=$((nDelayCheck*10));
nLimMB=500;
while true;do 
  nFreeRootMB=$(df / --output=avail -B M |tail -n 1 |tr -d M |awk '{print $1}');
  if((nFreeRootMB<nLimMB));then 
    date;
    declare -p nFreeRootMB;
    notify-send -u critical -t 10 "Local root filesystem available space is too low: ${nFreeRootMB}MB.";
    sleep $nDelayTakeAction;
  fi;
  sleep $nDelayCheck;
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.