Is there a way to get/set system wide gsettings? I'm trying to get/set proxy settings from a C++ program which is owned by root. Currently within my program I'm making system calls to the following:
gsettings set org.gnome.system.proxy mode 'manual'
gsettings get org.gnome.system.proxy mode
gsettings get org.gnome.system.proxy mode 'auto'
gsettings get org.gnome.system.proxy mode
When I print out the system call response of the get system calls I always read back 'none'. After some research I understand gsettings is user based and that each session has it's own DBUS_SESSION_ADDRESS but is there a way either by system call or within C++ programmatically using Gio::Settings to apply these proxy settings system-wide in Ubuntu?