Ender-3 Start End G-Code

; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28 ; Home all axes
M140 S{material_bed_temperature_layer_0} ; set bed temperature
M104 S{material_print_temperature_layer_0} ; set hot end temperature
M190 S{material_bed_temperature_layer_0} ; wait for bed temperature to reach
M109 S{material_print_temperature_layer_0} ; wait for hot end temperature to reach
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

; Ender 3 Custom End G-code
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning

G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

Raspberry Pi Kiosk without Desktop Environment

Here is how to make chromium kiosk without Desktop Environment (to save loading time and resources)

In my case chromium-browser not loaded in fullscreen by default, its position 65 pixel from top, so i need to add parameter “–window-size” and “–window-position” to make it right. In case its still not right, uncomment xdotool lines

save the text below in file ~/.xsession

#!/usr/bin/env bash

xset s off -dpms &

#exec matchbox-window-manager &
while true; do
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences
sed -i 's/"exit_type": "Crashed"/"exit_type": "Normal"/' ~/.config/chromium/Default/Preferences
#in case chromium window size not fullscreen
#/usr/bin/xdotool sleep 60 getwindowfocus windowsize 800 480&
#/usr/bin/xdotool sleep 60 getwindowfocus windowmove 0 0&
/usr/bin/chromium-browser --no-default-browser-check --noerrdialogs --window-position=0,0 --window-size=800,480 --kiosk http://the-web-you-want-to-load
done