From 4d8bb42e10818e1d03f6db475cf6e25d969954de Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 8 Jan 2026 04:14:05 +0300 Subject: [PATCH] service add --- .gitignore | 1 + car-ui.service | 31 +++++++++++++++++++++++++++++++ qqqq | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 car-ui.service diff --git a/.gitignore b/.gitignore index 30f0921..ef325ec 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ config/SSL/fullchain.pem config/SSL/privkey.pem logs/ SECRET_KEY.key +car_ui.spec repository/achievement_repository.py service/achievement_service.py diff --git a/car-ui.service b/car-ui.service new file mode 100644 index 0000000..017fcec --- /dev/null +++ b/car-ui.service @@ -0,0 +1,31 @@ +[Unit] +Description=Car UI +#After=network.target +#Wants=network.target +After=lightdm.service +Wants=lightdm.service + +[Service] +Type=simple +User=cheykrym +Group=cheykrym + +# Поднимаем X / lightdm ПЕРЕД UI +#ExecStartPre=/bin/systemctl start lightdm + +# Окружение X +Environment=DISPLAY=:0 +Environment=XAUTHORITY=/home/cheykrym/.Xauthority +Environment=QT_QPA_PLATFORM=xcb + +WorkingDirectory=/opt/car_ui +ExecStart=/opt/car_ui/car_ui + +Restart=always +RestartSec=2 + +NoNewPrivileges=true +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/qqqq b/qqqq index 8e9c6a6..31b54be 100644 --- a/qqqq +++ b/qqqq @@ -7,4 +7,35 @@ sudo usermod -aG bluetooth cheykrym rfkill list sudo rfkill unblock bluetooth -cat ~/.cache/car_ui/bluetooth.log \ No newline at end of file +cat ~/.cache/car_ui/bluetooth.log + +sudo apt install fonts-noto + + +cd dist/car_ui +chmod +x car_ui +./car_ui + + + +sudo mkdir -p /opt/car_ui +sudo cp -r car_ui/* /opt/car_ui/ +sudo chown -R cheykrym:cheykrym /opt/car_ui +/opt/car_ui/car_ui + + +sudo cp car-ui.service /etc/systemd/system/car-ui.service +sudo systemctl daemon-reload +sudo systemctl start car-ui +sudo systemctl enable car-ui +sudo systemctl set-default multi-user.target +sudo systemctl disable lightdm +sudo systemctl stop lightdm + +sudo systemctl start display-manager + + + +sudo systemctl set-default graphical.target +sudo systemctl enable lightdm +sudo systemctl start lightdm