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

Greeting text from .bashrc is overwritten #899

Open
z0rti opened this issue Feb 2, 2022 · 6 comments
Open

Greeting text from .bashrc is overwritten #899

z0rti opened this issue Feb 2, 2022 · 6 comments
Labels

Comments

@z0rti
Copy link

z0rti commented Feb 2, 2022

Expected Behavior

Text should show completely

Current Behavior

Text is overwritten by prompt

Steps to Reproduce (for bugs)

put this in .bashrc

echo "--- Greetings, $USER"
echo "--- Your terminal size is: ${COLUMNS}x${LINES}"

(nothing else)
start qterminal, then run the echo command again to see the difference

--- Greetings, root
root@indri:~# nal size is: 12x2
root@indri:~# echo "--- Your terminal size is: ${COLUMNS}x${LINES}"
--- Your terminal size is: 80x27                                                
root@indri:~#                                                                   

It works in gnome-terminal:

--- Greetings, root
--- Your terminal size is: 80x24
root@indri:~# 

System Information
  • QTerminal version: master
  • Distribution & Version: Ubuntu indri
@stefonarch
Copy link
Member

stefonarch commented Feb 2, 2022

schermata-02-02-21-32

Cannot reproduce this neither in 1.0.0 neither in 0.17 (impish)

@z0rti
Copy link
Author

z0rti commented Feb 3, 2022

It just happens when i start a new qterminal, not with source
I tested it with 0.14.1 0.17.0 1.0.0 on impish,
0.14.1 on focal (can't compile master there due to g++ too old, and qt too)
What I do is start a qterminal, then start a new one by typing 'qterminal'
Now I noticed that when i use the menu to start a new window/tab, it does show all lines
Weird that it shows 12x2 first and then the right value with the echo command

@stefonarch
Copy link
Member

Ok, I get

 --- Greetings, stef
--- Your terminal size is: x
bash-5.1$ 

but only on the first tab, all the next ones are ok.

@tsujan
Copy link
Member

tsujan commented Feb 3, 2022

Ok, I get... but only on the first tab, all the next ones are ok.

Then we have a bug, probably in qtermwidget.

@z0rti
Copy link
Author

z0rti commented Feb 5, 2022

I found out that it has to do with the font (Using Liberation Mono) size:
With 8pt i get --- Your terminal size is: 16x2 the line is overwritten
With 10pt i get --- Your terminal size is: 14x2 the line is overwritten
With 11pt i get --- Your terminal size is: 12x2
With 12pt i get --- Your terminal size is: x and nothing is overwritten
(Using qtermwidget master too btw, and freetype + harfbuzz, but that didn't change a thing)

It seems that it has to do something with timing:
On the 'direct, local' focal it happens less often.
When i connect with ssh -X to it from another machine, and to the lxc ones, it happens all the time

Oh i found a workaround:

sleep .1
echo "--- Greetings, $USER"
echo "--- Your terminal size is: ${COLUMNS}x${LINES}"

With that sleep command added i don't get overwrites, and it shows the correct terminal size

QTerminal is too fast for me! ;-)
Or is it qtermwidget?
Is it really a bug now? Is it fixable?

@tsujan
Copy link
Member

tsujan commented Feb 6, 2022

Is it really a bug now?

Yes, it is.

Is it fixable?

It should be, if we find where it happens.

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

No branches or pull requests

4 participants