Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-08-28 17:38:49

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Setting default Wallpaper for a Distribution

Hi, we do use XFCE as our default Desktop for offline install of EndeavourOS, so we do create some default settings to beautify the Desktop and finetuning default behavior.

One thing we can not figure out to work as we want:

The default setting our Distro Wallpaper.
We need to symlink it per default, as we could not get it defaulting also if we put it inside:

https://github.com/endeavouros-team/End … esktop.xml

It does reset to the default Xfce wallpaper all the time...

May someone here can give us a hint on how to get this working? we want to default our community contributed backgrounds, so we want to set the default folder and default wallpaper.

The issue is also that it needs to be the default for second monitor (or more)

Happy to be here and hopefully getting some idea and fun here!

We do use Archlinux Repositories so we do shipping  4.14.1 at the moment.

Last edited by joekamprad (2019-08-28 17:44:42)

Offline

#2 2019-08-28 18:08:23

kunzlata
Member
Registered: 2019-06-24
Posts: 42

Re: Setting default Wallpaper for a Distribution

Have you tried symlinking the chosen wallpaper to /usr/share/backgrounds/default ?

Offline

#3 2019-08-28 18:31:15

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

Re: Setting default Wallpaper for a Distribution

If you are looking to setup a default custom configuration of Xfce for all new users, you can use something like this.

On first login, Xfce will use by default the content of $XDG_CONFIG_DIRS (usually /etc/xdg) to populate the initial user Xfce environment.

You can change the content in /etc/xdg, but it might get overwritten by subsequent updates. A better option is to create a custom xdg structure. For example, copy the content of /etc/xdg to /etc/xdg-test:

cp -rv /etc/xdg /etc/xdg-test

Copy your custom xfce4-desktop.xml file to /etc/xdg-test/xfce4/xfconf/xfce-perchannel-xml:

cp xfce4-desktop.xml /etc/xdg-test/xfce4/xfconf/xfce-perchannel-xml

The final step is to export the new value of XDG_CONFIG_DIRS. This will depend on your setup and display manager, but I put it /etc/environment:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
XDG_CONFIG_DIRS="/etc/xdg-test"

When a new user is created, it will use the default files from /etc/xdg-test - which you can customize any way you want. For xml files that are missing from the list, simply create them or copy over existing ones that you want to replicate.

A good method is to create the look and feel that you want in a test user account, and then, while not logged in as the user, copy over the configuration files to your new /etc/xdg-test structure so that it becomes the basis for all new installs.


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

#4 2019-08-28 20:56:06

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

but /etc/xdg/xfce4 wil be created by installing xfce, so it will be overwritten?

We use Archlinux and there it is default that new user install is calling /etc/skel where we put configs for xfce...
So may it is mixed up then if xfce is reading also from /etc/xdg ?

Offline

#5 2019-08-28 21:02:08

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

Re: Setting default Wallpaper for a Distribution

joekamprad wrote:

but /etc/xdg/xfce4 wil be created by installing xfce, so it will be overwritten?

Yes, it can be overwritten every time one of the following xfce4 packages are updated:

pacman -Ql | grep "/etc/xdg/xfce4"

We use Archlinux and there it is default that new user install is calling /etc/skel where we put configs for xfce...

That's possible, but it doesn't seem to work for me on Arch. Xubuntu uses the approach above (they use /etc/xdg/xdg-xubuntu). My example above will work for Arch.

So may it is mixed up then if xfce is reading also from /etc/xdg ?

Xfce will read from $XDG_CONFIG_DIRS. Where ever that environment variable points, it will read from.

Edit: In my testing with /etc/skel on Arch, /etc/xdg always overwrote that information.

Last edited by ToZ (2019-08-28 21:03:27)


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

#6 2019-08-29 05:06:56

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

Thanks a lot and more! for detailed information here!! @ToZ
We will do that and see if it works as desired!

Offline

#7 2019-08-31 21:43:50

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

to get back on you here with a report:

The real issue is that XFCE do create entries for the connected displays and use this ones inside **xfce4-desktop.xml** and so again uses default xfce4 wallpaper for them... it will need to change the default wallpaper here...
Second is that if we want to default to our own wallpaper folder we need to set this also somewhere, is this config stored also inside **xfce4-desktop.xml** ?

Offline

#8 2019-08-31 23:05:26

kunzlata
Member
Registered: 2019-06-24
Posts: 42

Re: Setting default Wallpaper for a Distribution

I don't understand about live-cd's and installers but maybe you could instead either patch xfdesktop or do something at build time like (if I understood well) Fedora does.

sed -i 's/\/backgrounds\/xfce\/xfce-teal.jpg/\/backgrounds\/images\/default.png/g' common/xfdesktop-common.h

Offline

#9 2019-09-01 09:28:26

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

for livesession we can do simple symlinking it, but we do not want this on installed system, as it is not that clean solution.

Offline

#10 2019-09-01 09:30:49

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

kunzlata wrote:

Have you tried symlinking the chosen wallpaper to /usr/share/backgrounds/default ?

this is not present at Archlinux, or should i create the symlink to set a background to default for xfce or any DE?

Offline

#11 2019-09-01 21:09:29

kunzlata
Member
Registered: 2019-06-24
Posts: 42

Re: Setting default Wallpaper for a Distribution

joekamprad wrote:
kunzlata wrote:

Have you tried symlinking the chosen wallpaper to /usr/share/backgrounds/default ?

this is not present at Archlinux, or should i create the symlink to set a background to default for xfce or any DE?

I don't know Arch. I'm thinking it would use vanilla settings for basically everything?

But for your distro, if you intend to ship several DE's and keep a visual identity then it could be useful to have a default wallpaper location and point all DE's there. But anyway, since the default background in xfdesktop is hard-coded you have to patch it, I think. Have you tried to see how Manjaro does it?

Offline

#12 2019-09-03 14:08:18

joekamprad
Member
Registered: 2019-08-28
Posts: 9

Re: Setting default Wallpaper for a Distribution

Yes we do have a folder for logo and backgrounds.
We will stay on the symlink back for xfce, but I got some very helpful hints here!
Thanks for that.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 9 queries executed - Memory usage: 570.41 KiB (Peak: 587.25 KiB) ]