You are not logged in.

#1 2015-01-23 12:36:33

JamesLens
Member
Registered: 2014-04-03
Posts: 17

Maximizing and unmaximizing terminal leads to text corruption.

From time to time when I maximize and then unmaximize the terminal window, the text already in the terminal doesn't show up as it should. It either shows up duplicated or shifted downwards or even shows up completely blank as shown below:

Blank terminal screen after unmaximizing:
http://s8.postimg.org/hp5ymodv9/blank_Term.png

Here text should be on top, instead it appears at the bottom of the maximised screen. When its like this, if I try write something and then unmaximise it goes blank as above:
http://s3.postimg.org/hm8f08ts3/maximised.png

Additionally when I execute for example ls in the maximised window and then minimize it, instead of wrapping the output it cuts off the end.

Sorry if this is vague, but I have no idea what could be causing this. As an aside, it behaves properly inside tmux.



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by JamesLens (2015-01-23 13:11:37)

Offline

#2 2015-01-23 12:48:35

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: Maximizing and unmaximizing terminal leads to text corruption.

You'll have to provide some more information, like which terminal emulator, DE/WM, graphics driver etc.

Offline

#3 2015-01-23 12:59:23

JamesLens
Member
Registered: 2014-04-03
Posts: 17

Re: Maximizing and unmaximizing terminal leads to text corruption.

Sure,

Shell: Bash
Terminal Emulator: URxvt
DE: Cinnamon
Graphics Drivers:
VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
and
VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev ff) through bumblebee

I don't recall this being a problem until recenltly, where the only thing I changed was the terminal prompt. Previously I had an issue with long strings being wrapped around in the same line, so I changed the command prompt to:
PS1='[\u@\[\e[0;34m\]\h\[\e[m\] \W]\$ '
Which fixed the issue.

I can gladly provide more information if necessary.

Edit: an additional issue I just noticed (which wasn't happening before) is that when I execute ls in the maximised window and then minimize it, instead of wrapping the output it cuts off the end.

Last edited by JamesLens (2015-01-23 13:06:02)

Offline

#4 2015-01-23 13:31:19

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: Maximizing and unmaximizing terminal leads to text corruption.

I just tried to replicate your problem and I have the same cut-off behavior on both of my PCs (XFCE4-terminal, NVIDEA, compton, XFCE4 with openbox and i3wm on the other). This goes for zsh, bash and fish. The blank screen only happens in bash and I did not see it on my laptop with i3.

Anyway, I'll get back to you if I can think of a reason why this might happen.

Offline

#5 2015-01-23 13:52:52

JamesLens
Member
Registered: 2014-04-03
Posts: 17

Re: Maximizing and unmaximizing terminal leads to text corruption.

Thanks, just to add I deleted both .Xresources and .bashrc and it still happens in both xterm and urxvt. No idea what it might be.

Offline

#6 2015-01-23 14:02:45

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Maximizing and unmaximizing terminal leads to text corruption.

Press Ctrl+L.

Offline

#7 2015-01-23 17:49:49

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Maximizing and unmaximizing terminal leads to text corruption.

For bash, try adding shopt -s checkwinsize to your bashrc.  I don't know if the same shell option is available for zsh.

Offline

#8 2015-01-23 21:47:44

JamesLens
Member
Registered: 2014-04-03
Posts: 17

Re: Maximizing and unmaximizing terminal leads to text corruption.

Thanks for your replies.

ANOKNUSA, I'm aware of Ctrl+L, but it's annoying having to do it every time I resize the window, and the previous output is lost. It is an option though.

thisoldman, tried that but it didn't change anything unfortunately.

It looks like this is standard behaviour for most systems, I tried it on my housemates arch and the same thing happened. Also this post talks of the same issue: http://superuser.com/questions/442589/x … r-resizing . The solution seems to be to use screen or tmux, otherwise I'm not sure how to fix it. The placing of "for (( i=1; i<=$LINES; i++ )); do echo; done; clear" into bashrc as stated in the link didn't work for me either.

Offline

Board footer

Powered by FluxBB