canonical / lightdm

Display Manager
GNU General Public License v3.0
824 stars 138 forks source link

Can't change font size used by greeter/login screen #163

Open noloader opened 3 years ago

noloader commented 3 years ago

Hi Everyone,

I'm working on Linux Mint 20, x86_64, fully patched. The machine has been through upgrade and dist-upgrade. Linux Mint provides Lightdm 1.30.0. I verified Lightdm is active using ps.

My use case is senior citizens. They need larger fonts. I estimate the current font size at 8pt or 9pt. I can't read it without glasses. Seniors will definitely have trouble.

I'm having trouble increasing the font size of the greeter/login screen. Linux Mint provides:

# ls /etc/lightdm/lightdm-gtk-greeter.conf.d
99_linuxmint.conf 

99_linuxmint.conf text is:

# cat /etc/lightdm/lightdm-gtk-greeter.conf.d/99_linuxmint.conf
[greeter]
background=/usr/share/backgrounds/linuxmint/default_background.jpg
theme-name=Mint-X
icon-theme-name=Mint-X
#font-name=Ubuntu 11
font-name=Ubuntu 20
xft-antialias=true
xft-dpi=96
xft-hintstyle=hintslight
xft-rgba=rgb
indicators=~host;~spacer;~clock;~spacer;~session;~a11y;~language;~power
keyboard=onboard
reader=orca
position = 50%,center 50%,center
default-user-image = #avatar-default
screensaver-timeout = 60
a11y-states=contrast;font;keyboard;reader
user-background = false
clock-format = %a %d %b, %H:%M

Changing font-name has no effect.

Since the distro owns 99_linuxmint.conf, I tried adding a 100_linuxmint.conf. That is not help either.

I'm not sure if this is a Lightdm issue, a documentation issue, or a problem with my changes. But something looks a bit sideways.


Searching for the use of font in the man page returns 0 hits:

$ man lightdm | grep font-name

A checkout of latest lightdm sources does not reveal a hit for font-name:

$ git clone https://github.com/canonical/lightdm.git
$ cd lightdm
$ grep -IR 'font-name' ./*
$ 

In fact, I can't find many font related hits:

$ grep -IR font ./*
./debian/po/bs.po:#~ msgstr "Veliki font"
./po/bs.po:msgstr "Veliki font"

The man page says there's a /etc/lightdm/lightdm.conf, but that does not exist on Lightdm 1.30.0.


A related issue I'll have to address with the greeter/login screen is the size of the indicator bar. That's too small, too. It looks like it is 10 or 12 pixels. From 99_linuxmint.conf:

indicators=~host;~spacer;~clock;~spacer;~session;~a11y;~language;~power

I'll need to increase the bar size to about 24 or 32 pixels.


A final issue I'll need to address with the greeter/login screen is clock-format = %a %d %b, %H:%M. Changing it to clock-format = %a %d %b, %I:%M %p (for 9:15 AM or 3:00 PM) does not make a difference.


Hrae are a couple of related bugs (related to basic customizations):

# apt-cache show lightdm
Package: lightdm
Architecture: amd64
Version: 1.30.0-0ubuntu3.1
Priority: optional
Section: universe/x11
Origin: Ubuntu
Maintainer: Robert Ancell <robert.ancell@ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 839
Provides: x-display-manager
Pre-Depends: dpkg (>= 1.15.7.2)
Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.14), libgcrypt20 (>= 1.7.0), libglib2.0-0 (>= 2.39.4), libpam0g (>= 0.99.7.1), libxcb1, libxdmcp6, adduser, bash (>= 4.3), dbus, libglib2.0-bin, libpam-runtime (>= 0.76-14), libpam-modules, plymouth (>= 0.8.8-0ubuntu18)
Recommends: xserver-xorg, unity-greeter | lightdm-greeter | lightdm-kde-greeter
Suggests: bindfs
Conflicts: liblightdm-gobject-0-0, liblightdm-qt-0-0
Filename: pool/universe/l/lightdm/lightdm_1.30.0-0ubuntu3.1_amd64.deb
Size: 144112
MD5sum: 7a45a8430e415777fc2cd1cc8c019cbf
SHA1: 35d488e75f70463a8a119c7ee4ede27f6b57aa53
SHA256: 7a1534664731963015bba939844580c0fa86ab3c468d066c3ed9cd2effca63cb
Homepage: https://github.com/canonical/lightdm
Description-en: Display Manager
 LightDM is a X display manager that:
  * Has a lightweight codebase
  * Is standards compliant (PAM, ConsoleKit, etc)
  * Has a well defined interface between the server and user interface
  * Cross-desktop (greeters can be written in any toolkit)
Description-md5: a04ec89b09d7becf8ba288295841fad0
Task: xubuntu-core, xubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
jairoraiol commented 3 years ago

I would also like to change the font settings on the login screen. I have already changed the fonts of the work environment, now all that remains is to achieve consistency of appearance. A Google search for "font in lightdm" will show that more people want it.

MichalMaruska commented 2 years ago

I ran (once in X session) fc-list and saw this: .... /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book ...

So I tried to tune /etc/lightdm/lightdm-gtk-greeter.conf .... [greeter] ..... font-name=DejaVuSans,24

And it worked.