Plasma 5: Keeping an Eye on the Disk Quota
At this year’s KDE conference Akademy, I was working on a small plasmoid to continuously track the disk quota.
The disk quota is usually used in enterprise installations where network shares are mounted locally. Typically, sysadmins want to avoid that users copy lots of data into their folders, and therefor set quotas (the quota limit has nothing to do with the physical size of a partition). Typically, once a user gets over the hard limit of the quota, the account is blocked and the user cannot login anymore. This happens from time to time, since the users are not really aware of the current quota limit and the already used disk space.
Disk Quota as Plasmoid
Here is where the “Disk Quota” plasmoid helps: Once added to the panel, it shows all quota limits when clicking on the plasmoid:
Clicking on a quota entry will launch Filelight in the correct folder, if it is installed.
Disk Quota in System Tray
If the quota plasmoid is shown in the system tray (configure the systray and add it there), then the quota information is shown inline in the system tray popup:
To decrease the quota again, simply click on the respective quota entry in the list view. This launches Filelight with the correct location.
As of now, the Disk Quota plasmoid internally calls the command line tool ‘quota‘ to retrieve the quota information. The output of this tool is parsed and then interpreted to show the quota information as can be seen in the screen shots. If the quota command line tool is not installed, then the Disk Quota plasmoid shows diagnostics like this:
Since Disk Quota uses the command line tool ‘quota’ and launches ‘filelight’ when clicking on quota entries, you should ship ‘quota’ and ‘filelight’ when installing this applet. Most certainly, this plasmoid is only useful for networked systems (with remote mount points) and enterprise installations.
Status: Included in Plasma 5.5. ( Review Request: Disk Quota)
Credit where Credit is Due
During implementation lots of questions popped up. Thankfully, we were all at the KDE conference Akademy, and Kai, Sebas, Marco, Martin and the Visual Design group (for design help and icons) were there for quick help – Thanks a lot! Hope you all like the result :-)