I am trying to run the command
gsettings get org.gnome.mutter overlay-key
from within Qt using QProcess like so:
QString gsettingsFullPath = "/usr/bin/gsettings";
QProcess proc;
proc.start(gsettingsFullPath, QStringList() << "get org.gnome.mutter overlay-key");
proc.waitForFinished( 10000 );
qDebug() << proc.readAllStandardOutput();
qDebug() << proc.readAllStandardError();
which gives me the error
"Unknown command get org.gnome.mutter overlay-key\n\nUsage:\n gsettings --version\n gsettings
...
Whenever I run the above command in a normal terminal it will respond as expected with 'Super_L'
.
It doesn't seem to matter, whether I invoke it through QProcess using the full path of gsettings or simply by 'gsettings' or invoke it via /bin/bash -c
.
I don't understand why gsettings doesn't seem to know the get-command when invoked via Qt?