https://gist.github.com/eslindsey/70bbc0080e335b38836fab09d19686d0
Этот Gist позволяет указать произвольную команду (и необязательные аргументы ), а также автоматически определяет созданное окно и размер экрана.
chromium-browser --kiosk &
sleep 5
wmctrl -r Chromium -b remove,fullscreen
wmctrl -r Chromium -b remove,maximized_vert,maximized_horz
wmctrl -r Chromium -e 0,0,0,3840,1080
Аргумент --kiosk
заключается в том, чтобы избавиться от адресной строки и т. д. из chromium-browser
. sleep
— убедиться, что окно успевает появиться. Первые две строки wmctrl
удаляют развернутые и полноэкранные свойства окна (, а нельзя объединить, поскольку wmctrl
позволяет удалить только «до двух свойств окна одновременно» ). Финал wmctrl
фактически перемещает окно. g,x,y,w,h
аргументы(g
гравитация ). Разрешение 3840x1080 покрывает мои два дисплея с разрешением 1920x1080 -и -с одним браузером Chromium, работающим в режиме киоска.
Это работает в текущей версии Raspbian:
Raspbian Buster with desktop
Image with desktop based on Debian Buster
Version:July 2019
Release date:2019-07-10
Kernel version:4.19
Size: 1149 MB
SHA-256:6a1a5f20329e580d5161a0255b3d4163db6f56c3997e1c3b36bdd51140bd768e
Один из подходов состоит в объединении zip
сfind
:
$ cd the/dir/you/want/to/zip
$ find. -print | zip test -@
adding: file.txt (stored 0%)
adding:.hidden/ (stored 0%)
adding:.hidden/file2.txt (stored 0%)
-@ file lists. If a file list is specified as -@ [Not on MacOS],
zip takes the list of input files from standard input instead
of from the command line. For example,
zip -@ foo
will store the files listed one per line on stdin in foo.zip.
Under Unix, this option can be used to powerful effect
in conjunction with the find (1) command.
For example, to archive all the C source files in the current directory
and its subdirectories:
find. -name "*.[ch]" -print | zip source -@
(note that the pattern must be quoted to keep the shell from expanding it).