Re: Xfconf-query with sudo

Hello and welcome.

It would appear that using the sudo command doesn't allow xfconf-query to properly connect to the xfconfd daemon to track the change. Most probably because sudo doesn't properly create access to your X environment. On my system, using your sudo command, I notice the entry change in my .config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml file (after about a 2-3 second delay), but not in the settings editor. On logout, xfconfd will write the settings it has in memory and overwrite the change made to the xml file.

However, using gksudo (or pkexec if you're trying to keep up with the Jonses) allows xfconf-query to connect to xfconfd and make the correct settings change:

Re: Xfconf-query with sudo

Sorry for posting in an old thread but this is the first result in the search of "xfconf-query sudo" and I wanted to share how did I solve this without gksudo (you can't dowload it in the Fedora's official repository).I have a configuration script which requires sudo and uses xfconf-query.