# email a console screenshot



## vince66 (Aug 3, 2018)

Hello guys,

I use FreeBSD 11.1 in console mode (no GUI).

Can you help me to understand if it's possible select some lines of the desktop (screnshot), store them in a file and email it ? 

Thanks in advance.


----------



## chrbr (Aug 4, 2018)

Please have a look at script(1). It can record the lines on the screen after you have started it. May be it suits your needs.


----------



## rufwoof (Aug 4, 2018)

Can you run tmux in console? If so I'd recommend that as it opens up scrolling (and cutting/pasting across multiple screens of text), multiple windows etc. I have a script in my ~ folder containing ...


```
#!/bin/sh
tmux capture-pane -J -p -t $TMUX_PANE >/tmp/file.txt
vi /tmp/file.txt
```

which captures the text on the current tmux window and opens that in vi (OpenBSD, but it may be similar for FreeBSD?)


----------



## scottro (Aug 4, 2018)

One can run tmux in console, it doesn't require X.


----------



## Lamia (Aug 7, 2018)

rufwoof said:


> #!/bin/sh
> tmux capture-pane -J -p -t $TMUX_PANE >/tmp/file.txt
> vi /tmp/file.txt


You ind shedding more light on this? I can't get tmux to autostart on boot. I have used "tmuxonboot alias doas tmux new-session -s host" in ~/.cshrc and set up tmux_enable=YES in the /etc/rc.conf with a customscript in thr rc.d dir but no luck.

The error is often that there is no terminal to create a session in or sort of. I also tried "/bin/sh -c 'tmux.......' in the rc.d script but no luck.

Any suggestions?


----------

