-
Notifications
You must be signed in to change notification settings - Fork 34
Command Line
For testing purposes you can run PictureFrame from command line. But for generall usage we highly recommend to run PictureFrame as a service.
Assuming you ran the install operation to create picframe_data/
in your home directory:
picframe ~/picframe_data/config/configuration.yaml
From the desktop with attached keyboard this will be the same as for the Pi3. However over ssh or without the desktop (which will need to be turned off when starting automatically i.e. set boot to command line) it is required to start X (the windows system) and, for the moment, that needs to be done by root to enable the correct graphics drivers:
sudo xinit /usr/bin/python3 /home/pi/picframe_data/run_start.py /home/pi/picframe_data/config/configuration.yaml
While the configuration of PictureFrame is done in a separate config file ('configuration.yaml'), there are still some command line options you might need to get started.
Exactly how you do this will depend if you did a 'PIP install' or using the sources.
For example, with 'PIP install' you can run picframe
from anywhere on the console, because a starter script is installed under ~/.local/bin/picframe
To get a short help for the command line options just type:
picframe -h
Standard installation to ~/picframe_data
(note the .
period at the end) This
command will ask various questions and modify the configuration.yaml file for you.
cd ~
picframe -i .
If you downloaded the source using git clone you have to do this:
cd /path/to/my/sources/picframe
python3 -m picframe.start -h
python3 -m picframe.start -i ~/
You can see all possible options your version supports by starting picframe with the -h option.
Short | Long Name | Command | Example |
---|---|---|---|
-h |
--help |
shows all command line options | |
-v |
--version |
print version info of picframe and its required packages |
picframe -v picframe version: 1.0.0 Checking required packages...... PIL : 7.2.0 exifread : 2.3.2 pi3d : 2.42 aml : 5.3.1 paho.mqtt : 1.5.1 iptcinfo3 : 2.1.4 numpy : 1.19.5 ninepatch : installed, but no version info Checking optional packages...... pyheif : 0.5.1 |
-i DESTINATION_DIRECTORY |
--initialize DESTINATION_DIRECTORY |
creates standard file structure for picframe in destination directory |
picframe -i . creates the folder picframe_data in current directory which contains the required data files |
configfile |
configuration.yaml which contains all the configuration for picframe
|
picframe ~/picframe_data/config/configuration.yaml |
The data files folder picframe_data
contains all the required data
Folder | Content | Description |
---|---|---|
config |
configuration_example.yaml configuration.yaml
|
Open file configuration.yaml in an editor and configure it to your needs. This is needed to start picframe . |
html |
html code | html content to control picframe over a simple browser interface. |
data |
data files like fonts, shaders, mats, 'no image' image | If you are adventurous, you can modify these files. But be warned, picframe may no longer work properly. |
NOTE
If you are running picframe
from source you don't have to run the -i
option necessarily. But ensure, that your configuration.yaml
entries point to the corresponded folders in your source code structure.