How can I save a scrollable terminal window (RoxTerm) into a png image?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
3
down vote

favorite












I would like to save a Ruby program coloured terminal output into a png file, output doesn't fit into the screen height, so it is scrollable. Is it possible to save the whole or part of the scrollable terminal window area (not only the visible part of course, but scrolling a bit upwards) into a png file?







share|improve this question



















  • Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
    – sudodus
    Jul 29 at 18:26
















up vote
3
down vote

favorite












I would like to save a Ruby program coloured terminal output into a png file, output doesn't fit into the screen height, so it is scrollable. Is it possible to save the whole or part of the scrollable terminal window area (not only the visible part of course, but scrolling a bit upwards) into a png file?







share|improve this question



















  • Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
    – sudodus
    Jul 29 at 18:26












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I would like to save a Ruby program coloured terminal output into a png file, output doesn't fit into the screen height, so it is scrollable. Is it possible to save the whole or part of the scrollable terminal window area (not only the visible part of course, but scrolling a bit upwards) into a png file?







share|improve this question











I would like to save a Ruby program coloured terminal output into a png file, output doesn't fit into the screen height, so it is scrollable. Is it possible to save the whole or part of the scrollable terminal window area (not only the visible part of course, but scrolling a bit upwards) into a png file?









share|improve this question










share|improve this question




share|improve this question









asked Jul 29 at 17:45









Konstantin

1215




1215











  • Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
    – sudodus
    Jul 29 at 18:26
















  • Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
    – sudodus
    Jul 29 at 18:26















Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
– sudodus
Jul 29 at 18:26




Workarounds: 1. Change to a smaller font, to show more (or all) of the content in the window; 2. Mark and paste the whole content of the window to a file. This means that you wil lose the colours; 3. Redirect (if possible) the output to a file. This might preserve the colour information, so that it can be rendered (for example by cat file).
– sudodus
Jul 29 at 18:26










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










You don't have to use a real screen of limited size. Create a virtual screen of the size needed to show all your output at once, then dump that screen or terminal. For example:



$ Xvfb :1 -screen 0 100x4000x24 -noreset &
$ xterm -geometry 10x200 -display :1 -e
sh -c 'echo $WINDOWID >/tmp/id;ls -l /etc;sleep 99' &
$ DISPLAY=:1 convert x:$(cat /tmp/id) /tmp/out.png
$ identify /tmp/out.png
/tmp/out.png PNG 79x2604 ...


This creates a 100 by 4000 pixel screen, with an xterm 200 lines high.
The WINDOWID variable is exported by xterm, and can be given to ImageMagick's convert program to copy the image to a png file. The identify command shows that the whole xterm contents were captured, which would not be the case on my real screen of only 1080 pixels.






share|improve this answer






























    up vote
    1
    down vote













    I've been using asciienma.org (previously ascii.io) to create recorded sessions for tutorials that I need to embed/share of actions in a terminal. The recordings can be saved and downloaded into a .cast format which you can then convert to a .gif format.



    To convert the .cast files to .gif I use this project - asciicast2gif. The results speak for themselves:



    ss1



    References



    • asciicast file format (version 2)

    • asciinema/asciicast2gif

    • About asciinema





    share|improve this answer





















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459209%2fhow-can-i-save-a-scrollable-terminal-window-roxterm-into-a-png-image%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote



      accepted










      You don't have to use a real screen of limited size. Create a virtual screen of the size needed to show all your output at once, then dump that screen or terminal. For example:



      $ Xvfb :1 -screen 0 100x4000x24 -noreset &
      $ xterm -geometry 10x200 -display :1 -e
      sh -c 'echo $WINDOWID >/tmp/id;ls -l /etc;sleep 99' &
      $ DISPLAY=:1 convert x:$(cat /tmp/id) /tmp/out.png
      $ identify /tmp/out.png
      /tmp/out.png PNG 79x2604 ...


      This creates a 100 by 4000 pixel screen, with an xterm 200 lines high.
      The WINDOWID variable is exported by xterm, and can be given to ImageMagick's convert program to copy the image to a png file. The identify command shows that the whole xterm contents were captured, which would not be the case on my real screen of only 1080 pixels.






      share|improve this answer



























        up vote
        1
        down vote



        accepted










        You don't have to use a real screen of limited size. Create a virtual screen of the size needed to show all your output at once, then dump that screen or terminal. For example:



        $ Xvfb :1 -screen 0 100x4000x24 -noreset &
        $ xterm -geometry 10x200 -display :1 -e
        sh -c 'echo $WINDOWID >/tmp/id;ls -l /etc;sleep 99' &
        $ DISPLAY=:1 convert x:$(cat /tmp/id) /tmp/out.png
        $ identify /tmp/out.png
        /tmp/out.png PNG 79x2604 ...


        This creates a 100 by 4000 pixel screen, with an xterm 200 lines high.
        The WINDOWID variable is exported by xterm, and can be given to ImageMagick's convert program to copy the image to a png file. The identify command shows that the whole xterm contents were captured, which would not be the case on my real screen of only 1080 pixels.






        share|improve this answer

























          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You don't have to use a real screen of limited size. Create a virtual screen of the size needed to show all your output at once, then dump that screen or terminal. For example:



          $ Xvfb :1 -screen 0 100x4000x24 -noreset &
          $ xterm -geometry 10x200 -display :1 -e
          sh -c 'echo $WINDOWID >/tmp/id;ls -l /etc;sleep 99' &
          $ DISPLAY=:1 convert x:$(cat /tmp/id) /tmp/out.png
          $ identify /tmp/out.png
          /tmp/out.png PNG 79x2604 ...


          This creates a 100 by 4000 pixel screen, with an xterm 200 lines high.
          The WINDOWID variable is exported by xterm, and can be given to ImageMagick's convert program to copy the image to a png file. The identify command shows that the whole xterm contents were captured, which would not be the case on my real screen of only 1080 pixels.






          share|improve this answer















          You don't have to use a real screen of limited size. Create a virtual screen of the size needed to show all your output at once, then dump that screen or terminal. For example:



          $ Xvfb :1 -screen 0 100x4000x24 -noreset &
          $ xterm -geometry 10x200 -display :1 -e
          sh -c 'echo $WINDOWID >/tmp/id;ls -l /etc;sleep 99' &
          $ DISPLAY=:1 convert x:$(cat /tmp/id) /tmp/out.png
          $ identify /tmp/out.png
          /tmp/out.png PNG 79x2604 ...


          This creates a 100 by 4000 pixel screen, with an xterm 200 lines high.
          The WINDOWID variable is exported by xterm, and can be given to ImageMagick's convert program to copy the image to a png file. The identify command shows that the whole xterm contents were captured, which would not be the case on my real screen of only 1080 pixels.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Jul 30 at 8:09


























          answered Jul 30 at 8:04









          meuh

          29k11648




          29k11648






















              up vote
              1
              down vote













              I've been using asciienma.org (previously ascii.io) to create recorded sessions for tutorials that I need to embed/share of actions in a terminal. The recordings can be saved and downloaded into a .cast format which you can then convert to a .gif format.



              To convert the .cast files to .gif I use this project - asciicast2gif. The results speak for themselves:



              ss1



              References



              • asciicast file format (version 2)

              • asciinema/asciicast2gif

              • About asciinema





              share|improve this answer

























                up vote
                1
                down vote













                I've been using asciienma.org (previously ascii.io) to create recorded sessions for tutorials that I need to embed/share of actions in a terminal. The recordings can be saved and downloaded into a .cast format which you can then convert to a .gif format.



                To convert the .cast files to .gif I use this project - asciicast2gif. The results speak for themselves:



                ss1



                References



                • asciicast file format (version 2)

                • asciinema/asciicast2gif

                • About asciinema





                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  I've been using asciienma.org (previously ascii.io) to create recorded sessions for tutorials that I need to embed/share of actions in a terminal. The recordings can be saved and downloaded into a .cast format which you can then convert to a .gif format.



                  To convert the .cast files to .gif I use this project - asciicast2gif. The results speak for themselves:



                  ss1



                  References



                  • asciicast file format (version 2)

                  • asciinema/asciicast2gif

                  • About asciinema





                  share|improve this answer













                  I've been using asciienma.org (previously ascii.io) to create recorded sessions for tutorials that I need to embed/share of actions in a terminal. The recordings can be saved and downloaded into a .cast format which you can then convert to a .gif format.



                  To convert the .cast files to .gif I use this project - asciicast2gif. The results speak for themselves:



                  ss1



                  References



                  • asciicast file format (version 2)

                  • asciinema/asciicast2gif

                  • About asciinema






                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered Jul 29 at 22:08









                  slm♦

                  232k65479649




                  232k65479649






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459209%2fhow-can-i-save-a-scrollable-terminal-window-roxterm-into-a-png-image%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)