≡ Menu

Shell Script To Record Terminal Desktop Sessions Under Linux or Unix Like Operating Systems

A simple shell script wrapper to record current terminal session of a linux or unix desktop. This script act as a wrapper to recordMyDesktop command which produces a file that contains a video and audio recording of a linux desktop session. The default behavior of recording is to mark areas that have changed (through libxdamage) and update the frame. This wrapper gets current window name and remove window decoration.

How do I use this script?

  1. Open a terminal.
  2. Open Tab.
  3. Run script as:
  4. ./script.sh foo.ogv

  5. Switch to tab # 1 and run your command.
  6. When done switch back to tab #2 and press CTRL + C to save recording to foo.ogv.
  7. To run foo.ogv type:
  8. gnome-open foo.ogv
    mplayer foo.ogv

{ 8 comments… add one }
  • patel November 23, 2013, 11:02 pm

    “ttyrec” command will do the same job.

  • LifeShare December 18, 2012, 10:56 pm

    Excellent. Thanks for sharing it,

  • Pradip Shah December 13, 2012, 2:29 am

    Is there a way to record a ssh session?

  • foobar December 11, 2012, 8:40 pm

    Great script

  • LittleBoy October 5, 2012, 5:50 pm

    usage: /usr/bin/xwininfo [-options …]
    Got this message… Can you help please….

  • LittleBoy October 5, 2012, 5:46 pm

    /usr/bin/xwininfo: error: -id requires argument
    /usr/bin/xwininfo: error: -id requires argument
    /usr/bin/xwininfo: error: -id requires argument
    /usr/bin/xwininfo: error: -id requires argument
    –width must be larger than 0.
    –height must be larger than 0.

  • bemehow October 1, 2012, 6:52 pm

    This is even better for the job :)


  • Linver August 22, 2012, 2:55 pm


Security: Are you a robot or human?

Leave a Comment