Fix systemd service waiting for network (gui autostart)
This commit is contained in:
		
							parent
							
								
									0e0f9e053c
								
							
						
					
					
						commit
						385ef87eb0
					
				| @ -1,14 +1,24 @@ | |||||||
|  | # systemd service file for auto starting the python gui  | ||||||
|  | # at the correct time after startup (when window manager finished starting) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # Usage: | ||||||
|  | #  - Install: `sudo cp rpi-scripts/gui/gui-start.service /etc/systemd/system/` | ||||||
|  | #  - Enable autostart:  `sudo systemctl enable gui-start.service` | ||||||
|  | #  - Disable autostart: `sudo systemctl disable gui-start.service` | ||||||
|  | 
 | ||||||
| [Unit] | [Unit] | ||||||
| Description=Start Python GUI on boot | Description=Start Python GUI for IO-control and monitoring after startup | ||||||
| After=graphical.target | After=display-manager.service | ||||||
|  | Wants=display-manager.service | ||||||
| 
 | 
 | ||||||
| [Service] | [Service] | ||||||
| Environment=DISPLAY=:0 | Environment=DISPLAY=:0 | ||||||
| ExecStart=/bin/python ./main.py | ExecStart=/usr/bin/python3 /home/pi/git/rpi-interface-board/rpi-scripts/gui/main.py | ||||||
| WorkingDirectory=/home/pi/git/rpi-interface-board/rpi-scripts/gui | WorkingDirectory=/home/pi/git/rpi-interface-board/rpi-scripts/gui | ||||||
| User=pi | User=pi | ||||||
| Group=pi | Group=pi | ||||||
| Restart=always | Restart=always | ||||||
| 
 | 
 | ||||||
| [Install] | [Install] | ||||||
| WantedBy=graphical.target | WantedBy=default.target | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user