Running certain commands in tty of guest in Gnome Boxes pushes prompt off screen

Discussion in 'Desktop Operation' started by jeremy ruddock, Feb 15, 2023.

  1. jeremy ruddock

    jeremy ruddock New Member

    Hello, i seem to be having some problems with using tty terminals on a guest OS (Fedora 37, Gnome 43) in Gnome Boxes, running a command that gives long output, such as cat on a large file, pushes the prompt off the bottom of the screen, with the only way to get it back seeming to be clearing the screen. Could anyone possibly provide a solution for this? I wasn't able to find a lot about this, but what i could find suggested it had to with the wrong resolution being set for the vm. Any help would be greatly appreciated.
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    You can list all available framebuffer modes with a tool like hwinfo and set one of the modes in your grub defaults and then update grub and reboot. Or set them temporary by editing grub config while booting.

    For example add or change the line in /etc/default/grub:
    Code:
    GRUB_GFXPAYLOAD_LINUX=1280x1024
    and then run the update-grub and reboot:
    Code:
    update-grub
    reboot
     
    ahrasis likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    And you can use the command 'more' to view the output step by step. e.g.:

    ls -la /etc | more
     
    ahrasis likes this.
  4. lukafred

    lukafred New Member

    I'll try to explain the title better :)

    I have two terminals tty1 and tty2, let's call them that.

    From tty1 I redirect the output from echo to the tty2 terminal with:

    echo hello > $(tty2)

    This works and I get 'hello' on tty2.

    The "problem" is that after 'hello' is printed on tty2, the tty2 terminal doesn't give a prompt back. I have to manually press enter on tty2 to get a new prompt.

    How can I redirect the output, but and get a new prompt after the redirect?

    Thanks :)

    Note: Even though 'hello' is there, I can still execute a new command, but it looks weird, and I wanted to have a clean prompt after the redirect.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Start with command
    Code:
    type -a echo
    to see which echo command you are using. If it is shell builtin, read command shell documentation on how echo works. If echo is an executable file some /bin -directory, read man echo.
    Then learn how to get echo to output the enter you want after "hello".
    But I do wonder, what has your question to do with jeremy ruddocks question from february 2023 and howcome you ask command line things on Desktop Operation forum.
     

Share This Page