Coder Social home page Coder Social logo

sassman / t-rec-rs Goto Github PK

View Code? Open in Web Editor NEW
948.0 7.0 33.0 7.16 MB

Blazingly fast terminal recorder that generates animated gif images for the web written in rust

Home Page: https://crates.io/crates/t-rec

License: GNU General Public License v3.0

Rust 93.28% Ruby 3.22% C 3.25% Makefile 0.26%
rust gif-creator terminal-recording recorder screenshot-utility screenshot-generator screen-recording screen-recorder command-line-tool fast

t-rec-rs's Introduction

t-rec: Terminal Recorder

License: GPL v3 crates.io dependency status Build Status LOC

Blazingly fast terminal recorder that generates animated gif images for the web written in rust.

Demo

demo

Features

  • Screenshotting your terminal with 4 frames per second (every 250ms)
  • Generates high quality small sized animated gif images or mp4 videos
  • Build-In idle frames detection and optimization (for super fluid presentations)
  • Applies (can be disabled) border decor effects like drop shadow
  • Runs on MacOS, Linux and NetBSD
  • Uses native efficient APIs
  • Runs without any cloud service and entirely offline
  • No issues with terminal sizes larger than 80x24
  • No issues with fonts or colors
  • No issues with curses based programs
  • No issues with escape sequences
  • No record and replay - just one simple command to rule them all
  • Can record every arbitrary window you want (e.g. browser, ide)
  • Written in Rust ๐Ÿฆ€

Installation on MacOS

with homebrew

brew install t-rec

with macports

sudo port selfupdate
sudo port install t-rec

with cargo

NOTE t-rec depends on imagemagick.

brew install imagemagick
cargo install -f t-rec 

NOTE -f just makes sure the latest version is installed

Installation on Linux

as .deb

sudo apt-get install imagemagick
wget https://github.com/sassman/t-rec-rs/releases/download/v0.5.0/t-rec_0.5.0_amd64.deb
sudo dpkg -i t-rec_0.5.0_amd64.deb

as snap

Get it from the Snap Store

TL;DR:

sudo snap install t-rec --classic
/snap/bin/t-rec --version
t-rec 0.4.3

from AUR

t-rec can be installed from available AUR packages using an AUR helper. For example,

paru -S t-rec

If you prefer, you can clone the AUR packages and then compile them with makepkg. For example,

git clone https://aur.archlinux.org/t-rec.git
cd t-rec
makepkg -si

Installation on NetBSD

pkgin install t-rec

Or, if you prefer to build from source,

cd /usr/pkgsrc/multimedia/t-rec
make install

with cargo

sudo apt-get install libx11-dev imagemagick
cargo install -f t-rec
tested on those distros
ubuntu 20.10 on GNOME
demo-ubuntu
ubuntu 20.10 on i3wm
demo-ubuntu-i3wm
linux mint 20 on cinnamon
demo-mint
ArcoLinux 5.4 on Xfwm4
demo-arco

Usage

t-rec

or with specifying a different program to launch

t-rec /bin/sh

Full Options

t-rec 0.7.0
Sven Assmann <[email protected]>
Blazingly fast terminal recorder that generates animated gif images for the web written in rust.

USAGE:
    t-rec [OPTIONS] [shell or program to launch]

ARGS:
    <shell or program to launch>    If you want to start a different program than $SHELL you can
                                    pass it here. For example '/bin/sh'

OPTIONS:
    -b, --bg <bg>                     Background color when decors are used [default: transparent]
                                      [possible values: white, black, transparent]
    -d, --decor <decor>               Decorates the animation with certain, mostly border effects
                                      [default: none] [possible values: shadow, none]
    -e, --end-pause <s | ms | m>      to specify the pause time at the end of the animation, that
                                      time the gif will show the last frame
    -h, --help                        Print help information
    -l, --ls-win                      If you want to see a list of windows available for recording
                                      by their id, you can set env var 'WINDOWID' or `--win-id` to
                                      record this specific window only
    -m, --video                       Generates additionally to the gif a mp4 video of the recording
    -M, --video-only                  Generates only a mp4 video and not gif
    -n, --natural                     If you want a very natural typing experience and disable the
                                      idle detection and sampling optimization
    -q, --quiet                       Quiet mode, suppresses the banner: 'Press Ctrl+D to end
                                      recording'
    -s, --start-pause <s | ms | m>    to specify the pause time at the start of the animation, that
                                      time the gif will show the first frame
    -v, --verbose                     Enable verbose insights for the curious
    -V, --version                     Print version information
    -w, --win-id <win-id>             Window Id (see --ls-win) that should be captured, instead of
                                      the current terminal

Disable idle detection & optimization

If you are not happy with the idle detection and optimization, you can disable it with the -n or --natural parameter. By doing so, you would get the very natural timeline of typing and recording as you do it. In this case there will be no optimizations performed.

Enable shadow border decor

In order to enable the drop shadow border decor you have to pass -d shadow as an argument. If you only want to change the color of the background you can use -b black for example to have a black background.

Record Arbitrary windows

You can record not only the terminal but also every other window. There 3 ways to do so:

  1. use -w | --win-id argument to name the Window Id that should be recorded
t-rec --ls-win | grep -i calc
Calculator | 45007

t-rec -w 45007 
  1. use the env var TERM_PROGRAM like this:
  • for example lets record a window 'Google Chrome'
  • make sure chrome is running and visible on screen
TERM_PROGRAM="google chrome" t-rec

Frame cache dir: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-74728.rUxBx3ohGiQ2"
Recording window: "Google Chrome 2"
Press Ctrl+D to end recording

this is how it looks then: demo-chrome

  1. use the env var WINDOWID like this:
  • for example let's record a VSCode window
  • figure out the window id program, and make it
  • make sure the window is visible on screen
  • set the variable and run t-rec
t-rec --ls-win | grep -i code
Code | 27600

# set the WINDOWID variable and run t-rec
WINDOWID=27600 t-rec

Frame cache dir: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-77862.BMYiHNRWqv9Y"
Press Ctrl+D to end recording

this is how it looks then: demo-vscode

Contribute

To contribute to t-rec you can either checkout existing issues labeled with good first issue or open a new issue and describe your problem. Also every PR is welcome. Support for Linux and Windows needs to be done.

On the web & social media

License

t-rec-rs's People

Contributors

0323pin avatar byron avatar daviey avatar dependabot-preview[bot] avatar dependabot[bot] avatar herbygillot avatar kuy avatar orhun avatar popey avatar rijusougata13 avatar sassman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

t-rec-rs's Issues

[FEAT] change `--bg` default to transparent

Is your feature request related to a problem? Please describe.

Lot of sides where gif are embedded support meanwhile dark mode, so I would say it makes more sense to default the bg color to transparent. So that the white border is replaced by a transparent border.

[FEAT] windows support

Implement window grabbing and screenshotting capabilities for windows.
The interface that needs to be implemented is very simple and straight forward:

pub fn get_window_id_for(_terminal: String) -> Option<u32> {
   // returns the window id / handle for a given name 
}

pub fn ls_win() {
  // prints out window name and id
}

pub fn capture_window_screenshot(_win_id: u32) -> anyhow::Result<ImageOnHeap> {
  // captures the screenshot for a given window id / handle and returns a result of a Box<FlatSamples> image
}

Additionally, some inspiration on the windows APIs in rust can be drawn from here

[FEAT] avoid overwriting existing final gif

Given there is a file called t-rec.gif in $CWD
When generating a gif after a recording
Then the existing file is not overwritten
And a new file with a suffix _1 like t-rec_1.gif is added to the new gif

[Bug] segmentation fault on listing the windows `t-rec -l`

Describe the bug
Whenever I run t-rec, it causes segmentation fault error. t-rec /bin/sh results same.

To Reproduce
Steps to reproduce the behavior:

  1. Run t-rec.

Expected behavior
It doesn't cause segmentation fault, and run correctly.

Screenshots
ss

  • Interestingly, as you see it leads error zsh: error on TTY read: Input/output error if you specified zsh, bash. However, sh won't lead this error.

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 10.15.7
  • Zsh: zsh 5.8 (x86_64-apple-darwin19.3.0)
  • sh: version 3.2.57(1)-release (x86_64-apple-darwin19)
  • bash: version 3.2.57(1)-release (x86_64-apple-darwin19)

Additional context

command line parameter to limit the final resolution

in order to change the final gif / video resolution (sometimes full retina is a bit overdone) 2 optional parameters should be introduced:

  1. a --max-height | h
  2. a --max-width | w
  3. both should act as upper limits and not be taken precise
  4. the aspect ratio of the original format should be kept (pretty much like convert -resize Wx for example works

suggested by

@Hoverbear

Handle invalid window id more robust

Describe the bug
When using t-rec with an invalid window id like WINDOWID=2417444 t-rec then no error is shown until you end the recording with CTRL+D. Only then an error like this is shown:

Error: Cannot stop the recording thread

Caused by:
    sending on a closed channel

Expected behavior
an error with more details should be shown immediately on start.

alacritty terminal is not recognised by default

Describe the bug
When recording in alacritty, when started out of a iterm2 terminal, it is not recording the alacritty but iterm2

To Reproduce
Steps to reproduce the behavior:

  1. open alacritty from an iterm2 terminal
  2. start t-rec in alacritty terminal
  3. end recording
  4. see that actually the iterm2 teminal got recorded

Expected behavior
Well, the terminal that t-rec was started was alacritty, so this should have been recorded.

Screenshots

Version Numbers of your System:

  • OS: MacOS
  • Version: all
  • Terminal: Alacitty

Additional context
the workaround would be TERM_PROGRAM=alacritty t-rec

t-rec does not clean up recording frames when being killed

Was a while ago I used t-rec but somehow I manage to get into some shenanigans. Starting it by

t-rec

and it looked like usual. After a short while it looks like it's stopping but no message for generating gif/video. After a some hour my disk got full :D. Did a small reproduction video for better understanding. Not sure if I need to update something but either way the process shouldn't run out of control.

t-rec-bug.mp4

Terminals with opacity causes tiny, not fitting recordings

Describe the bug
The output produced with t-rec is a very small portion of the window on xmonad.

Using t-rec -l gives me a 10x10 for each window open in the workspace.

Window | Id
 (10x10) | 4194662

To Reproduce
Steps to reproduce the behavior:

  1. Install xmonad.
  2. Install t-rec.
  3. Open a terminal and run t-rec
  4. Watch the output

Expected behavior
The whole window, with borders.

Screenshots
t-rec

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Another tiling window manager (leftwm) and another terminal (xcfe4-terminal) produced the same behavior.

System details
OS: ArcoLinux
Kernel: 5.9.14-arch1-1
DE: xmonad
Terminal: alacritty
CPU: Intel i7-8750H (12) @ 2.200GHz
GPU: NVIDIA GeForce GTX 1050 Mobile
Xserver: 1.20.10-3

CI Pipeline breaks on building the binary

    Finished release [optimized] target(s) in 1m 45s
78
error: /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: unrecognized option: --strip-unneeded
79
Usage: /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...] 
80
cargo-deb: Command strip failed to launch
81
  because: exit code: 1
82
Error: Process completed with exit code 1.

see the failing step

Active Window cannot be identified on xmonad and panics

Describe the bug
t-rec fails to run caused by invalid active window id

To Reproduce
Steps to reproduce the behavior:

  1. run t-rec
  2. see the error message

Expected behavior
It should identify the active window correctly else at least not panic

Screenshots
image

Version Numbers of your System:

  • OS: Linux Mint
  • Version: 20
  • WindowManager: xmonad v0.15
  • Terminal: gnome-terminal

Additional context

wmctrl -l
Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

On Linux please include the output of xwininfo -root -tree -int:
image

MacOS T-Rec producing empty gif

Describe the bug
Every time I call t-rec, whether it be in iTerm2, Terminal, or WezTerm, the produced gif is always blank.

To Reproduce
Steps to reproduce the behavior:

  1. I installed it both via cargo and via brew, both lead to the same options
  2. I went to any folder and ran t-rec
  3. I entered some commands, and exited with CTRL-D
  4. I opened the gif and it was a blank white rectangle.

Expected behavior
I expect the gif to be populated w/ my terminal recording.

Screenshots
This is the output from t-rec.
t-rec

Your MacOS Version

  • 11 Big Sur
  • 10.15 Catalina
  • 10.14 Mojave
  • 10.13 High Sierra
  • 10.12 Sierra
  • Older than 10.12

Your Architecture

  • x86 / Intel
  • arm / Apple Silicon

Your Terminal

  • iTerm
  • Alacitty
  • Apple Terminal
  • Other: Wezterm

Additional context

  • I'm running zsh with a couple custom plugins, if they would have any impact

Panics on alacritty / tmux / fish

Describe the bug
Program panics on launch.

To Reproduce
Steps to reproduce the behavior:

  1. Install using brew
  2. Run t-rec

Expected behavior
Some help or overview, rather it panics with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Env variable 'WINDOWID' was not set.

Caused by:
    environment variable not found', src/macos/mod.rs:51:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version Numbers of your System:

  • OS: MacOS
  • Version: 10.15.7
  • Terminal: Alacritty
  • Shell: Fish and tmux

Additional context
My overall setup is available via https://mhausenblas.medium.com/my-taf-setup-faa6bd0f1076

[FEAT] decor for drop shadow

Is your feature request related to a problem? Please describe.
The final gif animation should look a bit more nice, specifically I like a drop shadow effect looks.

Describe the solution you'd like
a feature toggle allows enabling and disabling a shadow effect, that will be applied on the final rendered gif.

Cannot retrieve the window id of the to be recorded window - on Windows with WSL

Describe the bug
t-rec

Error: Cannot retrieve the window id of the to be recorded window.

Caused by:
    Display parsing error

To Reproduce
Steps to reproduce the behavior:
a. install dependencies
sudo apt-get install libx11-dev

(based on https://gist.github.com/pshah123/963db645047597723956af13ab87b73a)

wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-*
./configure
make
sudo make install
sudo ldconfig /usr/local/lib

(ImageMagick 7.0.10-53 Q16 x86_64 2020-12-31)

b. install t-rec
cargo install -f t-rec

Version Numbers of your System:

  • Microsoft Windows [Version 10.0.18363.1198]
  • WSL version 1
  • Ubuntu 18.04 TLS

Additional context
xwininfo -root -tree -int

xwininfo: error: unable to parse display name ""

[FEAT] cli flag for generating a video

As a User
I want to be able to get a video additionally to my gif
So that I can decide which one I want to use

Describe the solution you'd like
a --video cli flag to enable the video option

Additional context
I want to be able to use the videos in tweets, that is why I suggest MP4 (H.264)

On the web, Twitter supports MP4 ๏ผˆH.264/AAC๏ผ‰format. On mobile app, the supported Twitter video formats are MP4 and MOV.

Update: one thing that is for now out of scope here is a different frame rate setting. To be clear I want the same frame rate as used for the gif (so the default behaviour) applied.

Ubuntu installation process assumes that main and universe are enabled

Describe the bug
The README recommends the user runs:

sudo apt install imagemagick

but this fails on a clean Ubuntu installation because the main and universe repositories are not enabled:

E: Package 'imagemagick' has no installation candidates

To Reproduce
Steps to reproduce the behavior:

  1. Download Ubuntu 22.04.3 LTS live image ISO
  2. Create a clean VM and run the live image
  3. Follow the t-rec installation steps from the README

image

Expected behavior
Installation should be completed without error.

Version Numbers of your System:
just run: inxi -SGxx and paste it below:

System:
  Host: ubuntu Kernel: 6.2.0-26-generic x86_64 bits: 64 compiler: N/A
    Desktop: GNOME 42.9 tk: GTK 3.24.33 wm: gnome-shell dm: GDM3
    Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Graphics:
  Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.20.0.0 ports:
    active: Virtual-1 empty: Virtual-2, Virtual-3, Virtual-4, Virtual-5,
    Virtual-6, Virtual-7, Virtual-8
    bus-ID: 00:0f.0 chip-ID: 15ad:0405
  Display: x11 server: X.Org v: 1.21.1.4 compositor: gnome-shell driver: X:
    loaded: vmware unloaded: fbdev,modesetting,vesa gpu: vmwgfx display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1918x1085 s-dpi: 96
  Monitor-1: Virtual1 mapped: Virtual-1 res: 1918x1085 size: N/A
  OpenGL: renderer: llvmpipe (LLVM 15.0.7 256 bits)
    v: 4.5 Mesa 23.0.4-0ubuntu1~22.04.1 direct render: Yes

Output of lsb_release -a:

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

Additional context
Add any other context about the problem here.

Please include the output of xwininfo -root -tree -int


xwininfo: Window id: 1336 (the root window) (has no name)

  Root window id: 1336 (the root window) (has no name)
  Parent window id: 0 (none)
     35 children:
     23068673 "update-notifier": ("update-notifier" "Update-notifier")  10x10+10+10  +10+10
     4194314 "gnome-shell": ("gnome-shell" "Gnome-shell")  1x1+-200+-200  +-200+-200
        1 child:
        4194315 (has no name): ()  1x1+-1+-1  +-201+-201
     39845898 "ubuntu@ubuntu: ~": ("gnome-terminal-server" "Gnome-terminal")  1848x1058+70+27  +70+27
        1 child:
        39845899 (has no name): ()  1x1+-1+-1  +69+26
     39845894 (has no name): ()  1x1+-1+-1  +-1+-1
     48234497 "Calendar": ("gnome-calendar" "Gnome-calendar")  10x10+10+10  +10+10
     39845890 "Terminal": ()  10x10+-100+-100  +-100+-100
     44040193 "seahorse": ("seahorse" "Seahorse")  10x10+10+10  +10+10
     39845889 "Terminal": ("gnome-terminal-server" "Gnome-terminal-server")  10x10+10+10  +10+10
     33554440 (has no name): ()  1x1+-1+-1  +-1+-1
     33554435 "@!0,0;BDHF": ("gjs" "Gjs")  1918x1085+0+0  +0+0
        1 child:
        33554436 (has no name): ()  1x1+-1+-1  +-1+-1
     33554433 "gjs": ("gjs" "Gjs")  10x10+10+10  +10+10
     31457281 "snapd-desktop-integration": ("snapd-desktop-integration" "Snapd-desktop-integration")  10x10+10+10  +10+10
     4194330 (has no name): ()  1x1+-1+-1  +-1+-1
     29360130 (has no name): ("" "")  1x1+-100+-100  +-100+-100
        1 child:
        29360131 (has no name): ()  1x1+-1+-1  +-101+-101
     27262979 "ibus-xim": ()  1x1+0+0  +0+0
        1 child:
        27262980 (has no name): ()  1x1+-1+-1  +-1+-1
     27262977 "ibus-x11": ("ibus-x11" "Ibus-x11")  10x10+10+10  +10+10
     25165825 "evolution-alarm-notify": ("evolution-alarm-notify" "Evolution-alarm-notify")  10x10+10+10  +10+10
     16777218 (has no name): ()  10x10+0+0  +0+0
     20971521 "ibus-extension-gtk3": ("ibus-extension-gtk3" "Ibus-extension-gtk3")  10x10+10+10  +10+10
     18874369 "gsd-color": ("gsd-color" "Gsd-color")  10x10+10+10  +10+10
     14680065 "gsd-wacom": ("gsd-wacom" "Gsd-wacom")  10x10+10+10  +10+10
     16777217 "gsd-xsettings": ("gsd-xsettings" "Gsd-xsettings")  10x10+10+10  +10+10
     12582913 "gsd-power": ("gsd-power" "Gsd-power")  10x10+10+10  +10+10
     10485761 "gsd-media-keys": ("gsd-media-keys" "Gsd-media-keys")  10x10+10+10  +10+10
     8388609 "gsd-keyboard": ("gsd-keyboard" "Gsd-keyboard")  10x10+10+10  +10+10
     4194323 "gnome-shell": ()  10x10+-100+-100  +-100+-100
     4194321 (has no name): ()  1x1+-100+-100  +-100+-100
     4194319 (has no name): ()  1x1+-100+-100  +-100+-100
     4194318 (has no name): ()  1x1+-1+-1  +-1+-1
     4194312 (has no name): ()  1x1+-100+-100  +-100+-100
     4194311 (has no name): ()  1x1+-100+-100  +-100+-100
     4194310 "GNOME Shell": ()  1x1+-100+-100  +-100+-100
     4194305 "gnome-shell": ("gnome-shell" "Gnome-shell")  10x10+10+10  +10+10
     2097160 (has no name): ()  1x1+-100+-100  +-100+-100
     4194320 "mutter guard window": ()  1918x1085+0+0  +0+0

[BUG] Round white corners

Describe the bug
On macOS big sur the window corner border radius has increased, and so the issue became even more visible:

image

To Reproduce
every recording has this issue

Expected behavior
The round corners should not be white, they should be transparent

Screenshots
see above

Desktop (please complete the following information):

  • OS: macOS all
  • Version all

command line parameter to control pre/post pause

context

  • sometimes at the end of a gif there needs to be a pause, in order to calm down, and not get a crazy fast spinning back dizziness.
  • Also on the other hand before things get to the point too fast, it can be beneficial to have a little grace time where the user would see the first frame for seconds before the animation / video would start.

proposal

  1. a --end-pause | -e to specify the post / end pause time, that is the time in seconds that the gif / video will show the last frame.
  2. a --start-pause | -s to specify the pre / start pause time, that is the time in seconds that the first frame will be shown

suggested by

@Hoverbear on twitter

command line parameter for video only

Is your feature request related to a problem? Please describe.
Right now the parameter -m | --video would produce a gif and a mp4 file, while omitted only a gif would be produced.

it would be cool to have a --only-video flag that would make the video as -m but skip the gif.

Mentioned by @Hoverbear on twitter

[FEAT] idle detection and smooth typing optimization

Use Case 1

Given a demonstration that takes longer
When there is an idle waiting time (like an installer doing nothing)
Then I want not to demonstrate same frames for long

Use Case 2

Given a demonstration
When I'm not super fluent in typing or have waiting times
Then the final gif should not contain those idle frames

System freezes on "Applying Effects" caused by too many threads

Describe the bug
System gets unresponsive when too many frames are there to be processed for the effects

To Reproduce
Steps to reproduce the behavior:

  1. t-rec on a big terminal for example
  2. End Recording
  3. Observe the threads count when "Applying Effects" hits
  4. System gets unresponsive for a while

Expected behavior
System should stay responsive all the time

Version Numbers of your System:

  • OS: any

dedicating an own cli argument for external window recording

Right now the environment variable WINDOWID can be set and t-rec would record this window content instead of the actual terminal.

To promote that feature to the user, it would be good to have a command line argument to specify the window id or the window name (retrieved by t-rec --ls-win).

Something like --win-id or --win-name.
That argument should overrule the environment variable.

For some WM on linux the window decoration is not captured

Describe the bug
On Cinnamon / Linux Mint the window decorations (border buttotns) are not captured.
And when using the parent window id, it captures the border plus some strange pixels (see screenshot).

To Reproduce
Steps to reproduce the behavior:

  1. run r-rec
  2. or run WINDOWID=<parent window id> t-rec

Expected behavior
The default behaviour should be to capture the window decorations as on Gnome / Ubuntu for example.

Screenshots
this shows the behaviour with using the parent window id:
t-rec_7

Desktop (please complete the following information):

  • OS: Linux Mint
  • Version 20

Linux - no gif output

Describe the bug
Created gif file is broken. Mp4 works.

To Reproduce
Steps to reproduce the behavior:

  1. install as .deb on Ubuntu 20.04.2 LTS, 64-bit
  2. test t-rec in terminal
  3. wait for output creation
  4. resulting gif is 10 bytes in size and cannot be opened

Expected behavior
Expected to receive a gif file.

Screenshots
If applicable, add screenshots to help explain your problem.

Version Numbers of your System:

System:    Host: ml-X270 Kernel: 5.4.0-65-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: Gnome 3.36.4 wm: gnome-shell dm: GDM3 Distro: Ubuntu 20.04.2 LTS (Focal Fossa) 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:5916 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           compositor: gnome-shell tty: N/A 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 
           direct render: Yes 

Additional context
a) Running t-rec with dedicated win number to record other window (firefox, settings) t-rec stops without message.

b) Retry with less frames resulted in gif output, that has some kind of a funny frame around:

t-rec_1

Requested xwininfo
Please include the output of xwininfo -root -tree -int

xwininfo: Window id: 1958 (the root window) (has no name)

  Root window id: 1958 (the root window) (has no name)
  Parent window id: 0 (none)
     86 children:
     54621149 "org.gnome.Nautilus": ("org.gnome.Nautilus" "Org.gnome.Nautilus")  1x1+-99+-99  +-99+-99
        1 child:
        54621150 (has no name): ()  1x1+-1+-1  +-100+-100
     54621123 "org.gnome.Nautilus": ("org.gnome.Nautilus" "Org.gnome.Nautilus")  1x1+-99+-99  +-99+-99
        1 child:
        54621124 (has no name): ()  1x1+-1+-1  +-100+-100
     37748907 "Firefox": ("firefox" "Firefox")  1x1+-99+-99  +-99+-99
        1 child:
        37748908 (has no name): ()  1x1+-1+-1  +-100+-100
     6291467 "gnome-shell": ("gnome-shell" "Gnome-shell")  1x1+-200+-200  +-200+-200
        1 child:
        6291468 (has no name): ()  1x1+-1+-1  +-201+-201
     14680074 "ml@ml-X270: ~": ("gnome-terminal-server" "Gnome-terminal")  985x1105+28+4  +28+4
        1 child:
        14680075 (has no name): ()  1x1+-1+-1  +27+3
     6291752 (has no name): ()  1868x1055+53+26  +53+26
        1 child:
        37748739 "New Issue ยท sassman/t-rec-rs โ€” Mozilla Firefox": ("Navigator" "Firefox")  1866x1053+1+1  +54+27
           1 child:
           37748740 (has no name): ()  1x1+-1+-1  +53+26
     85983253 "Settings": ("gnome-control-center" "Gnome-control-center")  1032x869+471+119  +471+119
        1 child:
        85983254 (has no name): ()  1x1+-1+-1  +470+118
     54525959 "t-rec": ("org.gnome.Nautilus" "Org.gnome.Nautilus")  985x1105+78+4  +78+4
        1 child:
        54525960 (has no name): ()  1x1+-1+-1  +77+3
     85983249 (has no name): ()  1x1+-1+-1  +-1+-1
     85983243 (has no name): ()  1x1+-100+-100  +-100+-100
     85983233 "gnome-control-center": ("gnome-control-center" "Gnome-control-center")  10x10+10+10  +10+10
     37748947 "Firefox": ("Firefox" "Firefox")  200x200+0+0  +0+0
        1 child:
        37748954 (has no name): ()  1x1+-1+-1  +-1+-1
     37748848 "sassman/t-rec-rs: Blazingly fast terminal recorder that generates animated gif images for the web written in rust": ("Firefox" "Firefox")  587x62+854+61  +854+61
        1 child:
        37748861 (has no name): ()  1x1+-1+-1  +853+60
     81788929 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     79691777 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     75497479 "System Monitor": ("gnome-system-monitor" "Gnome-system-monitor")  1866x1053+54+27  +54+27
        1 child:
        75497480 (has no name): ()  1x1+-1+-1  +53+26
     75497475 (has no name): ()  1x1+-1+-1  +-1+-1
     75497473 "System Monitor": ("gnome-system-monitor" "Gnome-system-monitor")  10x10+10+10  +10+10
     37748943 "Open a new tab (Ctrl+T)": ("Firefox" "Firefox")  187x45+1042+60  +1042+60
        1 child:
        37748944 (has no name): ()  1x1+-1+-1  +1041+59
     37748898 "Firefox": ("Firefox" "Firefox")  200x200+0+0  +0+0
        1 child:
        37748903 (has no name): ()  1x1+-1+-1  +-1+-1
     37748884 "Firefox": ("Firefox" "Firefox")  200x200+0+0  +0+0
        1 child:
        37748895 (has no name): ()  1x1+-1+-1  +-1+-1
     37748880 "Firefox": ("Firefox" "Firefox")  439x230+335+88  +335+88
        1 child:
        37748881 (has no name): ()  1x1+-1+-1  +334+87
     37748864 "Firefox": ("Firefox" "Firefox")  200x200+0+0  +0+0
        1 child:
        37748877 (has no name): ()  1x1+-1+-1  +-1+-1
     73400321 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     71303169 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     37748844 "Suche": ("Firefox" "Firefox")  68x45+493+177  +493+177
        1 child:
        37748845 (has no name): ()  1x1+-1+-1  +492+176
     69206017 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     65011713 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     54587616 "org.gnome.Nautilus": ("org.gnome.Nautilus" "Org.gnome.Nautilus")  319x201+465+288  +465+288
        1 child:
        54587617 (has no name): ()  1x1+-1+-1  +464+287
     33554444 (has no name): ()  1x1+-1+-1  +-1+-1
     52428812 (has no name): ()  1x1+-1+-1  +-1+-1
     50331660 (has no name): ()  1x1+-1+-1  +-1+-1
     14680070 (has no name): ()  1x1+-1+-1  +-1+-1
     14680066 "Terminal": ()  10x10+-100+-100  +-100+-100
     14680065 "Terminal": ("gnome-terminal-server" "Gnome-terminal-server")  10x10+10+10  +10+10
     67108865 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     62914561 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     60817409 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     56623201 (has no name): ()  80x22+54+1058  +54+1058
     10485768 (has no name): ()  1x1+0+0  +0+0
     56623200 (has no name): ()  1x1+0+0  +0+0
     56623112 "jetbrains-clion": ("jetbrains-clion" "jetbrains-clion")  1x1+1+1  +1+1
     58720272 "java": ("java" "Java")  200x214+0+0  +0+0
        1 child:
        58720273 (has no name): ()  1x1+-1+-1  +-1+-1
     58720263 "java": ("java" "Java")  200x200+0+0  +0+0
        1 child:
        58720264 (has no name): ()  1x1+-1+-1  +-1+-1
     58720259 "java": ("java" "Java")  200x200+0+0  +0+0
        1 child:
        58720260 (has no name): ()  1x1+-1+-1  +-1+-1
     58720257 "java": ("java" "Java")  10x10+10+10  +10+10
     54526386 "org.gnome.Nautilus": ()  10x10+-100+-100  +-100+-100
     54525955 (has no name): ()  1x1+-1+-1  +-1+-1
     54525953 "org.gnome.Nautilus": ("org.gnome.Nautilus" "Org.gnome.Nautilus")  10x10+10+10  +10+10
     52428801 "update-notifier": ("update-notifier" "Update-notifier")  10x10+10+10  +10+10
     35651587 (has no name): ()  1x1+-1+-1  +-1+-1
     37748824 "Firefox": ("Firefox" "Firefox")  200x200+0+0  +0+0
        1 child:
        37748825 (has no name): ()  1x1+-1+-1  +-1+-1
     50331649 "dropbox": ("dropbox" "Dropbox")  10x10+10+10  +10+10
     48234499 (has no name): ()  3x3+0+0  +0+0
     46137345 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     44040193 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     37748800 (has no name): ("Firefox" "Firefox")  100x100+0+0  +0+0
        1 child:
        37748803 (has no name): ()  1x1+-1+-1  +-1+-1
     37748755 "Firefox": ()  10x10+-100+-100  +-100+-100
     41943041 "/usr/lib/firefox/firefox": ("/usr/lib/firefox/firefox" "/usr/lib/firefox/firefox")  10x10+10+10  +10+10
     37748752 "Firefox": ()  10x10+-100+-100  +-100+-100
     37748737 "Firefox": ("firefox" "Firefox")  10x10+10+10  +10+10
     35651585 "Ubuntu Software": ("org.gnome.Software" "Org.gnome.Software")  10x10+10+10  +10+10
     33554433 "blueman-tray": ("blueman-tray" "")  10x10+10+10  +10+10
     6291479 (has no name): ()  1x1+-1+-1  +-1+-1
     31457281 "blueman-applet": ("blueman-applet" "")  10x10+10+10  +10+10
     29360129 "evolution-alarm-notify": ("evolution-alarm-notify" "Evolution-alarm-notify")  10x10+10+10  +10+10
     27262978 (has no name): ()  10x10+0+0  +0+0
     25165825 "gsd-wacom": ("gsd-wacom" "Gsd-wacom")  10x10+10+10  +10+10
     27262977 "gsd-xsettings": ("gsd-xsettings" "Gsd-xsettings")  10x10+10+10  +10+10
     23068673 "gsd-power": ("gsd-power" "Gsd-power")  10x10+10+10  +10+10
     20971521 "gsd-media-keys": ("gsd-media-keys" "Gsd-media-keys")  10x10+10+10  +10+10
     18874369 "gsd-color": ("gsd-color" "Gsd-color")  10x10+10+10  +10+10
     16777217 "gsd-keyboard": ("gsd-keyboard" "Gsd-keyboard")  10x10+10+10  +10+10
     10485763 "ibus-xim": ()  1x1+0+0  +0+0
        1 child:
        10485764 (has no name): ()  1x1+-1+-1  +-1+-1
     10485761 "ibus-x11": ("ibus-x11" "Ibus-x11")  10x10+10+10  +10+10
     8388609 "ibus-extension-gtk3": ("ibus-extension-gtk3" "Ibus-extension-gtk3")  10x10+10+10  +10+10
     6291473 (has no name): ()  1x1+-100+-100  +-100+-100
     6291471 (has no name): ()  1x1+-1+-1  +-1+-1
     6291465 (has no name): ()  1x1+-100+-100  +-100+-100
     6291464 (has no name): ()  1x1+-100+-100  +-100+-100
     6291463 (has no name): ()  1x1+-100+-100  +-100+-100
     6291462 "GNOME Shell": ()  1x1+-100+-100  +-100+-100
     6291457 "gnome-shell": ("gnome-shell" "Gnome-shell")  10x10+10+10  +10+10
     4194314 (has no name): ()  1x1+-100+-100  +-100+-100
     6291472 "mutter guard window": ()  1920x1080+0+0  +0+0
     6293542 (has no name): ()  1868x1055+53+26  +53+26
        1 child:
        56623180 "MMM_dev โ€“ square_mm_halfDT/run_all_models.sh": ("jetbrains-clion" "jetbrains-clion")  1866x1016+1+38  +54+64
           2 children:
           56623186 "FocusProxy": ("Focus-Proxy-Window" "FocusProxy")  1x1+-1+-1  +53+63
           56623183 "Content window": ("jetbrains-clion" "jetbrains-clion")  1866x1053+0+-37  +54+27

Out of memory

Describe the bug
Occasionally, during gif generation, t-rec generates out of memory error.

To Reproduce
Steps to reproduce the behavior:

  1. Start to record.
  2. Stop the record.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

wrz 13 15:08:56 ProcekStar kernel: oom_reaper: reaped process 142701 (convert), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
wrz 13 15:08:56 ProcekStar kernel: Out of memory: Killed process 142701 (convert) total-vm:25299152kB, anon-rss:24120172kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:47484kB oom_score_adj:0
wrz 13 15:08:56 ProcekStar kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/[email protected],task=convert,pid=142701,uid=1000
wrz 13 15:08:56 ProcekStar kernel: [ 142714]  1000 142714  5343870     5043   708608        4           300 chrome
wrz 13 15:08:56 ProcekStar kernel: [ 142701]  1000 142701  6324788  6030043 48623616        0             0 convert
...
wrz 13 15:08:56 ProcekStar kernel: Tasks state (memory values in pages):
wrz 13 15:08:56 ProcekStar kernel: 0 pages hwpoisoned
wrz 13 15:08:56 ProcekStar kernel: 152574 pages reserved
wrz 13 15:08:56 ProcekStar kernel: 0 pages HighMem/MovableOnly
wrz 13 15:08:56 ProcekStar kernel: 8365372 pages RAM
wrz 13 15:08:56 ProcekStar kernel: Total swap = 999420kB
wrz 13 15:08:56 ProcekStar kernel: Free swap  = 0kB
wrz 13 15:08:56 ProcekStar kernel: Swap cache stats: add 252486, delete 252258, find 11/438
wrz 13 15:08:56 ProcekStar kernel: 337 pages in swap cache
wrz 13 15:08:56 ProcekStar kernel: 80735 total pagecache pages
wrz 13 15:08:56 ProcekStar kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
wrz 13 15:08:56 ProcekStar kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
wrz 13 15:08:56 ProcekStar kernel: Node 0 Normal: 51*4kB (UMEH) 392*8kB (UEH) 1526*16kB (UEH) 910*32kB (UEH) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 56876kB
wrz 13 15:08:56 ProcekStar kernel: Node 0 DMA32: 2*4kB (UM) 4*8kB (U) 6*16kB (UM) 5*32kB (U) 4*64kB (UM) 1*128kB (U) 1*256kB (U) 2*512kB (U) 3*1024kB (UM) 1*2048kB (U) 28*4096kB (M) = 121768kB
wrz 13 15:08:56 ProcekStar kernel: Node 0 DMA: 2*4kB (U) 1*8kB (U) 0*16kB 0*32kB 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 2*4096kB (M) = 11792kB
wrz 13 15:08:56 ProcekStar kernel: lowmem_reserve[]: 0 0 0 0 0
wrz 13 15:08:56 ProcekStar kernel: Node 0 Normal free:53952kB min:61192kB low:90744kB high:120296kB reserved_highatomic:2048KB active_anon:4170976kB inactive_anon:24043040kB active_file:1876kB inactive_file:5512kB unevictable:420kB writepending:8kB present:30133760kB managed:29552884kB mlocked:420kB bounce:0kB free_pcp:18012kB local_pcp:1416kB free_cma:0kB
wrz 13 15:08:56 ProcekStar kernel: lowmem_reserve[]: 0 0 28859 28859 28859
wrz 13 15:08:56 ProcekStar kernel: Node 0 DMA32 free:121708kB min:6356kB low:9424kB high:12492kB reserved_highatomic:0KB active_anon:44kB inactive_anon:3154112kB active_file:0kB inactive_file:24kB unevictable:0kB writepending:0kB present:3311732kB managed:3282400kB mlocked:0kB bounce:0kB free_pcp:276kB local_pcp:4kB free_cma:0kB
wrz 13 15:08:56 ProcekStar kernel: lowmem_reserve[]: 0 2998 31858 31858 31858
wrz 13 15:08:56 ProcekStar kernel: Node 0 DMA free:11792kB min:32kB low:44kB high:56kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15996kB managed:15908kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
wrz 13 15:08:56 ProcekStar kernel: Node 0 active_anon:4171020kB inactive_anon:27197152kB active_file:1172kB inactive_file:6068kB unevictable:420kB isolated(anon):0kB isolated(file):512kB mapped:498932kB dirty:0kB writeback:8kB shmem:312328kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB kernel_stack:39568kB pagetables:179108kB all_unreclaimable? no
wrz 13 15:08:56 ProcekStar kernel: active_anon:1042755 inactive_anon:6799288 isolated_anon:0
                                    active_file:293 inactive_file:1517 isolated_file:128
                                    unevictable:105 dirty:0 writeback:2
                                    slab_reclaimable:36150 slab_unreclaimable:92415
                                    mapped:124733 shmem:78082 pagetables:44777 bounce:0
                                    free:46863 free_pcp:4563 free_cma:0
wrz 13 15:08:56 ProcekStar kernel: Mem-Info:
wrz 13 15:08:56 ProcekStar kernel: R13: 000055fc2f348279 R14: 00007ffc0a970ef0 R15: 0000000000000031
wrz 13 15:08:56 ProcekStar kernel: R10: 00007f44b0219ac0 R11: 0000000000000000 R12: 0000000000000050
wrz 13 15:08:56 ProcekStar kernel: RBP: 00007ffc0a970ec0 R08: 000000000000000f R09: 0000000000000000
wrz 13 15:08:56 ProcekStar kernel: RDX: fffffffffffffe80 RSI: 0000000000000031 RDI: 00007ffc0a970ef0
wrz 13 15:08:56 ProcekStar kernel: RAX: 0000000000000031 RBX: 000000000000000e RCX: 00007f44b022b6f4
wrz 13 15:08:56 ProcekStar kernel: RSP: 002b:00007ffc0a9707b0 EFLAGS: 00010293
wrz 13 15:08:56 ProcekStar kernel: Code: Unable to access opcode bytes at RIP 0x7f44b00e2164.
wrz 13 15:08:56 ProcekStar kernel: RIP: 0033:0x7f44b00e218e
wrz 13 15:08:56 ProcekStar kernel:  asm_exc_page_fault+0x1e/0x30
wrz 13 15:08:56 ProcekStar kernel:  ? asm_exc_page_fault+0x8/0x30
wrz 13 15:08:56 ProcekStar kernel:  exc_page_fault+0x69/0x150
wrz 13 15:08:56 ProcekStar kernel:  do_user_addr_fault+0x1a0/0x450
wrz 13 15:08:56 ProcekStar kernel:  handle_mm_fault+0xd7/0x2b0
wrz 13 15:08:56 ProcekStar kernel:  __handle_mm_fault+0x662/0x910
wrz 13 15:08:56 ProcekStar kernel:  do_fault+0x276/0x4f0
wrz 13 15:08:56 ProcekStar kernel:  __do_fault+0x3c/0xe0
wrz 13 15:08:56 ProcekStar kernel:  ext4_filemap_fault+0x32/0x50
wrz 13 15:08:56 ProcekStar kernel:  ? filemap_map_pages+0x218/0x3f0
wrz 13 15:08:56 ProcekStar kernel:  ? page_add_file_rmap+0x122/0x160
wrz 13 15:08:56 ProcekStar kernel:  ? unlock_page_memcg+0x24/0x30
wrz 13 15:08:56 ProcekStar kernel:  ? __unlock_page_memcg+0x25/0x60
wrz 13 15:08:56 ProcekStar kernel:  ? __mod_lruvec_state+0x3a/0x50
wrz 13 15:08:56 ProcekStar kernel:  filemap_fault+0x9f3/0xfc0
wrz 13 15:08:56 ProcekStar kernel:  pagecache_get_page+0xf1/0x350
wrz 13 15:08:56 ProcekStar kernel:  __page_cache_alloc+0x89/0xb0
wrz 13 15:08:56 ProcekStar kernel:  alloc_pages_current+0x87/0xe0
wrz 13 15:08:56 ProcekStar kernel:  __alloc_pages_nodemask+0x2a0/0x300
wrz 13 15:08:56 ProcekStar kernel:  __alloc_pages_slowpath.constprop.0+0xc4d/0xd20
wrz 13 15:08:56 ProcekStar kernel:  out_of_memory+0x6d/0xd0
wrz 13 15:08:56 ProcekStar kernel:  out_of_memory.part.0+0x1ee/0x460
wrz 13 15:08:56 ProcekStar kernel:  oom_kill_process.cold+0xb/0x10
wrz 13 15:08:56 ProcekStar kernel:  dump_header+0x4f/0x1f6
wrz 13 15:08:56 ProcekStar kernel:  dump_stack+0x74/0x92
wrz 13 15:08:56 ProcekStar kernel: Call Trace:
wrz 13 15:08:56 ProcekStar kernel: Hardware name: System manufacturer System Product Name/PRIME X470-PRO, BIOS 5843 03/11/2021
wrz 13 15:08:56 ProcekStar kernel: CPU: 11 PID: 125227 Comm: chrome Tainted: P           OE     5.11.0-34-generic #36~20.04.1-Ubuntu
wrz 13 15:08:56 ProcekStar kernel: chrome invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=300

Version Numbers of your System:
Ubuntu 20.04

Shell does not accept arguments

Arguments on the command line are not passed to the shell executed by t-rec. e.g.

t-rec /usr/local/bin/bash -l
This doesn't run, clap tries to gobble up -l.

t-rec -- /usr/local/bin/bash -l
This runs but -l is not passed to bash.

t-rec -- "/usr/local/bin/bash -l"
This starts, prints a "press ctrl-d to stop recording message", quits, and immediately resets the terminal. As a result you may see the recording message but you won't see the error message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.