Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powerline symbols in (u)xterm and (u)rxvt are shown as squares or not shown at all. #1589

Closed
doronbehar opened this issue May 6, 2016 · 8 comments

Comments

@doronbehar
Copy link

doronbehar commented May 6, 2016

I've seen a lot of threads and issues around the internet regarding this Issue but I can't find any solution that works for me.

Currently I use Gnome terminal on Ubuntu Gnome and the powerline symbols are shown great. I would like to start using xterm/uxterm rxvt/urxvt. Although I slightly prefer xterm I wouldn't mind between choosing one of them but I can't make any of them work properly with the powerline symbols. I have tried already running: rxvt -fn 'xft:DejaVu Sans Mono for Powerline-10' as sugested in #684 but no luck.

This is my ~/.Xresources:

xterm*facename: source code pro for powerline
xterm*font: 8x16
xterm*facesize: 16
xterm*utf: on
xterm*utf8: on

This is how my prompt looks like on xterm:
screenshot from 2016-05-06 19-32-51

And this is how it looks on gnome-terminal:
screenshot from 2016-05-06 19-34-15

@doronbehar
Copy link
Author

Update:

I have managed to make the font look better with the following configuration only for the font:

xterm*faceName: PowerlineSymbols
xterm*faceSize: 13

But still I can't see the powerline symbols:
screenshot from 2016-05-07 14-01-27

I've also tried to use the following:

xterm*faceName: PowelineSymbols

But the same result.

@doronbehar
Copy link
Author

O.K, Issue is sort of fixed.

My problem was that I didn't know I have to download the patched fonts from https://github.com/powerline/fonts - It fixed the problem. I thought that if I was able to see the font well with gnome-terminal, I should see it well without installing anything new for xterm. In addition, I had to figure out somehow that after running ./install.sh in the powerline-fonts repo, I had to ln -s ~/.local/share/fonts ~/.fonts and only then xterm was able to see those fonts.

I'm still not quite satisfied like I was with gnome-terminal - I can't see some characters like the clock: at the bottom of tmux's window.


Note:

I wanted to switch to xterm because I thought it might be more light wight compared to gnome-terminal. I thought I would get rid of the annoying flickers in gnome-terminal but xterm doesn't perform a lot better at all. even urxvt doesn't perform much better either (at least with the powerline font). My test was a tmux session with 6 windows opened while 1 of them had lot of log data printed on it and the other pane had vim opened with 2 internal windows in it. If I'd open a lot of tabs or more windows in vim's pane I would get a very low refresh rate on all terminal emulators. Consider it with the fact I have 2 monitors as well.

@ZyX-I
Copy link
Contributor

ZyX-I commented May 8, 2016

@Doron-Behar Do not forget that tmux itself is a terminal emulator. If you want to test performance of gnome-terminal rendering vs … rendering you need to test it without tmux. Otherwise you most likely are testing tmux performance summed with terminal emulator performance. E.g. when I print dmesg in a konsole window I get next prompt displayed immediately. When I do the same in tmux I am able to catch something like 3 frames of intermediate state.

Also note that tmux has one server and, according to pstree, it looks like the server has to process all output of all applications run inside while being itself single-threaded. I do not know where that output is rendered by tmux (it e.g. could simply store it and push to client to do actual rendering), but even concurrently reading applications’ output in a single-threaded single-process application may be a challenging task when there are many applications.

@doronbehar
Copy link
Author

I don't want to be rude or something but how come tmux is a terminal emulator? I thought it should be a terminal multiplexer. For example, if I run a desktop session, I can't launch tmux by it self - I need to emulate a terminal and launch it there. Besides, Let's say that without tmux, both xterm and gnome-terminal share the same rendering performance. In this case there isn't a very good reason to switch from one to another, So what could be the point of using a terminal multiplexer like screen or tmux. I mean that if a person want's to have a multiple windows and multiple panes for his terminal, He could use tabs as an available feature that exists in (modern) terminal emulators like gnome-terminal for example and not xterm.

@t3chguy
Copy link

t3chguy commented May 8, 2016

@Doron-Behar one reason for things such as tmux and gnu screen is for the ability to close the shell and then later on be able to get access to the Standard IO once again, good for background tasks that sometimes need maintenance and the likes. This is often coined Detaching.

@ZyX-I
Copy link
Contributor

ZyX-I commented May 8, 2016

@Doron-Behar To provide all features tmux has it has to be a terminal emulator. It interprets incoming escape sequences, renders it into some internal data structure and uses it to direct “real” terminal emulator what to show.

I state that it is a terminal emulator because it has own pty with which applications are connected and it does rendering of the incoming data: even though rendering stops before finding out what pixels with which color to show (which xterm and other do) determining what symbol to display in which screen cell and with which color is enough to call it so.

@t3chguy Being terminal emulator is not needed for detaching (dtach is an example of an application which allows detaching, but is not a terminal emulator), but this is needed to have more then one pane. Or even a single pane, but with a status line: emulating terminal is needed for any job that requires screen/tmux/… to control part of the screen independently from an application that is run inside.

@doronbehar
Copy link
Author

@t3chguy, If you ask me, besides the feature of detaching the sessions of tmux or screen, it is much easier and fun to configure keyboard shortcuts etc with tmux for example because these are all defined in text files and scripts. tmux and possibly screen as well (for as far as I know) has a lot of plugins you can install just by sourcing them in your ~/.tmux.conf. You can clone your dotfiles to a remote machine and feel right at home.

In contrast, There is also urxvtd and urxvtc which can perform just like tmux or screen because these are a daemon and a client versions of urxvt so they enable to detach sessions as well.

And @ZyX-I, If I want to get rid of the screen flickering, should I try screen? Or perhaps I should use a different terminal emulator like Terminator?

@ZyX-I
Copy link
Contributor

ZyX-I commented May 8, 2016

@Doron-Behar Different terminal emulator is not going to help if bottle neck is tmux. I use tmux and not screen and did not really see flickering, so cannot give an advice.

There is one possible alternative which you may want to try: have multiple tmux servers. Tmux allows specifying socket path with -L or -S (see man tmux) thus allowing multiple servers used by one user. Though to make this variant convenient you may need a shell script wrapper.

By the way, I know about urxvtd/urxvtc pair and used to use it, but never heard it has this functionality of tmux. man urxvtc and man urxvtd also do not show anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants