LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Garbled output with rxvt, font related? (https://www.linuxquestions.org/questions/slackware-14/garbled-output-with-rxvt-font-related-4175602116/)

coralfang 03-19-2017 06:20 AM

Garbled output with rxvt, font related?
 
1 Attachment(s)
Hi, i've been trying to make rxvt look nicer to use through ~/.Xresources

I'm using a font name generated by the xfontsel program
Code:

*.font: -misc-tamsyn-medium-r-normal-*-15-*-*-*-*-*-*-*
However, some commands; notably pstree, will spit out garbage instead of the ASCII styled lines (see the attached image).

I've also tried setting this to 0/1
Code:

Rxvt.utf8: 1
No success however. I'm using en_US / en_GB as my system locales if that is of any use. And the Tamsyn font works fine in other terminal emulators (xterm, konsole, xfce4-terminal, mate-terminal etc). Just seems to be rxvt doing this?

How can i fix this?

Didier Spaier 03-19-2017 06:34 AM

1 Attachment(s)
Not a direct answer but... Why use a software released on 26 March 2003 (nearly 14 years ago)?

Use xterm.

allend 03-19-2017 07:19 AM

You can try running rxvt in a non-UTF8 locale to get tree, pstree to look right.
Code:

LANG=en_GB rxvt
Since Slackware made UTF-8 the default to support extended character sets, rxvt looks antiquated. I updated to urxvt from rxvt for UTF-8 support. One nice feature of urxvt is the ability to copy columns from output on a display.

Thom1b 03-19-2017 11:57 AM

I suggest you to use rxvt-unicode.

coralfang 03-20-2017 12:21 AM

Quote:

Originally Posted by Didier Spaier (Post 5685482)
Not a direct answer but... Why use a software released on 26 March 2003 (nearly 14 years ago)?

Use xterm.

Good point, but it's included in the default Slackware packages. No other reason than that really. Maybe it should be switched out for urxvt as a standard package?

Quote:

Originally Posted by Thom1b (Post 5685548)
I suggest you to use rxvt-unicode.

Quote:

Originally Posted by allend (Post 5685485)
You can try running rxvt in a non-UTF8 locale to get tree, pstree to look right.
Code:

LANG=en_GB rxvt
Since Slackware made UTF-8 the default to support extended character sets, rxvt looks antiquated. I updated to urxvt from rxvt for UTF-8 support. One nice feature of urxvt is the ability to copy columns from output on a display.

That's a woking solution! Thanks. I had forgotten Slackware switched to UTF-8 as default, and i just realised the standard rxvt doesn't support unicode... However i did try building rxvt-unicode a few times a while back and always get a build error about libharfbuzz?


Code:

gcc  -o rxvt rxvt.o background.o command.o rxvtfont.o init.o main.o misc.o screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o rxvtperl.o -lsupc++ -lm -lfontconfig -lfreetype -lXft -lXrender -lX11 -lXmu -lXt -lX11  -lX11  -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lstartup-notification-1 -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
/usr/lib64/gcc/x86_64-slackware-linux/5.4.0/../../../../x86_64-slackware-linux/bin/ld: /usr/local/lib/libfreetype.a(autofit.c.o): undefined reference to symbol 'hb_font_destroy'
/usr/lib64/libharfbuzz.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:67: rxvt] Error 1
make[1]: Leaving directory '/tmp/SBo/rxvt-unicode-9.22/src'
make: *** [Makefile:37: all] Error 1

However it seems to be installed...
Code:

[ Status          ] [ Repository              ] [ Package                                  ]
  installed              multilib                    harfbuzz-compat32-1.4.4-x86_64-1compat32 
  installed              slackware64                  harfbuzz-1.4.4-x86_64-1

I guess the best option is to used rxvt-unicode, but how can i get this to compile on -current?

Thom1b 03-20-2017 02:04 AM

Quote:

Originally Posted by coralfang (Post 5685759)
That's a woking solution! Thanks. I had forgotten Slackware switched to UTF-8 as default, and i just realised the standard rxvt doesn't support unicode... However i did try building rxvt-unicode a few times a while back and always get a build error about libharfbuzz?


Code:

gcc  -o rxvt rxvt.o background.o command.o rxvtfont.o init.o main.o misc.o screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o rxvtperl.o -lsupc++ -lm -lfontconfig -lfreetype -lXft -lXrender -lX11 -lXmu -lXt -lX11  -lX11  -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lstartup-notification-1 -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
/usr/lib64/gcc/x86_64-slackware-linux/5.4.0/../../../../x86_64-slackware-linux/bin/ld: /usr/local/lib/libfreetype.a(autofit.c.o): undefined reference to symbol 'hb_font_destroy'
/usr/lib64/libharfbuzz.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:67: rxvt] Error 1
make[1]: Leaving directory '/tmp/SBo/rxvt-unicode-9.22/src'
make: *** [Makefile:37: all] Error 1

However it seems to be installed...
Code:

[ Status          ] [ Repository              ] [ Package                                  ]
  installed              multilib                    harfbuzz-compat32-1.4.4-x86_64-1compat32 
  installed              slackware64                  harfbuzz-1.4.4-x86_64-1

I guess the best option is to used rxvt-unicode, but how can i get this to compile on -current?

I can't test on current because I don't use it, but it works fine on 14.2 (harfbuzz-1.2.7-x86_64-1)
Maybe you can try to disable pixbuf "--disable-pixbuf" in the SlackBuild.

Petri Kaukasoina 03-20-2017 02:12 AM

Quote:

Originally Posted by coralfang (Post 5685759)
Code:

/usr/lib64/gcc/x86_64-slackware-linux/5.4.0/../../../../x86_64-slackware-linux/bin/ld: /usr/local/lib/libfreetype.a(autofit.c.o): undefined reference to symbol 'hb_font_destroy'

You have installed a broken freetype in /usr/local ?

allend 03-20-2017 02:25 AM

I had no problems using the SlackBuild that Thom1b linked.
Some tips on using urxvt and getting the Home/End keys to work:
Edit /etc/inputrc as per http://www.linuxquestions.org/questi...ml#post5626083 Remember to logout and login for the changes to take effect.
I have these added to ~.Xresources
Code:

!  Copied from 'man 7 uxrvt'. Use with -name URxvt
!  Also need entries in /etc/inputrc (and logout and login to activate)
! Map Home key to line start for urxvt
URxvt.keysym.Home:          \033[7~
! Map End key to line end for urxvt
URxvt.keysym.End:          \033[8~
! Set the default font for urxvt
URxvt.font: -xos4-terminus-medium-*-*-*-16-*-*-*-*-*-*-*
! Set the default bold font for urxvt
URxvt.boldFont: -xos4-terminus-bold-*-*-*-16-*-*-*-*-*-*-*
! Set the default italic font for urxvt
URxvt.italicFont: -misc-dejavu sans mono-medium-o-*-*-17-*-*-*-*-*-*-*
! Set the default bold italic font for urxvt
URxvt.boldItalicFont: -misc-dejavu sans mono-bold-o-*-*-17-*-*-*-*-*-*-*
! Start tabbed terminals in uxrvt
! URxvt.perl-ext-common: default,tabbed


coralfang 03-20-2017 02:29 PM

Quote:

Originally Posted by Petri Kaukasoina (Post 5685782)
You have installed a broken freetype in /usr/local ?

Not that i'm aware of but looking at the error i posted that seems to be the case. I must have ran a make install on something a while ago which shipped freetype2 sources along with it.

I just cleaned up /usr/local/lib/ and /usr/local/include/ removing all the freetype2 folders and urxvt has now compiled!

Sorry for being a pain, i should have noticed that the first time around. But problem solved. Thanks for all the help and suggestions!


All times are GMT -5. The time now is 12:47 PM.