Bug 1225384 - .Xresources does not work under Gnome Wayland
Summary: .Xresources does not work under Gnome Wayland
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-session
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-27 09:23 UTC by Mike FABIAN
Modified: 2019-07-20 03:04 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-02 16:08:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mike FABIAN 2015-05-27 09:23:13 UTC
Trying to use ./Xresources to change options of xterm
does not work under Gnome Wayland. Example:

[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ cat ~/.Xresources
Xterm*background: green
Xterm*foreground: pink
Xterm*scrollbar*background: cyan

[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ xrdb -load ~/.Xresources
[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ xterm
[mfabian@Fedora-Live-Workstation-x86_64-2 ~]$

But xterm shows up with default white background, not green.

Under a non-Wayland Gnome session, the above works fine,
xterm has a green background then.

Comment 1 Stefan Assmann 2015-07-01 11:07:09 UTC
Any comment on this? It's a serious drawback.

Comment 2 Olivier Fourdan 2015-07-02 07:28:34 UTC
(In reply to Stefan Assmann from comment #1)
> Any comment on this? It's a serious drawback.

This bug is not filed against the right component, Wayland libraries are not responsible for this, and xterm uses Xwayland anyway, it's not been ported to Wayland (and I doubt it will ever be).

Moving to gnome-session, I guess it would need to load the ~/.Xresources file with xrdb at startup with Wayland.

Comment 3 Olivier Fourdan 2015-07-02 07:46:42 UTC
Also, please note that I reckon you have a typo in your example in comment #0 it's either "XTerm" or "xterm" (either class or instance)) for the Xresources file, not "Xterm" (ie your example does not work even in a plain X session).

And with the correct syntax, "xrdb -load ~/.Xresources" works fine in Wayland/XWayland as well.

Comment 4 Stefan Assmann 2015-07-02 10:21:22 UTC
Olivier,
thanks for taking a look at this. We weren't sure what exactly is the problem, but had to choose a component.

I can confirm that after manually running "xrdb -load ~/.Xresources" xterm behaves as expected again.

Comment 5 Mike FABIAN 2015-07-02 13:07:04 UTC
(In reply to Olivier Fourdan from comment #3)
> Also, please note that I reckon you have a typo in your example in comment
> #0 it's either "XTerm" or "xterm" (either class or instance)) for the
> Xresources file, not "Xterm" (ie your example does not work even in a plain
> X session).
> 
> And with the correct syntax, "xrdb -load ~/.Xresources" works fine in
> Wayland/XWayland as well.

You are right about the typo! I was pretty sure I had tested this and
saw "xrdb -load ~/.Xresources" work on Gnome non-Wayland and not work
on Gnome Wayland. But when I tested again now, I found that it does
not work on either Gnome Wayland or Gnome non-Wayland with the
spelling "Xterm" but works on both with the spelling "XTerm", just
like you write.

I wonder how I could make that mistake during testing...

Anyway, that seems to make the problem far less serious because making
gnome-session load .Xresources should be fairly easy, I guess.

Comment 6 Ray Strode [halfline] 2015-07-02 16:08:54 UTC
a long, long time ago we ran xrdb at startup, and at the time it was actually one of the main things that slowed down the login process. It was at the top of the login profile, because it runs a full blown c preprocessor or something.  Anyway, we're not likely to add that back.  Users, of course, can make it run at start up

Comment 7 Stefan Assmann 2015-07-03 07:33:36 UTC
Ray, you're saying this was a long time ago. Could we check if this is still the case before abandoning the idea? I'm only seeing minimal delays here.

sassmann@t530:~ > time xrdb -load ~/.Xresources 

real    0m0.013s
user    0m0.003s
sys     0m0.005s

Comment 8 AlMa 2019-07-20 03:04:37 UTC
Same for me:

$ cat ~/.Xresources 
UXTerm*reverseVideo: true

$ time xrdb -merge ~/.Xresources 

real    0m0,018s
user    0m0,012s
sys     0m0,006s

Timings with -load instead of -merge are similarly low.

That old reason for not loading the startup files is not valid *for me* as of now.


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