Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-01-16 09:44:30

10011001
Member
Registered: 2016-06-24
Posts: 4

starting xfce4-display-settings from root run bashscript

Hi everyone,

I'm trying to start xfce4-display-settings from a root run bash script as a normal user but always get the following error

(xfce4-display-settings:3609): xfce4-display-sttings-ERROR **: Failed to connect to xfconf daemon: Failed to connect to socket /tmp/dbus-VPIPHBhq57: Verbindungsaufbau abgelehnt.

Has anyone experienced the issue or knows how to work around this.

What I do is

su $username xfce4-display-settings

Thanks!

Best Regards

10011001

Offline

#2 2017-01-16 11:23:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,493

Re: starting xfce4-display-settings from root run bashscript

You shouldn't run any of Xfce's configuration components as root. They are not intended to be run as such. The settings are all user or profile-specific, not system or root specific.

Why are you trying to run them as root? What is it that you are trying to do?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2017-01-16 11:28:45

10011001
Member
Registered: 2016-06-24
Posts: 4

Re: starting xfce4-display-settings from root run bashscript

I'm writing a provisioning script that automates a few task that are required after the installation of a custom iso for kiosk systems.
The script itself has to be run as root. And I tried to start xfce4-display-settings as the normal user using su but that leads to mentioned error.

Best regards

10011001

Offline

#4 2017-01-16 19:53:32

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,493

Re: starting xfce4-display-settings from root run bashscript

xfconfd, which manages the Xfce configuration system, is run as a daemon under the logged in users profile. When you try to use one of Xfce's configuration tools, it will connect to that daemon to make the change. If you su to root, it won't work because root doesn't have a current, active, and/or valid xfconfd daemon running.

Therefore, even if you could use this method, none of the changes you would make would affect the current user's profile.

Now, if you are trying to do something else, like change some profile settings for a user profile that is not currently logged in, then just manually change the information in that user's profile's ~/.config/xfce4/xfconf/xfce-perchannel-xml/* config files. Don't use the configuration tools. In your example above, just edit /home/KIOSK_USER/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml using the tool of your choice.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 10 queries executed - Memory usage: 529.27 KiB (Peak: 530.55 KiB) ]