Compare commits
No commits in common. "3141c9817f9b0ef957647a7b13ca6f78b8509746" and "ae790faf896e66a842177930c2e8098d50fdbc5b" have entirely different histories.
3141c9817f
...
ae790faf89
@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
||||||
# 21JAN2025:
|
|
||||||
Instructions for VNC and file logging
|
|
||||||
via an ssh tunnel to an ETC 6075 touchscreen
|
|
||||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
||||||
|
|
||||||
|
|
||||||
# Login to dev using ssh -X
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------
|
|
||||||
# file Logging
|
|
||||||
-------------------------------------------------------
|
|
||||||
|
|
||||||
To log data files/can
|
|
||||||
On dev
|
|
||||||
|
|
||||||
dev$ ssh -p 1235 root@localhost "./can_rx | egrep 'O2|F1DF' " >> touchscreen_can_log.txt
|
|
||||||
|
|
||||||
This will log to dev data streamed from the touch screen via the shh tunnel.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------
|
|
||||||
# VNC
|
|
||||||
-------------------------------------------------------
|
|
||||||
|
|
||||||
# This assumes the reverse_tunnel.sh is running on the target touch screen
|
|
||||||
|
|
||||||
to get this running log in from dev
|
|
||||||
dev$ ssh -p1235 root@localhost
|
|
||||||
# login password....
|
|
||||||
#
|
|
||||||
# more tunnel_vnc.sh
|
|
||||||
ssh -y -N -l touchscreen -R 1236:localhost:5900 dev.energytechnologycontrol.com
|
|
||||||
# ./tunnel_vnc.sh &
|
|
||||||
# exit # back to dev
|
|
||||||
|
|
||||||
display a VNC copy of the touchscreen GUI.
|
|
||||||
|
|
||||||
$dev vncviewer localhost:1236
|
|
||||||
|
|
||||||
VNC viewer should display. Leave terminal session logged in.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
||||||
RPC 21JAN2025
|
|
||||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
# Generate temporary file safely
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
ppt "$1" > "$temp_file"
|
|
||||||
|
|
||||||
# Count lines directly
|
|
||||||
line_count=$(wc -l < "$temp_file")
|
|
||||||
|
|
||||||
# Calculate image height (e.g., 20 pixels per line, with a minimum height)
|
|
||||||
line_height=20
|
|
||||||
image_height=$((line_count * line_height))
|
|
||||||
[ "$image_height" -lt 70 ] && image_height=70 # Ensure a minimum height of 70 pixels
|
|
||||||
|
|
||||||
# Generate image with dynamic height and fixed-width font
|
|
||||||
convert \
|
|
||||||
-size 165x${image_height} \
|
|
||||||
xc:lightyellow \
|
|
||||||
-font Courier \
|
|
||||||
-pointsize 12 \
|
|
||||||
-fill blue \
|
|
||||||
-gravity center \
|
|
||||||
-draw "text 0,0 '$(cat "$temp_file")'" \
|
|
||||||
image.png
|
|
||||||
|
|
||||||
# Clean up temporary file
|
|
||||||
rm "$temp_file"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user