1

I am trying to work out how to change XFCE default background wallpaper system wide for all users.

However I can not find how to do this for the system wide settings, either from the command line or by editing some config file?

Thanks

  • Do you want to do this for newly created users or existing ones? – peterph Dec 11 '14 at 18:52
  • Would be for nearly created users @peterph – Zac Powell Dec 11 '14 at 20:03
1

Let's split the solution into two parts:

  1. Locate where the setting is kept. Reasonable programs keep their user settings in "dot" files in $HOME, usually either in a .progname (be it a file or a directory with more complex configurations) or under .config/. XFCE uses the latter, with desktop settings being stored in

    ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
    

    The structure of the file is not overly simple due to the fact that it can handle multimonitor setups, Xinerama and lots of other things. Search for filename of your current backdrop if you want to know what exactly it looks like in your particular case.

  2. Make sure these setting get propagated to newly created user accounts. On a reasonable system this is exactly the role of /etc/skel which holds files that are copied into newly created user account home directories (see e.g. hier(7) man page).

Thus copy the file (with the leading directories up to your $HOME) there and that should be it. You can cunningly use install (on Linux usually found in the coreutils package) to create all the desired directories:

install -D -v \
    {$HOME,/etc/skel}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml

Should you need to change this for existing users as well, simple use of sed on the existing files might do the trick in most cases, but you'd have to parse the configuration XMLs to make it bullet-proof (obligatory link to the famous SO post).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.