You are not logged in.
HI!
I would like to provide (again) for all hosts and users a default background with the own company or community logo instead of the default GNOME background.
My attempts after these two sample solutions here:
https://help.gnome.org/admin//system-ad … nd.html.en
and
https://help.gnome.org/admin/system-adm … nd.html.en
unfortunately failed. The background I deposited is not dragged and still only the default MATE background is displayed.
As a user I can of course manually initiate the change via dconf or gsettings, but a change as root for others via 'sudo -u' does not work of course, because root can access the X session of another user, whether logged in or not. My attempt to define the desktop background from a central location via Ansible still fails.
Now to my question: How the heck is it possible to predefine the default desktop background and lock it for the user so that they cannot change it?
Any tips will be gratefully received!
ttyl
Django
Last edited by Django [BOfH] (2023-01-24 06:54:19)
Offline
The background I deposited is not dragged and still only the default MATE background is displayed.
Cause mate ain't gnome?
Try /org/mate/desktop/background instead.
Offline
I thought MATE was based on GNOME and so I had assumed [org/gnome/desktop/background] would fit. O.K. You are right, of course.
O.K. the name fits so far, but it doesn't really want to succeed. I have therefore made the following for testing:
1. I have manually changed the background
2. then I dumped the dconf parameters into a file to see how they are set exactly.
$ dconf dump /org/mate/ > original.dump3. I then changed this information and put it in a new file.
[org/mate/desktop/background]
color-shading-type='vertical-gradient'
picture-filename='/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light-Sysinfo4Wallpaper.png'
picture-options='zoom'
primary-color='rgb(88,145,188)'
secondary-color='rgb(60,143,37)'4. I then played this file back using dconf.
$ dconf load / < /etc/dconf/db/local.d/00-background=> The background of the logged in user changes accordingly.
5. I query the file data for the background, it is also displayed to me accordingly:
$ dconf read /org/mate/desktop/background/picture-filename
'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light-Sysinfo4Wallpaper.png'So far so good. As on https://man.archlinux.org/man/dconf.7.en described I've generated the following directories and files:
/etc/dconf//
├── db/
│ ├── local.d/
│ │ └── 00-background
│ └── local
└── profile/
└── user/etc/dconf/profile/user
user-db:user
system-db:local/etc/dconf/db/local.d/00-background
[org/mate/desktop/background]
color-shading-type='vertical-gradient'
picture-filename='/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light-Sysinfo4Wallpaper.png'
picture-options='zoom'
primary-color='rgb(88,145,188)'
secondary-color='rgb(60,143,37)'After updating the system databases as user root with ...
# dconf updatethe database-files is generated:
# ll /etc/dconf/db/local
-rw-r--r-- 1 root root 625 Jan 23 19:55 /etc/dconf/db/localThe parameter picture-filename is set right, as I can see as user root:
# dconf read /org/mate/desktop/background/picture-filename
'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light-Sysinfo4Wallpaper.png'However, if I query this option as a normal user, an empty path is returned.
$ dconf read /org/mate/desktop/background/picture-filename
''Logging out and logging in also does not bring the new desktop background to the screen for the user in question, but a reboot brought no change. I thought, that the users must log out and back in again before the system-wide settings take effect. But it don't! ![]()
Any furter hints? I hope so ...
Last edited by Django [BOfH] (2023-01-24 06:49:17)
Offline
Override the user's setting and prevent the user from changing it in /etc/dconf/db/local.d/locks/background:
As a friendly reminder: the "gnome" in there is probably also not correct.
Offline
Just for the record: The two gnome links are not from me.
But now to the good news! ![]()
Now it works as designed and expected:
What I've done?
1. First I have extended the file user accordingly:
/etc/dconf/profile/user
service-db:keyfile/user
user-db:user
system-db:local2. Then I copied my template for configuring the desktop background to the user's dconf configuration path.
$ cp /etc/dconf/db/local.d/00-background ~/.config/dconf/user.txt3. As soon as the user logs out once and then logs in again, the new correct wallpaper is displayed!
Last edited by Django [BOfH] (2023-01-24 06:43:48)
Offline
Just for the record: The two gnome links are not from me.
You posted them?
What I've done?
Found a cumbersome way to alter the wallpaper for one user?
a) this will not prevent the users from changing their wallpapers
b) even if that would work, you'd need the file
b.1) immutable
b.2) deployed via etc/skel
Why are you not using the dconf locks?
Edit: also on a sidenote, please use code tags, https://bbs.archlinux.org/help.php#bbcode
Last edited by seth (2023-01-23 21:42:12)
Offline
I apologize so much for my questions about my problem.
But thanks to your tips, I have now found a way to solve my challenge. How and what I did exactly, I will document in a separate BLOG article.
And to the BBCode tags I vow improvement, I have edited my posts accordingly.
Offline
You don't need to apologize for asking questions, but please see https://wiki.archlinux.org/title/Genera … way_street and summarize your solution here and just fyi:
mkdir /tmp/foo
sudo touch /tmp/foo/bar
stat /tmp/foo/bar
rm -f /tmp/foo/bar
stat /tmp/foo/barOffline
... and summarize your solution here
It is still here → #5
What I still want to do is put the whole thing into an Ansible playbook and that's what I meant by "I will document in a separate BLOG article".
Offline
You do understand the caveats I pointed out in #6?
Offline
+1!
Offline