You are not logged in.

#1 2014-10-13 07:57:47

heroinsunrise
Member
Registered: 2014-10-10
Posts: 8

Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

I'm using Arch  with Openbox.
Compton as composite manager, ẅith the open source  Xf86-video-ati driver,
URxvt as terminal emulator (with the perl extension collection, more specifically tabbedex,default,keyboard-select,url-select,clipboard,matcher)
and zsh with Oh-My-Zsh as shell.

Recently switched to Arch from Ubuntu, and I'm loving it. But as the topic says, I'm getting some strange behaviors while using URxvt. If I type a command into the terminal, using tab-completetion as i usually do, and then delete some character or press tab again, in about 50% of the cases some characters from the previous command remain on the command line. Also, if I type in for example 'sudo tail -f /var/log', and delete the entire line, the 'S' letter will persistantly remain after my prompt, making the next command 'ssudo'. Other times, the '/' might remain stuck from the '/var/log' part, as shown in the screenshot.

Tried my best to reproduce the problem for a screenshot, so see the image below, the two upmost terminals for an example of what it usually looks like.

Could anybody help me out finding out the cause of this problem? Is it related to zsh, urxvt or the graphics driver?

t2qNtqis.png

Offline

#2 2014-10-13 08:00:28

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

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

Does it happen without Oh-my-zsh? It is likely your prompt (with incorrect or missing escapes) or you are exporting your term.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-10-13 08:25:41

heroinsunrise
Member
Registered: 2014-10-10
Posts: 8

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

jasonwryan wrote:

Does it happen without Oh-my-zsh? It is likely your prompt (with incorrect or missing escapes) or you are exporting your term.

How would I check the prompt for missing escapes? Haven't tried not using Oh-My-Zsh, would rather fix it if that's the problem.

My current prompt/Oh-My-Zsh-theme:

 
PROMPT='[%{$fg_bold[white]%}%n%{$reset_color%}@%{$fg_bold[red]%}%m%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%{$reset_color%}]$ '

ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}"

Thank you for your time smile

Last edited by heroinsunrise (2014-10-13 08:28:14)

Offline

#4 2014-10-13 08:51:10

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

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

The easiest way is to remove Oh-my-Zsh (which is a heap of bloated ****, IMO) and see if you can replicate the issue. Similarly with your prompt, comment out that one and test with a vanilla prompt.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-10-13 11:55:46

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

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

From what you posted none of the color codes are escaped in that prompt - so that would seem to be the problem.

I'm not a zsh user, but in bash the color codes would need to be enclosed in \[ \] pairs:

PROMPT='[\[%{$fg_bold[white]%}\]%n\[%{$reset_color%}\]@\[%{$fg_bold[red]%}\]%m\[%{$reset_color%}\] \[%{$fg[cyan]%}\]%c\[%{$reset_color%}\] $(git_prompt_info)\[%{$reset_color%}\]]$ '

You'd probably need to do something with that git_prompt_info too, but I don't know what that is.

EDIT: I'm not seeing these \[ \] in any zsh examples I can find, so these maybe bash-specific - you'll need to check how to do this in zsh.

Last edited by Trilby (2014-10-13 11:57:53)


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

Offline

#6 2014-10-13 18:18:48

heroinsunrise
Member
Registered: 2014-10-10
Posts: 8

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

jasonwryan wrote:

The easiest way is to remove Oh-my-Zsh (which is a heap of bloated ****, IMO) and see if you can replicate the issue. Similarly with your prompt, comment out that one and test with a vanilla prompt.

zsh -f - disabling oh-my-zsh - made the problem go away. I parsed the .zshrc file, and found it to be a setting that I'd kept in the process of moving to Arch (as you said, by the way.) - "export TERM=uxterm". Removed this line, and the problem was gone. Thank you for your help!

On another note, that of Oh-My-Zsh being bloated: Is there an alternative to this that you would recommend over OMZSH? I'm mainly after the tab completion features of it.

Offline

#7 2014-10-13 18:23:19

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

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

The only reasonably alternative is to write your own configuration.  You can look at oh-my-zsh for ideas, though that might be hard to do as it is just so damn big.  Look at other users' config files and pick and chose which settings you'd like to use, but only when you understand what those settings do.

Many users share their configs in various threads here; some even post links to them in their signatures.  JWR uses zsh, I think, and has a dot-file repo around somewhere.


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

Offline

#8 2014-10-13 18:42:00

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

Re: Strange behavior in URxvt - charactes remain on screen (Incl. Scrot)

Zsh's tab completion is awesome out of the box. If you really want to use a framework, use grml. My approach is to start with vanilla and then add functionality in increments as you discover or need it, this way you learn how it works and what is important to you.

Having said that, as Trilby mentioned, my dots are in my signature...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB