realmazharhussain / gdm-tools

(Deprecated) Command-line tools for GNOME's login manager, GDM
GNU General Public License v3.0
95 stars 4 forks source link

Please add other relevent values to gnomeconf2gdm #22

Closed blueray453 closed 1 year ago

blueray453 commented 1 year ago

Description

Please also add gtk-theme, cursor-size, and text-scaling-factor in gnomeconf2gdm.

Explaination

I have modified /usr/local/bin/gnomeconf2gdm:

  printValues 'Interface' 'org/gnome/desktop/interface'\
              'cursor-theme
               icon-theme
               show-battery-percentage
               clock-show-weekday
               clock-format'

with:

  printValues 'Interface' 'org/gnome/desktop/interface'\
              'clock-show-weekday
               clock-format
               cursor-theme
               cursor-size
               gtk-theme
               icon-theme
               show-battery-percentage
               text-scaling-factor'

It seems to have worked (not sure about gtk-theme dconf value though).

And if gdm3 can set other dconf values from /etc/dconf/db/gdm.d/99-gnomeconf2gdm then please also add them as well.

As close the gdm look to the desktop the better.

realmazharhussain commented 1 year ago

It seems to have worked (not sure about gtk-theme dconf value though).

gtk-theme is irrelevant in case of GDM. There are no GTK windows being shown on the login screen.

realmazharhussain commented 1 year ago

Also, this project is not being actively maintained (as you can see from the commit history). I added more settings to the gnomeconf2gdm script since it was pretty straightforward and there may be other small changes in the future too but this project will not be receiving any big updates.

blueray453 commented 1 year ago

this project will not be receiving any big updates

This is something I was very worried about. gdm-settings does not work in many machines, for example zorin. Also it is hard to automate. Many things gdm-settings does can be added in gdm-tools by simple commands. For example I use the following on Zorin installation script:

sudo apt install -y libglib2.0-dev dconf-cli
git clone --depth=1 --single-branch https://github.com/realmazharhussain/gdm-tools.git
(cd gdm-tools; ./install.sh)
rm -rf gdm-tools
set-gdm-theme -s default /home/ismail/.dotfiles/.resources/wallpapers/firefox_wallpaper_blurred.jpg
gnomeconf2gdm
set-gdm-theme set Solarized-DarkArc-Cyan
sudo sed -i "/clock-format=/a cursor-size=32\ntext-scaling-factor=1.25" /etc/dconf/db/gdm.d/99-gnomeconf2gdm

In my machine, even if I install the Login Manager Settings using flatpak, it simply does not work except one or two things.

Even if you decide to only keep gdm-settings and deprecate gdm-tools then please make a cli version of that app (for example gdm-settings-cli) so that

  1. it has less dependencies.
  2. we can easily install it on older machines.
  3. use the tool to automate.

I studied the source code of gdm-tools. I found that there are only five steps

  1. Extract

Extract the theme

#!/bin/sh

workdir=${HOME}/shell-theme
if [ ! -d ${workdir}/theme ]; then
  mkdir -p ${workdir}/theme
fi
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource

for r in `gresource list $gst`; do
        gresource extract $gst $r >$workdir/${r#\/org\/gnome\/shell/}
done
  1. Change Background

Replace the file named background in the theme folder

/home/ismail/Desktop/shell-theme/theme/background

  1. Compile

Compile the theme using glib-compile-resources

glib-compile-resources --sourcedir=/tmp/tmp.UCNq8jLfZj/theme /tmp/tmp.UCNq8jLfZj/theme/gnome-shell-theme.gresource.xml

cp /tmp/tmp.UCNq8jLfZj/theme/gnome-shell-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource

  1. update-alternatives

Use update-alternatives

update-alternatives --set gdm3-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource update-alternatives --set gdm-theme.gresource /usr/share/gnome-shell/gnome-shell-theme.gresource

  1. change dconf settings

Then for changing the dconf settings, just modify /etc/dconf/db/gdm.d/99-gnomeconf2gdm

Am I missing something here? Where can I read more about it. I am asking because if I know more about it then I can try to maintain a fork of gdm-tools.

realmazharhussain commented 1 year ago

Even if you decide to only keep gdm-settings and deprecate gdm-tools then please make a cli version of that app (for example gdm-settings-cli)

That was planned to happen veey early in the development process. But it is harder to implement than I realized.

There are a lot of features that I would like to implement in that app (e.g. Type to Search, Background Blur, CommandLine Interface... and so on) that I've never gotton around to implementing. I'll be busy in my final exams for some time but after that, I'll probably implement some of those features.