Results 1 to 7 of 7

Thread: Screenshot from terminal?

  1. #1
    Join Date
    Nov 2008
    Location
    Maine
    Beans
    1,126
    Distro
    Ubuntu 10.04 Lucid Lynx

    Screenshot from terminal?

    Hi all,
    is there anyway I can perform a screen capture, or screen shot?
    This is for a Ubuntu server, with no GUI.
    Can I get a code example?
    ~Conradin~

  2. #2
    Join Date
    May 2008
    Location
    Berks, UK
    Beans
    1,387

    Re: Screenshot from terminal?

    What are you trying to capture. A screen capture without a GUI doesn't seem to make sense to me. Perhaps you're trying to log what happens in a terminal window - if so, then I use vi, and execute the commands from there (eg :r! date to get date/time) so I can record a sequence.

    HTH
    Derek

  3. #3
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,638
    Distro
    Ubuntu

    Re: Screenshot from terminal?

    Well, it depends what you want to do. You could use script to capture a terminal session. See man script (or post back).

    Or if you want an actual screenshot use fbgrab something like this

    Code:
    fbgrab -c 1 -s 5 screenshot.png
    You can run that from tty2 and it will grab tty1 after a five second delay.

    Then view it with fbi

    Code:
    fbi screenshot.png
    Last edited by nothingspecial; May 26th, 2011 at 09:51 AM.

  4. #4
    Join Date
    Nov 2008
    Location
    Maine
    Beans
    1,126
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Screenshot from terminal?

    I tried
    Code:
    sudo fbgrab -c 5 term5.png
    what I got is the attached image.
    its all chopped, an look like its not synching.
    The man page to fbgrab says not to use the -s option in conjunction with -c so I didnt.
    Attached Images Attached Images
    ~Conradin~

  5. #5
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,638
    Distro
    Ubuntu

    Re: Screenshot from terminal?

    If you don't mind, what is on the screen that you are trying to capture?

    fbgrab works perfectly for me, even when playing videos.

    It could be something to do with permissions on the framebuffer. Do you get any errors when running fbgrab?

  6. #6
    Join Date
    Nov 2008
    Location
    Maine
    Beans
    1,126
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Screenshot from terminal?

    I do have to use sudo to get fbgrab to work.
    The only error is the output is screwy. I can see the red white and blue in the horizontal shifting lines there so its getting something related to the screen capture. No other errors that I see.

    I also installed fbi, that works fine, just like any otehr image viewer.
    ~Conradin~

  7. #7
    Join Date
    Nov 2008
    Location
    Toronto Canada
    Beans
    925
    Distro
    Ubuntu Studio 14.04 Trusty Tahr

    Re: Screenshot from terminal?

    I doubt a screen cap will work without X running.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •