I just looked at the /etc/sddm.conf
and see this line there:
#FacesDir=/usr/share/sddm/faces
#ThemeDir=/usr/share/sddm/themes
So, instead of using sddm2rpm it looks like we can just move this over to /var/usrlocal/share/sddm/
, change the setting and have mutable sddm themes without any hacks?
sudo -i
# create dir
cd /var/usrlocal/share
mkdir -p sddm/themes
# copy default themes over
cp -r /usr/share/sddm/themes/* ./sddm/themes/
# change config
mkdir /etc/sddm.conf.d
cat > /etc/sddm.conf.d/local-themes.conf <<EOF
ThemeDir=/var/usrlocal/share/sddm/themes
EOF
Experimenting with that currently.
Question now: is this /var/usrlocal
rpm-ostree specific or could KDE switch to it in general? Or would there be a better location than this?
Because to make GUI SDDM theme installation through sddm-kcm
work we would need to patch the upstream code to use this directory instead.
/var/usrlocal
is the link target of /usr/local
on OSTree based system. You can verify this by using ls
command.
tux@tux-laptop ~> ls -alh /usr/local
lrwxrwxrwx. 3 root root 15 May 27 17:27 /usr/local -> ../var/usrlocal/
I believe a package usually should NOT put things like themes under /var
. As the document of OSTree shows:
the initial content of /var
in a commit will be placed into the “stateroot” (default var
) if the stateroot var
is empty.
…
On subsequent upgrades, normally /var
would not be empty anymore (as it’s typically expected that basics like /var/tmp
etc. are created, if not also other local state such as /var/log
etc.). Hence, no updates from the commit/container will be applied.
So this will prevent users installing new SDDM themes or updating existing ones from rpm if we put them under /var/usrlocal
. Please feel free to correct me if I’m wrong.
1 Like
Thanks, I didnt know that!
Yes, the idea is Themes are not packages but changed from the user, independently from the OS.
Valid point, on Fedora updates this would not be updated which is a problem.
To keep the default SDDM theme updated it could be linked from /usr/share/sddm/themes
instead, which is updated.
sddm2rpm converts the themes to packages, but the normal way is just placing them to the /usr/share directory from the GUI, not package installation.
This is pretty problematic as to my knowledge on OSTree / Atomic systems all system modifications should be done by the package manager