<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body>
    Hi guys,<br>
    I installed gstreamer in Ubuntu 20.04 as mentioned in the official
    site:<br>
    <p style="box-sizing: border-box; margin: 0px 0px 10px; color:
      rgb(34, 34, 34); font-family: "Source Sans Pro",
      "Source Sans", sans-serif; font-size: 14px; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(238, 238, 238); text-decoration-style:
      initial; text-decoration-color: initial;"><code style="box-sizing:
        border-box; font-family: Menlo, Monaco, Consolas, "Courier
        New", monospace; font-size: 12.6px; padding: 2px 4px;
        color: rgb(0, 0, 0); background-color: rgb(248, 248, 248);
        border-radius: 0px;">apt-get install libgstreamer1.0-0
        gstreamer1.0-plugins-base gstreamer1.0-plugins-good
        gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
        gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools
        gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl
        gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio</code></p>
    <br>
    when I try to screen capture:<br>
    gst-launch-1.0 ximagesrc ! videoscale ! autovideosink<br>
    <br>
    I get an error.<br>
    <br>
    ---<br>
    root@sblantipodi-Virtual-Machine:~# gst-launch-1.0 ximagesrc !
    videoscale ! autovideosink<br>
    Setting pipeline to PAUSED ...<br>
    error: XDG_RUNTIME_DIR not set in the environment.<br>
    ERROR: Pipeline doesn't want to pause.<br>
    ERROR: from element /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0:
    Could not open X display for reading<br>
    Additional debug info:<br>
    gstximagesrc.c(158): gst_ximage_src_open_display ():
    /GstPipeline:pipeline0/GstXImageSrc:ximagesrc0:<br>
    NULL returned from getting xcontext<br>
    Setting pipeline to NULL ...<br>
    Freeing pipeline ...<br>
    ---<br>
    <br>
    Can you help me please?<br>
    Same command works well on Fedora.<br>
    <br>
    Thank you!<br>
  </body>
</html>