inotify_add_watch failed in Octave’s GUI

Version 3.8 of Octave has an unofficial and experimental GUI similar to Matlab. But on my Linux Mint 17 (Quiana), based on Ubuntu 14.04 (Trusty Tahir), I got a warning:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No space left on device. It does not appear in the console mode. I send a bug report and got a prompt fix. Thanks to Mike Miller of the Octave team for assistance and the fix. It was a system configuration issue and not really the fault of Octaves’s developers.

Find the fix below. It should work in Ubuntu 14.04 and in other distributions based on Ubuntu, too.

The problem

The whole error or warning message is:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No space left on device
Warning: QFileSystemWatcher: failed to add paths:

Shortly it says: No space left on device, but there was enough space on my drive. The problem are the inodify watches allowed per user. As I typed sudo sysctl fs.inotify.max_user_watches in the terminal I got 8192. That is to less.

The solution

To increase it temporally type:

sudo sysctl fs.inotify.max_user_watches=65536

in the terminal and the message is gone for this terminal session. When you start Octave with GUI:

octave --force-gui &

in the same terminal the message should not appear. To make the edit permanent append:


in /etc/sysctl.conf by e.g. typing the following command in a terminal:

sudo echo "fs.inotify.max_user_watches=65536" >> /etc/sysctl.conf


sudo sysctl -p /etc/sysctl.conf

in a terminal or after a reboot the problem is gone permanently.