Skip to content

systemd-like process management for Python, plus functions for interacting with X clients inside a web browser

Notifications You must be signed in to change notification settings

Truelite/python-unitd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependencies

apt --no-install-recommends install novnc tigervnc-standalone-server

Starting manually

X/VNC server (no security):

Xtigervnc -geometry 1000x750 -desktop prova :100 -SecurityTypes None -localhost

X session/client:

DISPLAY=:100 xeyes

VNC viewer (default port is 5900 + screen number)

vncviewer localhost:6000

Export VNC port over websocket, and serve web page:

websockify --web /usr/share/novnc/ 6080 localhost:6000

Web page for viewer:

http://localhost:6080/vnc.html?host=localhost&port=6080&autoconnect=true

The source parsing the URL arguments is at /usr/share/novnc/include/ui.js:36

.service files

.service files implement a subset of systemd's unit files. All sections and configurations that are not supported are silently ignored.

[Unit] section

Currently ignored

[Service] section

These configurations are supported the same as in systemd:

  • SyslogIdentifier
  • WorkingDirectory
  • ExecStartPre
  • ExecStartPost
  • ExecStop
  • ExecStopPost
  • KillSignal
  • SendSIGKILL
  • TimeoutSec
  • TimeoutStopSec

These configurations are supported with some differences:

  • ExecStart: prefixes @, -, + are ignored
  • KillMode: values control-group and mixed are treated the same as process
  • User, Group: can also take an environment variable prefixed by $, like $SUDO_UID or $SUDO_GID

[Webrun] section

The Webrun section contains configuration directives that are specific to webrun:

  • DisplayNumber (default: 4): display number to use for the X VNC server
  • DisplayGeometry (default: 800x600): geometry of the X display where the application is run
  • VNCPort (default: localhost:5900 + DisplayNumber): host:port to use for VNC communication. host: can be omitted and defaults to localhost
  • WebPort (default: 6080): host:port to use for the http server / websocket server. host: can be omitted and defaults to localhost
  • LogFile (default: standard error): write log output to the given file
  • WebConnectTimeout (default: no timeout): exit if there is no http server / websocket connection before this amount of seconds

About

systemd-like process management for Python, plus functions for interacting with X clients inside a web browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages