Bug 427725 - Undefined color: "WINDOW_FOREGROUND" breaks Emacs GUI
Summary: Undefined color: "WINDOW_FOREGROUND" breaks Emacs GUI
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: 5.20.0
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-14 21:54 UTC by Tamburrino Roberto
Modified: 2021-09-25 23:56 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tamburrino Roberto 2020-10-14 21:54:08 UTC
SUMMARY
I use kde Neon user, trying emacs with gui I noticed that it crashes and from terminal it reports: emacs
Undefined color: "WINDOW_FOREGROUND" ... can only be used with emacs -nw, how to start emacs-gtk gui? 
STEPS TO REPRODUCE
1.I write emacs from terminal
2. returns the error:Undefined color: "WINDOW_FOREGROUND"
 

OBSERVED RESULT
crash

SOFTWARE/OS VERSIONS
 
Linux/KDE Plasma: kde Neon user 5.20
(available in About System)
KDE Plasma Version: 5.20
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
 it only happens with kde neon, not with ubuntu, not with kubuntu (tested by virtualbox), and said by others not by arch with kde
Comment 1 Alex Belits 2020-10-15 03:02:36 UTC
This is not related to kwin, this is a regression in color handling in X11 resources. There was an option in KCM that extends color settings to non-KDE applications by setting X resources. Now, in KDE 5.20, it was removed, and resources are set unconditionally. For some reason the mechanism enables resources with generic color names but never sets the values for those, so programs that take color configuration from X resources end up with undefined color names.

KDE should either always set resource values for colors BACKGROUND and WINDOW_FOREGROUND that it mentions (ex: "*.WINDOW_FOREGROUND: black"), or not set resources with those values at all.
Comment 2 gjditchfield 2020-10-18 20:33:20 UTC
I worked around this problem by deleting directory /usr/share/kdisplay/app-defaults.

That directory comes from package plasma-workspace.  I am reassigning the bug to product "plasmashell" because I think that's a better match than kwin, but there may be a better choice.

I ran into this problem on a fresh install of Neon 20.04.  An upgrade in place from 18.04 did not have this problem.
Comment 3 David Edmundson 2021-09-25 23:56:01 UTC
xrdb colour syncing for really old apps has been removed