Aral Balkan

Mastodon icon RSS feed icon

Getting Green Recorder running on Wayland under Gnome on Ubuntu 18.10-based systems

Green Recorder is an app for recording your screen on Linux which, as far as I know, is the only such app at the moment that works with Wayland. It’s what I used to capture the video of my segment on Al Jazeera News today1.

I had trouble trying to install it on my laptop running Pop!_OS 18.102 with Gnome 3.30.

Here’s a brief summary of the issues I encountered and the workarounds I implemented to get it running.

E: Unable to locate package green-recorder

I was unable to install Green Recorder via apt3.

To fix:

I installed it from source:

sudo pip install pydbus
git clone https://github.com/foss-project/green-recorder.git
cd green-recorder
sudo python setup.py install

The build succeeded but running the green-recorder binary resulted in a series of errors.

Failed to open file “/usr/share/green-recorder/ui.glade”: No such file or directory

Traceback (most recent call last):
  File "./green-recorder", line 262, in <module>
    builder.add_from_file("/usr/share/green-recorder/ui.glade")
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/share/green-recorder/ui.glade”: No such file or directory (4)

To fix:

sudo mv /usr/local/share/green-recorder /usr/share/

Could not load ‘/usr/share/pixmaps/green-recorder.png’

(green-recorder:12589): Gtk-WARNING **: 15:59:28.105: Could not load image '/usr/share/pixmaps/green-recorder.png': Failed to open file “/usr/share/pixmaps/green-recorder.png”: No such file or directory

To fix:

Move it to /usr/share/pixmaps/:

sudo mv /usr/local/share/pixmaps/green-recorder.png /usr/share/pixmaps

ConfigParser.NoOptionError errors

You encounter a number of errors as certain app options do not exist:

ConfigParser.NoOptionError: No option 'videoswitch' in section: 'Options'
ConfigParser.NoOptionError: No option 'audioswitch' in section: 'Options'
ConfigParser.NoOptionError: No option 'mouseswitch' in section: 'Options'
ConfigParser.NoOptionError: No option 'followmouseswitch' in section: 'Options'

To fix:

echo 'videoswitch = True' >>  ~/.config/green-recorder/config.ini
echo 'audioswitch = True' >>  ~/.config/green-recorder/config.ini
echo 'mouseswitch = True' >>  ~/.config/green-recorder/config.ini
echo 'followmouseswitch = False' >>  ~/.config/green-recorder/config.ini

(You can toggle all of these defaults in the interface later but they need to be set in the config file for the app to run properly for the first time.)

With those fixes, the app ran and I was able to get a fullscreen recording4.

Outstanding issues

Although full-screen recording works, the Select a Window button is disabled.

Selecting the Select an Area button results in a selection window but clicking the Apply button results in the following error:

xwininfo: error: No window with name "Area Chooser" exists!
Traceback (most recent call last):
  File "./green-recorder", line 453, in areasettings
    output = subprocess.check_output(["xwininfo -name \"Area Chooser\" | grep -e Width -e Height -e Absolute"], shell=True)[:-1]
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['xwininfo -name "Area Chooser" | grep -e Width -e Height -e Absolute']' returned non-zero exit status 1

I haven’t had a chance to look into those issues yet.


  1. I also used Pitivi to edit it. It’s hosted on a paid-for Vimeo account and presented on my site via a simple video tag without any tracking. ↩︎

  2. Based on Ubuntu 18.10. ↩︎

  3. I also tried via Gnome Software and although it said it was installed, it wouldn’t launch. ↩︎

  4. The only setting to record computer audio that worked for me was Monitor of Built-in Audio Analogue Stereo. ↩︎