As of version 2.89, the IFL (GUI) boot disk contains the 'scrot' command line utility to create screenshots. This utility can be run by opening a terminal window and running 'scrot' along with any desired options. The command line options available are summarized below, followed by a few examples of using it.
|Usage: scrot [OPTIONS]... [FILE]|
|Where FILE is the target file for the screenshot. If FILE is not specified, a date-stamped file will be dropped in the current directory.|
(See 'man scrot' on a Linux distribution for more details.)
|-h, --help||display this help and exit|
|-v, --version||output version information and exit|
|-b, --border||When selecting a window, grab wm border too|
|-c, --count||show a countdown before taking the shot|
|-d, --delay NUM||wait NUM seconds before taking a shot|
|-e, --exec APP||run APP on the resulting screenshot|
|-q, --quality NUM||Image quality (1-100) high value means high size, low compression. Default: 75. For lossless compression formats, like png, low quality means high compression.|
|-m, --multidisp||For multiple heads, grab shot from each and join them together.|
|-s, --select||interactively choose a window or rectangle with the mouse|
|-u, --focused||use the currently focused window|
|-t, --thumb NUM||generate thumbnail too. NUM is the percentage of the original size for the thumbnail to be, or the geometry in percent, e.g. 50x60 or 80x20.|
|-z, --silent||Prevent beeping|
Basic examples of usage:
- Capture entire desktop to a time stamped PNG file:
Example file created: 2020-05-08-050830_1024x768_scrot.png
- Capture entire desktop to a specified filename:
- Capture window selected by the mouse to a time stamped PNG file:
Example file created: 2020-05-08-053830_630x430_scrot.png
- Capture window selected by the mouse to a specified filename:
scrot -s iflscreenshot.png
- Capture entire desktop to a specified filename after five second delay to arrange screen:
scrot -d 5 ifloptions.png
Note: If the specified filename (or path) contains spaces make sure to surround it in quotes. For example:
scrot -s "ifl backup options.png"
Saving screenshot files:
The screenshot files will be saved to the current directory (/tbu, by default) unless otherwise specified in the filename path on the command line. The contents of the /tbu directory can be viewed by using Midnight Commander (MC icon) or by running the ls /tbu command in a terminal window (if /tbu is the current directory you can just run ls). If you want to view only the PNG files you can run: ls /tbu/*.png
Since the saved PNG files only exist in RAM on the running boot media, they will be lost when the system is rebooted or powered down. The files can be saved from the running boot media by using the 'mnt' icon (Mount Drive or Partition; the dpmount script) to mount a drive/partition, or the 'net1' icon (Mount Network Shares) to mount a network share, and then using Midnight Commander or terminal to copy the files to the mounted file system.
Below is an example of the process of saving screenshot files to the root folder of a USB flashdrive using the dpmount script to mount the drive and then copying the files using a terminal:
- Connect the USB flashdrive (UFD). The booted IFL GUI UFD is used here.
Note: If the IFL UFD was created using the "Traditional - You have control over options. (Custom)" method and you selected the "Leave Boot Drive Mounted as /tbu/boot" option, you can skip step 6 if step 5 shows the drive is mounted to /tbu/boot. In the command examples you would need to substitute boot for mnt1 if the drive is mounted to /tbu/boot.
Note: As with the above note, if the UFD is mounted to a folder other than mnt1, in the following command examples you would need to substitute the correct mount folder name for mnt1. For example, if a partition has already been mounted to mnt1 and the UFD gets mounted to /tbu/mnt2, use mnt2.
- Open a terminal by clicking the 'Terminal' icon or by right-clicking the desktop and selecting Terminal from the pop-up menu.
- If necessary, determine the device name used by the UFD. To do this, open a terminal and run the following two commands. Each will list the devices in a different manner and you should be able to determine the proper device being used (e.g. /dev/sdb1).
Example blkid output for device:
/dev/sdb1: LABEL="IFL_3_39" UUID="5EA8-8F89" TYPE="vfat" PARTUUID="5ea88f89-01"
Example listhw output for device:
Removable drives (sdx, mmcblkx, nvmex):
sdb: 30528 MiB SanDisk Cruzer Glide 3.0
- Run the dpmount script using one of the following methods:
- Click the 'mnt' icon (Mount Drive or Partition).
- Right-click on the desktop and select Mount Drive or Partition from the pop-up menu.
- Run dpmount in a terminal.
- Locate the UFD in the list of devices (devices will indicate UNMOUNTED or MOUNTED along with the path used).
Example: /dev/sdb1:(30521M_vfat) UNMOUNTED
- Select the device and click the Ok button (or press Enter) to mount it. The list will refresh and the device should now show as mounted.
Example: /dev/sdb1:(30521M_vfat) MOUNTED:(/tbu/mnt1)
- Switch back to the terminal window and use the cp command to copy the screenshot file(s) to the UFD. Wildcards can be used. Surround filename and path with quotes if either contains spaces. Several examples are shown below:
Copy single files:
cp iflscreenshot.png mnt1
cp "ifl backup options.png" mnt1
Copy single file using complete paths:
cp /tbu/iflscreenshot.png /tbu/mnt1
Copy multiple files using wildcard:
cp 2020-05-08*.png mnt1
- If you would like to view a directory listing of the UFD you can use the ls command. For example:
Example with complete path:
- Switch back to the dpmount script window (WORK WITH DRIVES & PARTITIONS) or reopen if closed. Select the UFD device and click the Ok button (or press Enter) to unmount it. The UFD can now be safely removed.