docs for install auto star
This commit is contained in:
parent
220ee85f3d
commit
04741a6c76
49
docs/auto-start.md
Normal file
49
docs/auto-start.md
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
|
||||
# 1. Установить unit
|
||||
```bash
|
||||
sudo cp system_configs/bt-unblock.service /etc/systemd/system/bt-unblock.service
|
||||
sudo cp system_configs/car-ui.service /etc/systemd/system/car-ui.service
|
||||
```
|
||||
|
||||
# 2. Освободить tty1 для Car UI
|
||||
```bash
|
||||
sudo systemctl disable --now getty@tty1.service
|
||||
sudo systemctl mask getty@tty1.service
|
||||
```
|
||||
|
||||
# 3. Перечитать units
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
# 4. Включить автозапуск Car UI
|
||||
```bash
|
||||
sudo systemctl enable bt-unblock.service
|
||||
sudo systemctl enable car-ui.service
|
||||
```
|
||||
|
||||
# 5. Загружаться без Desktop
|
||||
```bash
|
||||
sudo systemctl set-default multi-user.target
|
||||
```
|
||||
|
||||
# 6. Проверка
|
||||
```bash
|
||||
systemctl get-default
|
||||
systemctl is-enabled car-ui.service
|
||||
```
|
||||
|
||||
# 7. Перезагрузка
|
||||
```bash
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
## Включить Desktop
|
||||
```bash
|
||||
sudo systemctl disable car-ui.service
|
||||
sudo systemctl unmask getty@tty1.service
|
||||
sudo systemctl enable getty@tty1.service
|
||||
sudo systemctl set-default graphical.target
|
||||
sudo reboot
|
||||
```
|
||||
0
system_configs/car-ui.desktop
Executable file → Normal file
0
system_configs/car-ui.desktop
Executable file → Normal file
@ -1,21 +1,33 @@
|
||||
[Unit]
|
||||
Description=Car UI
|
||||
After=graphical.target bluetooth.service
|
||||
Requires=graphical.target
|
||||
After=systemd-user-sessions.service bluetooth.service bt-unblock.service
|
||||
Wants=bluetooth.service
|
||||
Requires=bt-unblock.service
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=cheykrym
|
||||
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
|
||||
WorkingDirectory=/opt/car_ui
|
||||
|
||||
Environment=QT_QPA_PLATFORM=eglfs
|
||||
Environment=LANG=C.UTF-8
|
||||
Environment=LC_ALL=C.UTF-8
|
||||
|
||||
ExecStart=/opt/car_ui/car_ui
|
||||
|
||||
StandardInput=tty
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
TTYPath=/dev/tty1
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
TTYVTDisallocate=yes
|
||||
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user