You are not logged in.
I copied and pasted copy-paste-chunk from internet into my ~/.Xresources. It works when I call xterm but when I open xterm by mod1 + shift + enter (default binding in DWM to open terminal), the configuration is not applied correctly, and the text for some reason is whitened out.
In my ~/.xinitrc, I have following:
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
I have read literally dozens of websites including Arch Wiki about Xresources for a couple of hours now, but I cannot figure it out.
I attach the following:
1. xterm called by dwm (key binding) [top-left]
2. xterm called by "xterm" [bottom-left]
3. my ~/.Xresources [right]
https://i.imgur.com/OqA7aHd.jpg
*When I say no text show up, I meant the white background terminal
EDIT FOR FUTURE TRAVELLERS:
If you are using dwm and for some reason your terminal opened up doesn't correctly update while calling xterm on terminal does, check if dwm is actually opening the terminal you have configured by looking at termcmd in config.h. Mine was set to uxterm while I configured for xterm, so that was why it was only partially applied. Good luck!
Last edited by techrat_arch (2014-09-28 04:19:28)
Offline
Please don't paste screenshots of text; paste the text. And include your .xinitrc.
Offline
Alright.
.xinitrc
1 #!/bin/sh
2 #
3 # ~/.xinitrc
4 #
5 # Executed by startx (run your window manager from here)
6
7 if [ -d /etc/X11/xinit/xinitrc.d ]; then
8 for f in /etc/X11/xinit/xinitrc.d/*; do
9 [ -x "$f" ] && . "$f"
10 done
11 unset f
12 fi
13
14
15 [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
16 sh ~/.fehbg &
17 conky | while read -r; do xsetroot -name "$REPLY"; done &
18 # this allows dwm to restart without closing the windows
19 source ~/scripts/startdwm
.Xresources
xterm*termName: xterm-256color
xterm*locale: true
xterm*saveLines: 4096
xterm*faceName: Terminus:style=Regular:size=12
!BLK Cursor
#define _color0 #000d18
#define _color8 #000d18
!RED Tag
#define _color1 #e89393
#define _color9 #e89393
!GRN SpecialKey
#define _color2 #9ece9e
#define _color10 #9ece9e
!!YEL Keyword
#define _color3 #f0dfaf
#define _color11 #f0dfaf
!BLU Number
#define _color4 #8cd0d3
#define _color12 #8cd0d3
!MAG Precondit
#define _color5 #c0bed1
#define _color13 #c0bed1
!CYN Float
#define _color6 #dfaf8f
#define _color14 #dfaf8f
!WHT Search
Last edited by techrat_arch (2014-09-28 03:34:46)
Offline
What's in your startdwm script?
I gather it is an endless loop. Have you fully restarted X since you edited Xresources, or have you only been restarting dwm in that loop? If the latter, your results are what I'd expect.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yeah, I copy and pasted from dwm arch wiki I believe. I tried
reboot
, but terminal is still blank.
~/scripts/startdwm
1 while true; do
2 # Log stderror to a file
3 dwm 2> ~/.dwm.log
4 # No error logging
5 #dwm >/dev/null 2>&1
6 done
Offline
Top left xterm seems fine and from the description in the screenshot, it seems to be called from bottom left xterm, not via the dwm keybinding.
Check e.g. with htop process names and options for both xterms.
Next time please post w/o the line numbers.
Last edited by karol (2014-09-28 01:29:06)
Offline
`[[` is a bashism, use `[`.
Offline
@karol
Sorry my description was wrong The top-left was indeed called by bottom-left. Bottom-left was called by the key-binding.
I installed htop and ran it, but I am not really sure what I should be looking for. I used filter for 'xterm' and found two just running xterm and one running
xterm -class UXTerm -title uxterm -u8
I will post without numbers next time. Do people usually
set nu
to get rid of numbers before posting or is there a better way?
@jasonwryan
Wow, I didn't know about that. Is there any reason why Arch Wiki uses that code? So just to make things clear, bashism is commands that are not supported by bash/POSIX, but are used for historic reasons?
Offline
See http://mywiki.wooledge.org/Bashism
Does changing it work?
Offline
@jason wryan. No unfortunately.
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
sh ~/.fehbg &
conky | while read -r; do xsetroot -name "$REPLY"; done &
# this allows dwm to restart without closing the windows
source ~/scripts/startdwm
I was wondering, could there be possibility where dwm is launching some other kind of terminal, not xterm? I tried echo $TERM in white background terminal returned terminal-color256, so I went back to .Xresources to change xterm*termName to xterm and restarted, yet no difference
Last edited by techrat_arch (2014-09-28 02:46:28)
Offline
Oops, It turns out that I didn't attach full length of ~/.Xresources. My bad. How can you copy stuff from vim to browser? I searched at "+yy or "*yy doesn't seem to be working with mine or I don't understand how to use it. I tried middle clicking but my terminal or vim doesn't drag along with my cursor, so I can't scrape the whole file.
This is my xrdb -query though because I could scrape it in one monitor
URxvt*background: #1f1f1f
URxvt*color0: #000d18
URxvt*color1: #e89393
URxvt*color10: #9ece9e
URxvt*color11: #f0dfaf
URxvt*color12: #8cd0d3
URxvt*color13: #c0bed1
URxvt*color14: #dfaf8f
URxvt*color15: #efefef
URxvt*color2: #9ece9e
URxvt*color3: #f0dfaf
URxvt*color4: #8cd0d3
URxvt*color5: #c0bed1
URxvt*color6: #dfaf8f
URxvt*color7: #efefef
URxvt*color8: #000d18
URxvt*color9: #e89393
URxvt*colorBD: #ffcfaf
URxvt*colorIT: #80d4aa
URxvt*colorUL: #ccdc90
URxvt*cursorColor: #8faf9f
URxvt*foreground: #dcdccc
XTerm*background: #1f1f1f
XTerm*color0: #000d18
XTerm*color1: #e89393
XTerm*color10: #9ece9e
XTerm*color11: #f0dfaf
XTerm*color12: #8cd0d3
XTerm*color13: #c0bed1
XTerm*color14: #dfaf8f
XTerm*color15: #efefef
XTerm*color2: #9ece9e
XTerm*color3: #f0dfaf
XTerm*color4: #8cd0d3
XTerm*color5: #c0bed1
XTerm*color6: #dfaf8f
XTerm*color7: #efefef
XTerm*color8: #000d18
XTerm*color9: #e89393
XTerm*colorBD: #ffcfaf
XTerm*colorIT: #80d4aa
XTerm*colorUL: #ccdc90
XTerm*cursorColor: #8faf9f
XTerm*foreground: #dcdccc
xterm*faceName: Terminus:style=Regular:size=12
xterm*locale: true
xterm*saveLines: 4096
Offline
The terminal dwm launches is defined in config.h.
You should also exec the start script, not source it. Is conky working? It doesn't seem to be showing in your screenshot.
Why are you defining those colours, rather than using the standard notation?
Offline
Holy mother of God. Thanks so much Jason! I checked config.h and it was set to uxterm, so I changed it back to xterm and it's good now.
I heard that source [file_name] is same thing as doing ./[file_name]? So far, it worked, but should I change that?
I cropped out conky and the bar above because of privacy. I didn't right the script myself. I found some config I liked a lot, so I just copied and pasted it. I might actually try to configure it myself sometimes later though.
By the way, I love your dwm configuration. I especially like your EML which I assume is linked to your email account? May I ask what PKG and AUR represent? I know what package and AUR is, but I am just not sure what the numbers are supposed to represent.
Also, how do I mark resolved?
Offline
. is the portable version, source the GNU version. There is a slight difference insofar as ./script launches a new shell while source uses the current one.
Given .xinitrc is read as /bin/sh, you should stick with the POSIX commands.
EML is the count of all new mail in my mailboxes. PKG is the available updates, AUR is the same for the AUR.
You can mark this as solved by editing your first post and prepending it to the title.
Offline
Even though you've already solved it, I'd like to answer some of your questions.
I have
map <silent> <F9> :set nornu nonu<cr>
in my ~/.vimrc so pressing 'F9' takes care of line numbers.
If you want to share logs, configs etc., you can use https://wiki.archlinux.org/index.php/Pa … in_clients
There are many ways to make your browser and editor work better together.
First of all, make sure that the vim you're using supports "+yy and "*yy:
vim --version | grep -e Features -e clipboard
Offline