You are not logged in.

#1 2012-07-18 00:24:26

dntwrryboutit
Member
Registered: 2012-07-16
Posts: 4

How to setup .Xresources?

urxvt*font:                    -*-terminus-medium-*-*-*-12-*-*-*-*-*-iso8859-1
urxvt*boldFont:                -*-terminus-medium-*-*-*-12-*-*-*-*-*-iso8859-1
urxvt*linespace:            0

urxvt*borderLess:            true
urxvt*externalBorder:        0
urxvt*internalBorder:        2
urxvt*scrollBar:            false

urxvt*depth:                32
urxvt*background:            rgba:0000/0000/0000/cccc
!urxvt*background:            #000000
urxvt*foreground:            #c8c8c8
urxvt*color0:                #000000
urxvt*color1:                #b33636
urxvt*color2:                #6ba82a
urxvt*color3:                #deaf40
urxvt*color4:                #5a78ad
urxvt*color5:                #ab4382
urxvt*color6:                #39a0b3
urxvt*color7:                #c8c8c8
urxvt*color8:                #646464
urxvt*color9:                #e61717
urxvt*color10:                #78dc0c
urxvt*color11:                #f1e022
urxvt*color12:                #699dfa
urxvt*color13:                #de2a98
urxvt*color14:                #13d1f3
urxvt*color15:                #ffffff
urxvt*saveLines:            2048
urxvt*loginShell:            true
urxvt*transparent:           true
urxvt*shading:               100

This is my .Xresources file.

xrdb /home/luc/.Xresources
while true; do
   xsetroot -name "$( date +"%F %R" )"
   sleep 1m    # Update time every minute
done &
exec dwm

This is my .xinitrc file.
The problem is I log into dwm and I still have a plain xterm when I start a new terminal. For the last day or so, I have been reading forums posts, wikis, and googling the subject. Plenty of information is on the net, but I seem to be doing somthing wrong. Thanks for taking the time to help.

Offline

#2 2012-07-18 00:34:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to setup .Xresources?

dntwrryboutit wrote:

The problem is I log into dwm and I still have a plain xterm when I start a new terminal.


https://wiki.archlinux.org/index.php/Xr … _resources


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-07-18 00:35:56

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

Re: How to setup .Xresources?

Was that "xterm" a typo?  You have set up Xresources for urxvt, but you said you use xterm - so this SHOULDN'T do anything to the xterm.

Are you using xterm or urxvt?  Are you launching it from dwm via a key binding?  If so, which one (xterm/urxvt) did you put in config.h?


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

Offline

#4 2012-07-18 01:37:06

dntwrryboutit
Member
Registered: 2012-07-16
Posts: 4

Re: How to setup .Xresources?

I am trying to start urxvt but xterm is coming up. I didn't know I had to mess with dwm source code to change what terminal emulator it would use. Another problem I have is that even if I start the urxvt from an xterm, the urxvt is still plain.

Offline

#5 2012-07-18 01:40:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to setup .Xresources?

You will need to edit config.h and rebuild dwm if you want to change the default terminal.

Use

xrdb -merge /home/luc/.Xresources

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2012-07-18 01:40:47

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

Re: How to setup .Xresources?

dwm uses xterm by default.  It's just a variable in config.h though, I (and I gather many archers) use urxvt instead (or urxvtc in my case).

For the second problem fix the names in Xresources:

sed -i 's/urxvt/URxvt/' ~/.Xresources

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

Offline

#7 2012-07-18 01:43:31

dntwrryboutit
Member
Registered: 2012-07-16
Posts: 4

Re: How to setup .Xresources?

Line 50

static const char *termcmd[] ={ "uxterm", NULL };

Is this what needs to be changed in the config.h? Also, in the .Xresources file should declarations be URxvt.variable: or URxvt*varaible:?

Last edited by dntwrryboutit (2012-07-18 02:24:19)

Offline

#8 2012-07-18 02:28:52

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

Re: How to setup .Xresources?

Yes, that is the line that needs to change.

I'd recommend "URxvt*variable".  The dot (.) will work for many settings, but will also fail for some.  The asterisk will work for all settings.  The difference is the dot specifies that a setting is a child of the URxvt class (ie directly below URxvt in the resource hierarchy), but the asterisk specifies that the variable or setting just a descendant of URxvt class meaning that it could be at any depth in the resource hierarchy.  So, in short, the asterisk is (almost always) better.

edit: I just checked my file, and I guess I used the 'dot' notation for everything for URxvt and it works fine for all of the settings I've used.  But the above reasoning still holds.

Last edited by Trilby (2012-07-18 02:30:10)


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

Offline

#9 2012-07-20 18:33:52

dntwrryboutit
Member
Registered: 2012-07-16
Posts: 4

Re: How to setup .Xresources?

Thanks for all the help. I recompiled dwm, after changing that one line. Also, I just made a .Xdeafaults instead of a .Xresources.

Offline

Board footer

Powered by FluxBB