5

I've one .xinitrc with the following lines:

#!/usr/bin/env bash
xrdb -merge ~/.Xresources &
xset r rate 200 30 &
xterm & #fixme: xterm is not reading loaded .Xresources
exec /etc/alternatives/x-window-manager

Why the xterm is not using the settings loaded with the xrdb?

P.S.: this xterm inside .xinitrc does not use the settings loaded from xresources, but once the wm is running it works right.

I don't remember how to fix it (has been years that I don't play with linux).

  • 5
    Dont use & at the end of the xrdb command. It needs to finish before running xterm. – meuh Jun 3 '16 at 15:28
  • oh... so simple... -.- @meuh if you want you can answer that I'll mark your answer as accepted – gzinho Jun 3 '16 at 15:41
3

In your script

#!/usr/bin/env bash
xrdb -merge ~/.Xresources &
xset r rate 200 30 &
xterm & #fixme: xterm is not reading loaded .Xresources
exec /etc/alternatives/x-window-manager

the line with xterm needs to run in the background, using "&" because the window manager has to run to manage the xterm (and if xterm were not put in the background, it would block the script from proceeding to invoke the window manager). The xrdb and xset commands both should complete before starting other programs, because they will complete (and exit) rapidly, and because they initialize things for you:

  • xrdb sets up resource values in the root window which can be read by xterm, and
  • xset (less important) is changing the key repeat rate.

Further reading:

0

I use Atom to compile and run C programs and it outputs to xterm - I found this link when looking to enlarge the xterm font in a permanent way. These posts really helped me get a handle on xterm -

https://askubuntu.com/questions/161652/how-to-change-the-default-font-size-of-xterm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.