• notfromhere@lemmy.ml
    link
    fedilink
    arrow-up
    31
    ·
    2 months ago

    Since nobody has said yet, I use screen pretty heavily. Want to run a long running task, starting it from your phone? Run screen to create a detachable session then the long running command. You can then safely close out of your terminal or detach with ctrl a, d and continue in your terminal doing something else. screen -r to get back to it.

      • huf [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        8
        ·
        2 months ago

        no, tmux is a newer screen. some of us havent switched cos we’re too lazy i guess? i think the common wisdom is that it’s better. i havent tried cos i already know enough of screen and it’s fine for me

    • gitamar@feddit.org
      link
      fedilink
      Deutsch
      arrow-up
      8
      ·
      2 months ago

      I recently switched to tmux and boy, it’s way better. I basically use only tmux now anymore. Creating panes to have two processes in one glance, multiple windows, awesome. Plus all the benefits of screen.

    • papertowels
      link
      fedilink
      arrow-up
      7
      ·
      2 months ago

      In a similar vein, nohup lets you send tasks to the background and seems to be everywhere.

      • pyr0ball@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        2 months ago

        You can’t mention nohup without at least mentioning kill -9 or pkill to slay the monster you created you madman

        • papertowels
          link
          fedilink
          arrow-up
          2
          ·
          2 months ago

          Sometimes I’ll just reboot the entire damn machine just to be safe ;)

        • Caveman@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago

          Eyyy, don’t hate, this is how I start all my work programs. That command is really nice and creates all work programs as children of a single terminal session for easy closing later.

          • pyr0ball@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            2 months ago

            No hate! Just need to make sure people know so they don’t create a bazillion threads without realizing it, or how to stop them effectively

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      Also, screen can connect to an UART device or serial or anything that offers up a TTY

    • muzzle@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      I Always forget to run screen first, so I just rely heavily on dtach

    • krash@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      How does screen / tmux work when detached from a session, how does it keep the session alive (both when running locally, and while ssh:ing to a server)? Is there a daemon involved?

      • darvit@lemmy.darvit.nl
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        You can find out by running screen and executing pstree, that way you can see how the screen process is run.