-
Notifications
You must be signed in to change notification settings - Fork 16
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
PTY output not shown without GUI activity #53
Comments
@ConteZero I am not able to reproduce this issue in the test scene: However, I faced a similar issue when developing the integrated terminal EditorPlugin. When making the integrated terminal for editor I noticed that the output would not update unless moving the cursor to focus on another panel or after some other type of gui activity (e.g. button click, scroll, cursor blink, etc.). The output from PTY is only updated by calling godot-xterm/addons/godot_xterm/nodes/pty/unix/pty_unix.gd Lines 129 to 131 in 2acb93f
In editor, However, this issue affected all command output regardless of whether it had My workaround was to add a timer to regularly call
I now notice that Could you try changing Also, on the off chance that the issue isn't related to the PTY node, but rather the update functions of the Terminal node, you could try setting the If none of these suggestions fix the problem, then I would be interested in more details about your scene setup and operating system version/environment to try and reproduce the issue and figure out why |
sudo
commandssudo
commands without GUI activity
After doing same code changes to my project now I have the same update problem with and without Luckily your suggestion solves the problem, I've added to my
Thanks for your help. |
Ensures a redraw is requested after writing to terminal, otherwise terminal will not be updated if there are no other redraw requests. Fixes #53.
After digging a bit deeper, I have found that simply adding @ConteZero Would you be able to undo the changes you made above and, in
to this:
and let me know if that also fixes the problem? |
sudo
commands without GUI activity
I did various tests using For now your last solution seems to work well, the only drawback is that it slowdown the execution when the terminal is not visible.
This change avoid the slowdown but I don't know if it's right and if it can have unwanted side effects. |
@ConteZero Could you try the last solution but with the terminal's Otherwise, I can't think of any unwanted side effect that calling |
There are no speed differences between |
Requests a redraw after writing to terminal if it is visible, otherwise terminal will not be updated if there are no other redraw requests. Fixes #53.
This method was never officially documented and used only as a workaround for issue #53. It also returns an instance of the undocumented and scruffily implemented Pipe class that I would prefer to keep internal. Now that #53 has been fixed, this method can be removed from the unofficial public API, but deprecate it just in case. If someone was using it then it is still possible (although not supported) to access the `_pipe` property of `_pty_native`.
I also encountered another problem, but I don't know if it can be related to this one.
With the same setup (scene with Terminal,Pty and other input nodes) if I execute a command with
sudo
the terminal screen do not show the command output, to force a refresh I need to press a key or click on other input field to switch focus.The same command executed without
sudo
works as expected, the screen show the output.ping www.google.com
workssudo ping www.google.com
doesn't workOriginally posted by @ConteZero in #51 (comment)
The text was updated successfully, but these errors were encountered: