Last active
August 29, 2015 14:03
-
-
Save franklinjavier/d8dbe8c1017423cfc223 to your computer and use it in GitHub Desktop.
Screencasting on Gnu/Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:fossfreedom/byzanz | |
sudo apt-get update && sudo apt-get install byzanz | |
# | |
# If you are behind a firewall | |
# | |
#!/bin/bash | |
sudo apt-get update 2> /tmp/keymissing; | |
for key in | |
$(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); | |
do echo -e "nProcessing key: $key"; | |
sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv $key && | |
sudo gpg --export --armor $key | | |
sudo apt-key add -; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------ | |
# How to use | |
# ./screenr.sh DURATION -c OUTPUT.gif | |
# | |
# Adapted by @franklinjavier | |
# | |
# font: http://askubuntu.com/a/201018 | |
# ------------------------------------ | |
# Delay before starting | |
DELAY=2 | |
# Duration and output file | |
if [ $# -gt 0 ]; then | |
D="--duration=$@" | |
else | |
echo Default recording duration 10s to /tmp/recorded.gif | |
D="--duration=10 /tmp/recorded.gif" | |
fi | |
XWININFO=$(xwininfo) | |
read X < <(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO") | |
read Y < <(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO") | |
read W < <(awk -F: '/Width/{print $2}' <<< "$XWININFO") | |
read H < <(awk -F: '/Height/{print $2}' <<< "$XWININFO") | |
echo Delaying $DELAY seconds. After that, byzanz will start | |
for (( i=$DELAY; i>0; --i )) ; do | |
echo $i | |
sleep 1 | |
done | |
byzanz-record --verbose --delay=0 --x=$X --y=$Y --width=$W --height=$H $D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment