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

Clash 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?
terminal output screenshot png
add a comment |Â
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?
terminal output screenshot png
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 bycat file).
â sudodus
Jul 29 at 18:26
add a comment |Â
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?
terminal output screenshot png
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?
terminal output screenshot png
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 bycat file).
â sudodus
Jul 29 at 18:26
add a comment |Â
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 bycat 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
add a comment |Â
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.
add a comment |Â
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:

References
- asciicast file format (version 2)
- asciinema/asciicast2gif
- About asciinema
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
edited Jul 30 at 8:09
answered Jul 30 at 8:04
meuh
29k11648
29k11648
add a comment |Â
add a comment |Â
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:

References
- asciicast file format (version 2)
- asciinema/asciicast2gif
- About asciinema
add a comment |Â
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:

References
- asciicast file format (version 2)
- asciinema/asciicast2gif
- About asciinema
add a comment |Â
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:

References
- asciicast file format (version 2)
- asciinema/asciicast2gif
- About asciinema
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:

References
- asciicast file format (version 2)
- asciinema/asciicast2gif
- About asciinema
answered Jul 29 at 22:08
slmâ¦
232k65479649
232k65479649
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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