{"id":309009,"date":"2020-08-25T21:00:52","date_gmt":"2020-08-25T21:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309009"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309009","title":{"rendered":"\u041a\u0438\u043e\u0441\u043a Raspberry Pi \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430 Kivy"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516542\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Raspberry Pi 3B+ \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0438\u043e\u0441\u043a\u0430 \u0441 GUI \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/kivy.org\" rel=\"nofollow\">Kivy<\/a> \u0434\u043b\u044f Python 3. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Kivy? \u041f\u0440\u043e\u0441\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Python, \u043d\u0430\u043c \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043e Kivy \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f wxWidgets \u0438 \u0434\u0430\u0436\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 Chromium \u0441 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0431\u0435\u0441\u0441\u0438\u043b\u044c\u043d\u044b \u043f\u0440\u043e\u0442\u0438\u0432 Kivy, \u043b\u0451\u0433\u043a\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0439.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Raspbian Lite \u0441 Python 3.7 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Supervisor. \u041a\u0441\u0442\u0430\u0442\u0438, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043a\u0430 <a href=\"https:\/\/www.raspberrypi.org\/downloads\/\" rel=\"nofollow\">Raspberry Pi Imager<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c SD-\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u043b\u044b\u0448\u0430 RPi \u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u043d\u0430 <i>pi<\/i> \u0438 \u043f\u0430\u0440\u043e\u043b\u044f <i>raspberry<\/i>. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ sudo raspi-config<\/code><\/pre>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u044f\u0442\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 <i>Interfacing Options<\/i>, \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u043c\u0435\u043d\u044e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u043d\u043a\u0442 <i>SSH<\/i>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<br \/>  \u0418\u0442\u0430\u043a, \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0442\u043a\u0438\u043d\u0443\u0432\u0448\u0438\u0441\u044c \u0432 \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u043a\u0440\u0435\u0441\u043b\u0435, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 RPi \u0447\u0435\u0440\u0435\u0437 \u043b\u044e\u0431\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 ssh-\u043a\u043b\u0438\u0435\u043d\u0442.<\/p>\n<h2>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u043d\u0430\u0441 \u0438\u043c\u0435\u043d\u0435\u043c, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <i>sudo<\/i> \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f:<\/p>\n<pre><code class=\"bash\">$ sudo useradd -m kivygui -s \/bin\/bash $ sudo passwd kivygui $ sudo usermod -a -G sudo kivygui $ sudo reboot<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ssh \u0443\u0436\u0435 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f <i>kivygui<\/i> \u0438 \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0443\u0447\u0451\u0442\u043a\u0443 <i>pi<\/i>:<\/p>\n<pre><code class=\"bash\">$ sudo userdel pi $ sudo rm -r \/home\/pi\/ <\/code><\/pre>\n<p>  \u041d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b:<\/p>\n<pre><code class=\"bash\">$ sudo sed -i 's\/XKBLAYOUT=&quot;gb&quot;\/XKBLAYOUT=&quot;us&quot;\/' \/etc\/default\/keyboard<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041d\u0430\u0448\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0451:<\/p>\n<pre><code class=\"bash\">$ mkdir \/home\/kivygui\/helloworld<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 <a href=\"https:\/\/www.nano-editor.org\/\" rel=\"nofollow\">nano<\/a> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \/home\/kivygui\/helloworld\/run.sh \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"bash\">export DISPLAY=:0.0 xset s off -dpms exec matchbox-window-manager &amp; while true; do   exec python3 start.py done<\/code><\/pre>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432 <i>nano<\/i> \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \/home\/kivygui\/helloworld\/start.py:<\/p>\n<pre><code class=\"python\">import kivy kivy.require('1.11.0') from kivy.app import App from kivy.uix.label import Label class MyApp(App):     def build(self):         return Label(text='Hello, world!') if __name__ == '__main__':     MyApp().run()<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/h2>\n<p>  \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f <a href=\"https:\/\/pypi.org\/project\/pip\/\" rel=\"nofollow\">pip3<\/a>:<\/p>\n<pre><code class=\"bash\">$ sudo apt-get update -y $ sudo apt-get install -y python3-pip<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 <a href=\"https:\/\/github.com\/spanezz\/nodm\/\" rel=\"nofollow\">nodm<\/a> \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438\u0445 \u0437\u0430\u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"bash\">$ sudo apt-get install -y desktop-base gtk2-engines-pixbuf libxklavier16 xserver-xorg xserver-xorg-input-all xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev xserver-xorg-video-nouveau xserver-xorg-video-radeon xserver-xorg-video-vesa<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <i>nodm<\/i> \u0438 \u043e\u043a\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 <a href=\"https:\/\/www.yoctoproject.org\/software-item\/matchbox\/\" rel=\"nofollow\">matchbox<\/a>:<\/p>\n<pre><code class=\"bash\">$ sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -y x11-xserver-utils nodm matchbox-window-manager $ echo &quot;\/usr\/sbin\/nodm&quot; | sudo tee \/etc\/X11\/default-display-manager $ sudo sed -i -e &quot;s\/NODM_ENABLED=false\/NODM_ENABLED=true\/&quot; -e &quot;s\/NODM_USER=root\/NODM_USER=kivygui\/&quot; -e &quot;s\/NODM_X_OPTIONS='-nolisten tcp'\/NODM_X_OPTIONS='-nolisten tcp -nocursor'\/&quot; \/etc\/default\/nodm<\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0430\u043b \u0447\u0435\u0440\u0451\u0434 <i>Kivy<\/i>:<\/p>\n<pre><code class=\"bash\">$ sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev pkg-config libgl1-mesa-dev libgles2-mesa-dev python-setuptools libgstreamer1.0-dev git-core gstreamer1.0-plugins-{bad,base,good,ugly} gstreamer1.0-{omx,alsa} python-dev libmtdev-dev xclip xsel libjpeg-dev $ sudo python3 -m pip install --user kivy<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0443\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f, \u0441\u043a\u0440\u043e\u0435\u043c \u0432\u0441\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043a\u0440\u0430\u043d \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">$ sudo rm \/etc\/systemd\/system\/default.target $ sudo rm \/etc\/systemd\/system\/getty@tty1.service.d\/autologin.conf $ sudo ln -s \/lib\/systemd\/system\/graphical.target \/etc\/systemd\/system\/default.target $ sudo sed -i '$ s\/$\/ quiet splash consoleblank=0 loglevel=0 logo.nologo plymouth.ignore-serial-consoles\/' \/boot\/cmdline.txt $ sudo sed -i 's\/console=tty1\/console=tty3\/' \/boot\/cmdline.txt<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435, \u043a\u043e\u043d\u0441\u043e\u043b\u044c tty1 \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\">$ sudo systemctl disable getty@tty1<\/code><\/pre>\n<p>  <\/p>\n<h2>Supervisord<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <i>Supervisor<\/i>:<\/p>\n<pre><code class=\"bash\">$ sudo apt-get install -y supervisor<\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043b\u043e\u0433\u043e\u0432:<\/p>\n<pre><code class=\"bash\">$ mkdir \/home\/kivygui\/logs<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0443 Supervisor \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"bash\">$ sudo systemctl stop supervisor<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 <i>nano<\/i> \u0432 \u043a\u043e\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/etc\/supervisor\/supervisord.conf \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"plaintext\">[program:rungui] command=sh run.sh directory=\/home\/kivygui\/helloworld user=root autostart=true autorestart=true startsecs = 5 startretries=3 stderr_logfile=\/home\/kivygui\/logs\/rungui.err.log stdout_logfile=\/home\/kivygui\/logs\/rungui.out.log stderr_logfile_maxbytes=5MB stdout_logfile_maxbytes=5MB stopsignal=INT stopwaitsecs=5 <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c <i>kivygui<\/i> \u0438 <i>root<\/i> \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">$ sudo visudo<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043c \u0444\u0430\u0439\u043b \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code class=\"plaintext\"># # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in \/etc\/sudoers.d\/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults        env_reset Defaults        mail_badpass Defaults        secure_path=&quot;\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin&quot;  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL kivygui  ALL=(ALL:ALL) ALL   # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL   # See sudoers(5) for more information on &quot;#include&quot; directives:   #includedir \/etc\/sudoers.d   kivygui ALL = NOPASSWD: \/usr\/bin\/supervisorctl kivygui ALL = NOPASSWD: \/usr\/bin\/python3.7 kivygui ALL=(ALL) NOPASSWD: \/bin\/systemctl daemon-reload kivygui ALL=(ALL) NOPASSWD: \/usr\/bin\/supervisord   root ALL=(ALL) NOPASSWD: \/bin\/systemctl daemon-reload root ALL = NOPASSWD: \/usr\/bin\/supervisorctl root ALL = NOPASSWD: \/usr\/bin\/python3.7 root ALL=(ALL) NOPASSWD: \/usr\/bin\/supervisord <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443:<\/p>\n<pre><code class=\"bash\">$ sudo systemctl start supervisor<\/code><\/pre>\n<p>  \u041d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u043a RPi \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<h2>P.S.<\/h2>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, <i>nodm<\/i> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <a href=\"https:\/\/github.com\/canonical\/lightdm\" rel=\"nofollow\">lightdm<\/a> \u0441 \u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u043d\u043e\u043c. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 <i>nodm<\/i> \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0441\u0430\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a <i>nodm<\/i> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/516542\/\"> https:\/\/habr.com\/ru\/post\/516542\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/516542\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Raspberry Pi 3B+ \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0438\u043e\u0441\u043a\u0430 \u0441 GUI \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/kivy.org\" rel=\"nofollow\">Kivy<\/a> \u0434\u043b\u044f Python 3. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Kivy? \u041f\u0440\u043e\u0441\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Python, \u043d\u0430\u043c \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043e Kivy \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f wxWidgets \u0438 \u0434\u0430\u0436\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0430 Chromium \u0441 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0431\u0435\u0441\u0441\u0438\u043b\u044c\u043d\u044b \u043f\u0440\u043e\u0442\u0438\u0432 Kivy, \u043b\u0451\u0433\u043a\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0439.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-309009","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309009"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309009\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}