You are not logged in.

#1 2017-07-09 09:52:07

agve
Member
Registered: 2017-07-09
Posts: 14

Changing .Xresourses doesn't do anything

I'm on a fresh install and trying to configure xterm. There wasn't a .Xresourses file so I just created one and put some stuff in there.
Copy paste doesn't work on xterm (one of the things I fixed in .Xresourses) so I'm not gonna show you what's in it, but it's just the regular appearance and bindings stuff.

How can I fix this?

Offline

#2 2017-07-09 10:11:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: Changing .Xresourses doesn't do anything

agve wrote:

I'm not gonna show you what's in it.

Then we're not gonna help you.  Copy and paste is irrelevant.
https://wiki.archlinux.org/index.php/Li … in_clients

agve wrote:

How can I fix this?

That depends, what have you don so far?  How are you loading/merging the resources?  How do you start X?  What WM/DE do you use?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2017-07-09 10:24:03

agve
Member
Registered: 2017-07-09
Posts: 14

Re: Changing .Xresourses doesn't do anything

Trilby wrote:

Then we're not gonna help you.  Copy and paste is irrelevant.
https://wiki.archlinux.org/index.php/Li … in_clients

https://ptpb.pw/MurN

Trilby wrote:

That depends, what have you don so far?  How are you loading/merging the resources?  How do you start X?  What WM/DE do you use?

I've only tried xrdb ~/.Xresources and xrdb -merge ~/.Xresources but that doesn't work.

I'm not sure how I start X, I'm using LightDM as a DM and i3 for a WM.

Offline

#4 2017-07-09 11:34:41

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Changing .Xresourses doesn't do anything

agve wrote:

I've only tried xrdb ~/.Xresources and xrdb -merge ~/.Xresources but that doesn't work.

In which file did you place these directives?

LightDM does not read ~/.xinitrc, you can add your commands to ~/.xsessionrc instead though.

EDIT: actually, LightDM should apply ~/.Xresources automatically, I think.

You can check if the values have actually been applied with the `appres` command:

appres XTerm

Just to note: for xterm, if no X resources have been set then it will scan ~/.Xdefaults automatically every time it is started with no need to call `xrdb` at all.

Also, in respect of copy&paste, xterm uses the PRIMARY buffer so you can left-click & drag to select the text and then middle-click to paste.

Last edited by Head_on_a_Stick (2017-07-09 11:37:00)


Jin, Jîyan, Azadî

Offline

#5 2017-07-09 12:03:02

agve
Member
Registered: 2017-07-09
Posts: 14

Re: Changing .Xresourses doesn't do anything

Head_on_a_Stick wrote:
agve wrote:

I've only tried xrdb ~/.Xresources and xrdb -merge ~/.Xresources but that doesn't work.

In which file did you place these directives?

LightDM does not read ~/.xinitrc, you can add your commands to ~/.xsessionrc instead though.

EDIT: actually, LightDM should apply ~/.Xresources automatically, I think.

You can check if the values have actually been applied with the `appres` command:

appres XTerm

Just to note: for xterm, if no X resources have been set then it will scan ~/.Xdefaults automatically every time it is started with no need to call `xrdb` at all.

Also, in respect of copy&paste, xterm uses the PRIMARY buffer so you can left-click & drag to select the text and then middle-click to paste.

I didn't know LightDM doesn't read ~/.xinitrc. Regardless, I don't have either ~/.xsessionrc or ~/.Xdefaults files. Are they supposed to be installed with X or should I manually create them?

Because it uses the PRIMARY buffer you can't copy text from xterm and middle-click or shift+insert pastes text previously typed in the xterm session, not the text from the clipboard. That's why I'm trying to make ~/.Xresourses work so that I can make it use the CLIPBOARD buffer and also to customize it because it's quite ugly to be honest.

Offline

#6 2017-07-09 12:12:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Changing .Xresourses doesn't do anything

agve wrote:

I don't have either ~/.xsessionrc or ~/.Xdefaults files. Are they supposed to be installed with X or should I manually create them?

You should create them yourself but LightDM should merge ~/.Xresources automatically anyway (if it exists) and if this has been done then ~/.Xdefaults will be ignored by xterm.

Use `appres` to check what is actually loaded on the desktop.

FWIW, I have always used the PRIMARY for copy&paste actions in Unix-like systems (it's the one thing I miss most in Windows) and I have never experienced the problems you describe with xterm (I use that terminal emulator in my OpenBSD box), it all works as expected for me across several distributions. I ignore the CLIPBOARD entirely, it seems quite superfluous.


Jin, Jîyan, Azadî

Offline

#7 2017-07-09 12:27:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: Changing .Xresourses doesn't do anything

There's nothing in that Xresources file other than the clipboard use that seems like it would be obvious whether it was applied (I could be missing something, but a lot of those seem to confirm defaults or seem similar to defaults).  Can you add some positive control test of a simple obvious setting, like `XTerm.background: red`.  This will test whether the problem is actually in loading the resources or if there is something else wrong with the clipboard settings.

Also can you address the question of where you use the xrdb commands.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2017-07-09 12:37:42

agve
Member
Registered: 2017-07-09
Posts: 14

Re: Changing .Xresourses doesn't do anything

Head_on_a_Stick wrote:

You should create them yourself but LightDM should merge ~/.Xresources automatically anyway (if it exists) and if this has been done then ~/.Xdefaults will be ignored by xterm.

Use `appres` to check what is actually loaded on the desktop.

FWIW, I have always used the PRIMARY for copy&paste actions in Unix-like systems (it's the one thing I miss most in Windows) and I have never experienced the problems you describe with xterm (I use that terminal emulator in my OpenBSD box), it all works as expected for me across several distributions. I ignore the CLIPBOARD entirely, it seems quite superfluous.

Copying the contents of ~/.Xresourses to ~/.Xdefaults seems to have fixed it. I'm still confused as to why ~/.Xresourses wouldn't make any changed, I could only think it's as you said, that LightDM doesn't read ~/.xinitrc and also doesn't apply ~/.Xresourses. Regardless, thanks for the help.

Offline

#9 2017-07-09 12:48:44

agve
Member
Registered: 2017-07-09
Posts: 14

Re: Changing .Xresourses doesn't do anything

Actually, there's some weird behavior now. `appres` lists the loaded resourses but only some changes are applied even if they're listed.

For example, the background doesn't change when I add `XTerm.background: red` like Trilby suggested even thought it's listed as loaded, but the key bindings for CTRL SHIFT C / P work.

EDIT: So apparently ~/.Xresourses was somehow conflicting with ~/.Xdefaults. Moving it from the home directory fixed some problems, but commands like `XTerm.background: red` don't work while something like `XTerm.vt100.reverseVideo: true` does work, I'm very confused.

Last edited by agve (2017-07-09 12:55:04)

Offline

#10 2017-07-10 19:45:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Changing .Xresourses doesn't do anything

agve wrote:

So apparently ~/.Xresourses was somehow conflicting with ~/.Xdefaults

You shouldn't be using both, that doesn't really make any sense.

The current standard is to use ~/.Xresources and LightDM should merge that file when starting the desktop, if this is not happening we need to find out why.

~/.Xdefaults is an old standard that is still honoured by certain programs (xterm & rxvt-unicode are examples) but only if no X resources are set by other methods so having ~/.Xresources `merge`d will then cause ~/.Xdefaults to be ignored.

Let's try to get ~/.Xresources working as it should — remove ~/.Xdefaults and make a simple ~/.Xresources then launch the desktop and post the full output of `appres` and the full content of ~/.Xresources here, please.


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB