Jump to content

strange fonts in xterm


wa4chq

Recommended Posts

Hi all.....

This is a little puzzling for me. It's not a real issue but I'm curious why it's happening. I'm using Slackware 14.1 and zsh shell. I am getting strange fonts popping up now and then. I thought I found a fix where I edited /etc/profile.d/lang.sh. I changed this

export LANG=en_US

to this

#export LANG=en_US

and then I also un-hashed

export LANG=en_US.UTF-8
export LANG=en_US.ISO8859-1

this wasn't hashed out

export LC_COLLATE=C

here is what happens....again, I only get weird fonts using certain prompts so I'm not too worried if I can't fix it

http://www.qsl.net/wa4chq/zsh.jpg

I thought it was maybe a zsh config problem so I switched to bash but still there

http://www.qsl.net/wa4chq/bash.jpg

Any thoughts? Oh, and I'm using rxvt.....

Thanks

Link to comment
Share on other sites

securitybreach

Thats the output from your bash prompt that you have in .zshrc . Remove everything starting with PS1= till the end of that line. Then either reopen the terminal or reload zsh with:

source ~/.zshrc
Link to comment
Share on other sites

Hi SecurityBreach....thanks for the reply....

Not sure I understand..... or maybe I'm not clear with my question. My .zshrc is fine... in fact it's been the same for years. The links to the pics were just to show some of the strange fonts that show up. I was scrolling through some of the example prompts just so you could see what I meant. Same for bash.. I was just running examples.... but I first noticed it when using midnight commander....

mc.jpg

then after I set up zsh as my default shell I noticed the prompt that I had been using was outputting the funky letters.

Edited by wa4chq
Link to comment
Share on other sites

securitybreach

Have you tried messing with you ~/.Xresources or ~/.Xdefaults (depending)?

 

Also, have you tried another terminal app besides xterm?

Link to comment
Share on other sites

Hey SB....

I just tried using mc in the console and I don't have the funky fonts......so maybe it is something with .Xdefaults or .Xresources. I've tried xterm, rxvt and urxvt...same results.....so, like you suggested I bet it's .Xdefaults or .Xresources. I save my setups and use them on whatever flavor I happen to be using but .Xdefaults may have gotten messed up when I started setting up spectrwm. Having never used spectrwm, I used some of the examples for it from "dotshare.it". I'll go into my Archbang folder and grab my old .Xdefaults and see if there is something different about it.....

thanks!

Link to comment
Share on other sites

securitybreach

That didn't work. I'm not going to worry about it. Thanks for checking it out.

Have a great weekend

 

Umm, I think I wouldn't be able to let it slide so easily. Things like that will drive me nuts until I find the solution.

Link to comment
Share on other sites

Well, I decided not to give up and now I have another issue! ;) Finding it odd that when root and using mc I didn't see the strange fonts. So doing my usual kamakazi approach where you don't keep notes about what you do I now can't su to root! lol.....

wa4chq@seaelf:~

> su

Password:

Cannot execute zsh: No such file or directory

So I've backed up my home directory and /etc just in case I need to reinstall. lol....

Link to comment
Share on other sites

In messing with the shell, I thought I'd try switching root shell to zsh instead of bash. When I couldn't su to root I wasn't sure how to fix without being root. Anyway, I discovered that in /bin I had zsh and zsh-5.0.2@. When I typed /bin/zsh-5.0.2 at the prompt I found that I could su to root. I found something mentioned when I googled my su problem that I thought I'd try. I found

root:x:0:0::/root:/zsh

I didn't try it but for zsh it should have been

.....::/root:/bin/zsh

I just wanted it back to bash so I

root:x:0:0::/root:/bin/bash

whew...glad that worked.....

Link to comment
Share on other sites

securitybreach

Odd that there was two zsh files in /bin. Shouldn't that have been /usr/bin/ not /bin but Slackware is a bit different so I dunno.

Link to comment
Share on other sites

Hi Ebrke.... No, I don't think that is it's that but I do think it is zsh related but not to the zsh that comes with Slackware but with something I have been using called "oh-my-zsh" https://github.com/robbyrussell/oh-my-zsh

Now I've been using it with other flavors of linux over the years but I don't recall getting the funky fonts. So I'm gonna look into it and see if that could be causing the problem.

Link to comment
Share on other sites

securitybreach

I use oh-my-zsh too and it does not give you that file nor the font issues. I guarantee that it is something in your configuration. Urxvt only parses one file for its configuration and so does zsh.

Link to comment
Share on other sites

Hey SB....do you mean the OMZ config? .Xdefaults? Anyway, I've uninstalled it and now trying to get zsh right.....again, the crazy fonts aren't a big issue because the only time I see it is on mc and it's really not a bother or if I try different prompts.....some are fine others are funky.

Link to comment
Share on other sites

securitybreach

OMZ? What is that?? I personally use ~/.Xresources but is what most applications use instead of ~/.Xdefaults. Basically Xdefaults was the old method and Xresources is what is used now. Basically I copy the file both places as some apps still use the old Xdefaults too.

Link to comment
Share on other sites

My .xinitrc

#!/bin/sh

 

.Xresources

.Xdefaults

 

~/spectrwm_files/background.sh

~/spectrwm_files/baraction.sh

 

numlockx &

 

exec spectrwm

Link to comment
Share on other sites

securitybreach

Um why is .Xresources and .Xdefaults in there? That is pointless as you do not have to load those files as they are simply configuration files and doing that does not even do anything.

 

You use ~/.xinitrc as a startup file. Here is mine for instance:

#!/bin/sh
#
# ~/.xinitrc
#
## Executed by startx (run your window manager from here)

#Monitor settingss
redshift &

#Services
xautolock -time 10 -locker /home/comhack/.scripts/screenlock &
numlockx &
urxvtd -q -o -f &
udiskie &
xrdb -q &
nitrogen --restore &
mpd &

#Disable CapsLock
setxkbmap -option ctrl:nocaps &

#Cursor settings
xsetroot -cursor_name left_ptr
xinput --set-prop 12 "Device Accel Adaptive Deceleration" 1
xinput --set-prop 12 "Device Accel Constant Deceleration" 1
xinput --set-prop 12 "Device Accel Velocity Scaling" 1
xset m 3/2 0

#Fonts
xset +fp /usr/share/fonts/local
xset fp rehash
while true; do
xsetroot -name "$( date +"%F %R" )"
sleep 1m # Update time every minute
done &

#Environments
exec i3
#exec startkde
#exec startxfce4

Link to comment
Share on other sites

That's a good question.....and I don't know why..... :) Early on in my Slack 9.1 days I may have modeled it sorta after this:

http://www.slackbook.org/html/x-window-system-xinitrc.html ....loosely modeled, the way only I could do.... :)

I noticed in my archbang .xinitrc file it's not there....... I'll try it both ways and see what happens....

thanks for pointing this out!

Link to comment
Share on other sites

securitybreach

That's what I was saying... in that format, it's not doing anything at all. Their not executables so adding that will not do anything.

  • Like 1
Link to comment
Share on other sites

securitybreach

In your example, their using if statements to load sysresources, not just adding the file names to ~/.xinitrc. And as you can see from mine, none of that is needed anymore.

  • Like 1
Link to comment
Share on other sites

OK....I'm not familiar with a lot of code. I'm o.k. with very simple basic stuff.... most of the time I'll cut and paste and hope for the best!.... I've deleted .Xresources and .Xdefaults it from my .xinitrc file and rebooted....all looks fine. Console fonts look fine....so I was thinking it had something to do with rxvt.....I've tried xterm and just now aterm....still weird fonts. I remember years ago when I first started messing with Slackware to get x up and running I'd have to edit something....xf86config and later I think maybe xorg.conf??? I didn't have to do that when I installed 14.1. I don't remember it talking about fonts though...more mouse, monitor stuff..... let me try another window manager....

Link to comment
Share on other sites

securitybreach

That is because xorg does not require the xorg.conf file anymore. Xorg has become really good at autodetection and with the open source drivers, it isn't needed at all anymore. If you manually wanted to configure it, you could make an xorg.conf but it is usually isn't required.

 

As far as it being rxvt, that is because rxvt's configuration file ~/.Xresources had an error(s) in it.

Link to comment
Share on other sites

I remember a few years back I had strange borders in mc...... Instead of being something like |-----------------||-------------------| it looked something like this:

||@@@@@@@@@@||@@@@@@@@@@@@|| I think it had something to do with ncurses???? I don't think that's what's going on here....I'm not sure what's going on..... I'm gonna give it a rest for a while...... I appreciate the help, SB......

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...