This file is indexed.

/usr/bin/miral-screencast is in mir-demos 0.31.1-0ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
width=1920
height=1080
output=screencast.mp4
socket=${XDG_RUNTIME_DIR}/miral_socket
if [ -v MIR_SOCKET ]; then socket=${MIR_SOCKET}; fi
bindir="$( dirname "${BASH_SOURCE[0]}" )"

while [ $# -gt 0 ]
do
  if [ "$1" == "--help" -o "$1" == "-h" ]
  then
    echo "$(basename $0) - screencast capture script for use with Mir servers"
    echo "Usage: $0 [options]"
    echo "Options are:"
    echo "    --width   set the capture width   [${width}]"
    echo "    --height  set the capture height  [${height}]"
    echo "    --output  set the output filename [${output}]"
    echo "    --socket  set the mir socket      [${socket}]"
    echo "    --tmpfile specify the temporary work file"
    exit 0
  elif [ "$1" == "--socket" ]; then shift; socket=$1
  elif [ "$1" == "--output" ]; then shift; output=$1
  elif [ "$1" == "--width"  ]; then shift; width=$1
  elif [ "$1" == "--height" ]; then shift; height=$1
  elif [ "$1" == "--tmpfile" ]; then shift; tempfile=$1
  fi
  shift
done

echo width = ${width}
echo height = ${height}
echo output = ${output}
echo socket = ${socket}

if ! which mirscreencast >> /dev/null ; then echo "Need mirscreencast - run \"sudo apt install mir-utils\""; exit 1 ;fi
if ! which mencoder >> /dev/null ;      then echo "Need mencoder - run \"sudo apt install mencoder\""; exit 1 ;fi

if [ -e ${output} ]; then echo "Output exists, moving to ${output}~"; mv ${output} ${output}~ ;fi
while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done

if [ ! -v tempfile ]; then tempfile=$(mktemp); fi
${bindir}/mirscreencast --size ${width} ${height} -m ${socket} -f ${tempfile}& mirscreencast_pid=$!
trap 'kill ${mirscreencast_pid}; rm -f -- "${tempfile}"; exit 0' INT TERM HUP EXIT

sleep 1; # don't lose the next message in the spew from mirscreencast
read -rsp $'\n\nPress enter when recording complete...'

kill ${mirscreencast_pid}
trap 'rm -f -- "${tempfile}"; exit 0' INT TERM HUP EXIT
mencoder -demuxer rawvideo -rawvideo fps=60:w=${width}:h=${height}:format=bgra -ovc x264 -o ${output} ${tempfile}