That’s the info from the old Mobian wiki Tweaks (now only available in the Internet Archive)
Taking screenshots
From the command line
There is no key shortcut to take screenshots, but you can use the command line tool grim (sudo apt install grim).
To make one, just call (can easily be done from SSH so that you can see on your phone display what you are screenshotting)
grim my_screenshot.png
This will save a screenshot in the current directory (if you omit the file name, it will select a unique name automatically).
Unfortunately grim does not support delaying taking a screenshot. In case you want to take a screenshot of something other than the terminal you type grim in - you can run
sleep 10; grim my_screenshot.png
to delay the taking of the screenshot by 10 seconds.
Gnome-screenshot
You can install the gnome-screenshot package. Fullscreen screenshots work! Delay timer works fine too, so you can easily change focus to another app or part of the home screen. The ‘Window’ and ‘Selection’ options currently cause the app to crash.
To install the package:
sudo apt install gnome-screenshot
Out of the box it will not scale properly on the PinePhone (possibly on other devices too?). To fix this:
scale-to-fit gnome-screenshot
Taking screenshots v2 (fancy app)
An even fancier way to take a screenshot using a simple graphical dialog (and initiating it by invoking an “app”) has been described here and works flawlessly on Mobian. It is a good combination between convenience and ease of understanding.
-
Install the required dependencies: sudo apt install libnotify-bin grim
-
Place the screenshot script in /home/mobian/bin (or anywhere really). The original script has been adapted to store screenshots in (/home/mobian) rather than /home/purism:
#!/bin/bash
# this file should be stored as /home/mobian/bin/screenshot
SCREENSHOT=${HOME}/Pictures/$(date +%Y-%m-%d-%H%M%S).png
notify-send -t 1000 screenshot "Taking a screenshot in 5 seconds"
sleep 5
grim "$SCREENSHOT"
notify-send screenshot "Screenshot stored at ${SCREENSHOT}"
-
Make the screenshotter executable as program: chmod 755 /home/mobian/bin/screenshot
-
Finally create the application icon to easily call it from the homescreen. So create a file in /home/purism/.local/share/applications/screenshot.desktop and put there:
[Desktop Entry]
Name=Screen Shot
Type=Application
Icon=applets-screenshooter
Exec=/home/mobian/bin/screenshot
Categories=Utility;
Now all you need to do is clicking on the screenshot icon in your app overview. Or issue “screenshot” in the terminal (it might take a relogin to make ~/bin automatically be picked up as PATH).
Taking screenshots v3
(an improved fancy app with correct display in the local language)
Nothing is so good that it can’t be even better, in three steps to screenshots in the local language, see there:
-
Install the required dependencies: sudo apt install grim libnotify-bin yad
-
The script –> /usr/local/bin or another folder in the $PATH variable. Don’t forget to adjust the execution permissions, e.g.: chmod 755 /usr/local/bin/screenshot2app
-
The *.desktop –> /usr/share/applications
#PP_german:matrix.org hopes you have fun creating a screenshot.
Screen recording
If you want to record the screen, you can use the package wf-recorder (sudo apt install wf-recorder).
If you want to make a video grabbing screen and microphone just call (can be done from SSH)
wf-recorder --file=recording_with_audio.mp4 --audio
Screen recording v2 (fancy app)
Using the above application wf-recorder in combination with yad and a simple bash-script, one can create a cool GUI for screen recordings (with and without audio recording):
Put this script into /home/mobian/bin/screenrecorder.sh or any similar location:
#!/usr/bin/env bash
SCREENCAST="${HOME}/Videos/$(date +%Y-%m-%d-%H%M%S).mp4"
CHOICE=$(yad --title="Screen Recorder" \
--text="${SCREENCAST}" \
--window-icon=mpv \
--button=gtk-ok \
--form \
--field="Audio:CHK")
if [[ $? == 0 ]]; then
AUDIO=$(echo "$CHOICE" | cut -d "|" -f1)
if [[ "$AUDIO" == "TRUE" ]]; then
AUDIO_ARG="--audio"
fi
wf-recorder $AUDIO_ARG --file="${SCREENCAST}" &
RECORDER_PID=$!
yad --title="Screen Recorder" \
--text="Stop Recording" \
--button=gtk-cancel
kill -INT 888 $RECORDER_PID
notify-send "Screencast" "${SCREENCAST}"
fi
You also need a launcher icon for the script, so put following into /home/mobian/.local/share/applications/screenrecorder.desktop:
[Desktop Entry]
Type=Application
Name=Screenrecorder
Icon=preferences-desktop-screensaver
Exec=/home/mobian/bin/screenrecorder.sh
Terminal=false
Change the path in the Exec= line, if the script has a different location.