Bug 1870234 - non-CSD titlebars in X11 are using the wrong font
Summary: non-CSD titlebars in X11 are using the wrong font
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Müllner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1870305 1870847 1871166 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-19 15:15 UTC by Garrett LeSage
Modified: 2020-08-23 14:02 UTC (History)
17 users (show)

Fixed In Version: gnome-shell-3.37.90-2.fc34 gnome-shell-3.37.90-2.fc33
Clone Of:
Environment:
Last Closed: 2020-08-23 14:02:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
xterm in X11 (incorrect font) (1.30 MB, image/png)
2020-08-19 15:15 UTC, Garrett LeSage
no flags Details
xterm in Wayland (correct font: Cantarell) (1.30 MB, image/png)
2020-08-19 15:16 UTC, Garrett LeSage
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME gnome-shell merge_requests 1418 0 None None None 2020-08-20 08:10:12 UTC

Description Garrett LeSage 2020-08-19 15:15:39 UTC
Created attachment 1711901 [details]
xterm in X11 (incorrect font)

Description of problem:

Non-CSD titlebars are using an incorrect font in X11.


Steps to Reproduce:
1. Open any application that is not using client-side-decorations
2. Observe the font used

Actual results:

Incorrect font in the titlebar


Expected results:

Cantarell used in the titlebars

Additional info:

Attaching screenshots of xterm (an app I installed that _definitely_ does not use CSD) in both X11 and Wayland

Comment 1 Garrett LeSage 2020-08-19 15:16:37 UTC
Created attachment 1711902 [details]
xterm in Wayland (correct font: Cantarell)

Comment 2 Garrett LeSage 2020-08-19 15:50:32 UTC
gsd-xsettings is not running; it looks like this is a regression due to that.

When I run /usr/libexec/gsd-xsettings and launch a new terminal, it has the correct font in the titlebar.

Comment 3 Benjamin Berg 2020-08-19 16:07:04 UTC
The most likely explanation is that GNOME_SETUP_DISPLAY is set incorrectly.

But, that is weird, because gnome-session should be unsetting the variable. So, either unsetting is failing, or mutter is uploading some incorrect value.

To narrow it down further, the following would be interesting:
 * systemctl --user show-environment |grep DISPLAY
   To check whether GNOME_SETUP_DISPLAY is set (it really should *not* be in an X11 session)
 * Try again after a reboot, wait more than 10s between logging out and logging back in, or run "loginctl kill-user X" to make sure the systemd user instance is gone. Then try again, things will be fine then if we are leaking GNOME_SETUP_DISPLAY from a wayland session to a non-wayland one.

Moving to gnome-session for now.

Comment 4 Benjamin Berg 2020-08-19 16:39:35 UTC
It appears *something* is wiping the DISPLAY environment variable from systemd after the shell starts. That seems really … odd

i.e. Garrett reported the following environment in the running session, which completely lacks $DISPLAY:

HOME=/home/garrett
LANG=en_US.UTF-8
LOGNAME=garrett
PATH=/home/garrett/.local/bin:/home/garrett/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
SHELL=/bin/bash
USER=garrett
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/home/garrett/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome-xorg
EDITOR=/usr/bin/nano
GDMSESSION=gnome-xorg
GDM_LANG=en_US.UTF-8
HISTCONTROL=ignoredups
HISTSIZE=1000
HOSTNAME=fedora
LESSOPEN=$'||/usr/bin/lesspipe.sh %s'
MAIL=/var/spool/mail/garrett
PWD=/home/garrett
QT_IM_MODULE=ibus
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1891,unix/unix:/tmp/.ICE-unix/1891
SHLVL=0
SSH_AGENT_PID=1818
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
USERNAME=garrett
WINDOWPATH=2
XDG_CURRENT_DESKTOP=GNOME
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome-xorg
XDG_SESSION_TYPE=x11
XMODIFIERS=@im=ibus

Comment 5 Benjamin Berg 2020-08-19 21:34:42 UTC
*** Bug 1870305 has been marked as a duplicate of this bug. ***

Comment 6 Benjamin Berg 2020-08-20 07:54:17 UTC
OK, the reason is simple …

We pull in both:
 * org.gnome.Shell
 * org.gnome.Shell

The wayland service has an ExecCondition= to unset some environment variables. And ExecStopPost= is executed even when the ExecCondition= fails. So all we need to do is to add a check to skip execution in that case.

Comment 7 Benjamin Berg 2020-08-20 08:10:12 UTC
OK, patch to fix this is submitted upstream.

Comment 8 Kalev Lember 2020-08-23 13:59:11 UTC
*** Bug 1870847 has been marked as a duplicate of this bug. ***

Comment 9 Kalev Lember 2020-08-23 13:59:37 UTC
*** Bug 1871166 has been marked as a duplicate of this bug. ***

Comment 10 Kalev Lember 2020-08-23 14:02:14 UTC
I went ahead and backported Benjamin's fix to gnome-shell-3.37.90-2.fc34 and gnome-shell-3.37.90-2.fc33


Note You need to log in before you can comment on or make changes to this bug.