Skip to content

Instantly share code, notes, and snippets.

@hedning
Created January 18, 2020 14:21
Show Gist options
  • Save hedning/008462f98da4b8cf584e1f1e94de06f3 to your computer and use it in GitHub Desktop.
Save hedning/008462f98da4b8cf584e1f1e94de06f3 to your computer and use it in GitHub Desktop.
Start gnome shell screen cast from command line
#!/usr/bin/env nix-shell
#! nix-shell -i python3 -p python3.pkgs.dbus-python
import dbus
import time
bus = dbus.SessionBus()
obj = bus.get_object("org.gnome.Shell", "/org/gnome/Shell/Screencast")
obj.Screencast("Auto %d %t.webm", [],
dbus_interface="org.gnome.Shell.Screencast")
time.sleep(999999)
@vtwaldo21
Copy link

god bless you.

@tyler-wright
Copy link

This is very handy, thanks for doing this legwork.

@FelipeFTN
Copy link

Amazing! Thank you so much! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment