Solved (Solved) Permanent Background and .Xresources questions

It's taken me a whole week before posting these two issues, I have tried searching on the web.

Every time I boot the machine up and have to manually set the wallpaper. Is there a way to have it load up permanently? I don't use .xinitrc I use a desktop session in xsessions.

.Xresources effect are not applied when the machine boots. I always have to do
Code:
xrdb ~/.Xresources
for the file to take effect. Is there anything else to do to make it happen like add a line somewhere.

spectrwm on FreeBSD 12.1-RELEASE.

Regards,
 
I don't use .xinitrc I use a desktop session in xsessions.
They both serve the exact same purpose and are used for the exact same things. In fact, you can symlink one to the other, so you never have to worry about the different names.

Put both xrdb(1) and xsetroot(1) (or whatever you use to set the background) in ~/.xinitrc or ~/.xsession.

For example:
Code:
[ -f "${HOME}/.Xresources" ] && xrdb "${HOME}/.Xresources"
(the test prevents an error message, it will only load when the file actually exists).
 
For wallpaper you can use sysutils/nitrogen or graphics/feh. As for .Xresources effect I think the "error" is coming from not putting the name of the terminal emulator in your .Xresources.
e.g.
Code:
  URxvt.termName: rxvt-unicode-256color
  XTerm.termName: xterm-256color
 
You can also add an autorun command to the spectrwm configuration file: /usr/local/etc/spectrwm.conf
Code:
autorun         = ws[1]:feh --bg-scale /path_to_my_file/wallpaper.jpg
 
Thank you all. I will try all your pointers tonight when I get home.

kpedersen, I have been using .Xdefaults in FreeBSD since I completed my move to FreeBSD about a month now but on another thread I was advised to move to .Xresources.
 
Back
Top