Zynthian GUI start up walkthrou'

From ZynthianWiki
Jump to navigation Jump to search

The Zynthian GUI start process

It's important to consider quite what makes up the components of the zynthian system, because it isn't just one big blob of code that does everything. It's divided up into components that handle specific areas of concern. There is the GUI application that runs the GUI Screen handling and as a result probably provides the component that a user may identify most closely as the Zynthian.

Zynthian home GUI screen.png


The GUI screen in whatever form you may access it, be that on a zynthian itself or via a connected HDMI screen, a raspberry Pi 7" touchscreen, a 2.5" LCD screen or over a VNC connection on a browser, is a X-Window device generated by the Python TKinter module. From the zynthians perspective it doesn't care it just handles a X-Windows window which provides the interface.

This means that implementing mice and cursor's into this world is fairly simple and so the GUI can use a mouse simply connected to the Pi's USB port. The Zynthian has a setting to turn a cursor on & off for precisely this reason. The touchscreen is implemented this ways as well. This means that there are various display settings that allow font size and horizontal & vertical screen size to be defined. To cope with this wide range of displays. This has the side effect that screen characteristics need to be considered,so we avoid the cutesy pictures that seem to proliferate on many dedicated hardware devices that have only one screen size to consider. . . ( This is probably a personal gripe...:-) but it's helps to understand this limitation when proposing new features that would require GUI alterations or additions.

The starting point for any modern linux system is systemd and zynthian makes much use of thus infrastructure. Thus logging is best handled by using journalctl ( journalctl -fu zynthian will give a running report of service start up).


The entry point for the GUI that is managed by zynthian.service is the shell file

/zynthian/zynthian-ui/zynthian.sh

This file defines a few functions

  • load_config_env
   Configs from:
   source "$ZYNTHIAN_CONFIG_DIR/zynthian_envars.sh"
   source "$ZYNTHIAN_MY_DATA_DIR/midi-profiles/default.sh"
   source "$ZYNTHIAN_CONFIG_DIR/zynthian_custom_config.sh"
  • backlight_on
  • backlight_off
  • screensaver_off
  • raw_splash_zynthian
  • raw_splash_zynthian_error
  • splash_zynthian
  • splash_zynthian_error