mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 02:00:06 +02:00
SteamVR's tools find SteamVR from a terminal in the Frametop desktop
The desktop has its own XDG_CONFIG_HOME (~/.config/frametop), and SteamVR's tools and OpenVR read their path registry from there. So from a terminal in the desktop: - pointer/driver/install.sh (install.sh step 4, every reinstall or update from Konsole) wrote a new registry, ~/.config/frametop/openvr/openvrpaths.vrpath, with only our driver and "runtime": null, and never registered the driver with SteamVR. That stray file then hid SteamVR from every OpenVR program started in the desktop. - scripts/update-check.py (and so doctor.sh and report.sh) reported OpenVR "can't connect to SteamVR as a background app" (VRInitError_Init_PathRegistryNotFound, or InstallationNotFound with the stray file) and "vrcmd --overlays lists no overlays". A user's report of 2026-10-05 showed both, with SteamVR and Frametop's services fine. - ft-layout's vrcmd calls (the gamescope backend) found no overlays. They now run with XDG_CONFIG_HOME=~/.config: the driver installer (install, uninstall, probe, aimhere), update-check.py (for all its checks: nothing there reads the desktop's own config), report.sh's vrpathreg show, and ft-layout's vrcmd. report.sh doesn't set it for the whole report, since session/fix-panels.py --check reads the desktop's Plasma config through it. The driver installer also removes the stray registry (only vrpathreg's, with no runtime), and update-check.py warns about one. And vrpathreg runs `xdg-open vrmonitor://driverinstalled` to tell SteamVR's desktop monitor, which the Frame doesn't have: in the desktop that showed "could not read file vrmonitor://driverinstalled" on every install. A stand-in xdg-open on its PATH takes it, so install.sh no longer filters the step's output. Tested in a fake HOME with a copy of SteamVR's registry, a stray one, and the desktop's XDG_CONFIG_HOME: the new installer removes the stray file, registers the driver in the copy, and never reaches xdg-open; the old one wrote the stray file, left the copy alone, and ran xdg-open. update-check.py from that environment: OpenVR and vrcmd ok (the old one fails both); its stray-registry warning fires on a seeded file. ft-layout's vrcmd: 119 overlays (was 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d39fbb9146
commit
307e2b7308
6 files changed
+40
-9
No files matched your search
@@ -14,6 +14,10 @@ frame="$root/scripts/frame.sh"
|
||||
src=$FRAME_REPO/pointer/driver
|
||||
dest='$HOME/.local/share/frametop/ft_pointer' # expanded on the Frame, in the commands below
|
||||
reg='/opt/steamvr/bin/linuxarm64/vrpathreg'
|
||||
# SteamVR's tools with SteamVR's config folder and libraries. A terminal in the Frametop desktop
|
||||
# has XDG_CONFIG_HOME=~/.config/frametop (session/frametop-session.sh), where vrpathreg finds no
|
||||
# registry, so it made one there that SteamVR never reads.
|
||||
steamvr='env XDG_CONFIG_HOME=$HOME/.config LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64' # expanded on the Frame
|
||||
|
||||
case ${1:-install} in
|
||||
install)
|
||||
@@ -21,6 +25,11 @@ case ${1:-install} in
|
||||
# Replacing the files of a driver SteamVR has loaded leaves its input bindings in a bad
|
||||
# state (the 3D mouse no longer gets the laser) until SteamVR restarts, so an unchanged
|
||||
# driver is left alone.
|
||||
# A registry an earlier install made in the desktop's config folder (see steamvr above) has
|
||||
# no SteamVR in it, and hid SteamVR from OpenVR programs started in the desktop
|
||||
# (VRInitError_Init_InstallationNotFound): it goes.
|
||||
# vrpathreg runs 'xdg-open vrmonitor://driverinstalled' for SteamVR's desktop monitor, which
|
||||
# the Frame doesn't have, so the desktop said "could not read file": a stand-in takes it.
|
||||
"$frame" --host "set -e; test -f $src/build/driver_ft_pointer.so
|
||||
rm -rf $dest.new; mkdir -p $dest.new/bin/linuxarm64
|
||||
cp -r $src/ft_pointer/. $dest.new/
|
||||
@@ -31,15 +40,22 @@ else
|
||||
rm -rf $dest; mv $dest.new $dest
|
||||
echo 'installed; restart SteamVR to load it'
|
||||
fi
|
||||
LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg adddriver $dest
|
||||
LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg show | grep -A3 -i 'external'" ;;
|
||||
stray=\$HOME/.config/frametop/openvr/openvrpaths.vrpath
|
||||
if grep -qs '\"jsonid\" : \"vrpathreg\"' \$stray && grep -qsE '\"runtime\"[[:space:]]*:[[:space:]]*null' \$stray; then
|
||||
rm -f \$stray; rmdir \$HOME/.config/frametop/openvr 2>/dev/null || true
|
||||
echo 'removed a SteamVR path registry an earlier install left in ~/.config/frametop/openvr'
|
||||
fi
|
||||
noopen=\$(mktemp -d); trap 'rm -rf \$noopen' EXIT
|
||||
printf '#!/bin/sh\nexit 0\n' > \$noopen/xdg-open; chmod +x \$noopen/xdg-open
|
||||
PATH=\$noopen:\$PATH $steamvr $reg adddriver $dest
|
||||
$steamvr $reg show | grep -A3 -i 'external'" ;;
|
||||
uninstall)
|
||||
"$frame" --host "LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg removedriver $dest; rm -rf $dest; echo 'removed; restart SteamVR to unload it'" ;;
|
||||
"$frame" --host "$steamvr $reg removedriver $dest; rm -rf $dest; echo 'removed; restart SteamVR to unload it'" ;;
|
||||
send)
|
||||
"$frame" --host "python3 -c 'import socket,sys; s=socket.socket(socket.AF_UNIX,socket.SOCK_DGRAM); s.sendto(sys.argv[1].encode(), \"\\0ft_pointer\")' $(printf %q "${2:?command}")" ;;
|
||||
probe) "$frame" -C pointer/probe 'LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 ./build/vrprobe' ;;
|
||||
probe) "$frame" -C pointer/probe "$steamvr ./build/vrprobe" ;;
|
||||
aimhere)
|
||||
read -r yaw pitch < <("$frame" -C pointer/probe 'LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 ./build/vrprobe' | sed -n 's/^head yaw = \([-0-9.]*\) pitch = \([-0-9.]*\)$/\1 \2/p')
|
||||
read -r yaw pitch < <("$frame" -C pointer/probe "$steamvr ./build/vrprobe" | sed -n 's/^head yaw = \([-0-9.]*\) pitch = \([-0-9.]*\)$/\1 \2/p')
|
||||
[ -n "${yaw:-}" ] || { echo "head pose not valid (headset off?)" >&2; exit 1; }
|
||||
"$0" send "aim $yaw $pitch" && echo "aimed at yaw $yaw pitch $pitch" ;;
|
||||
log) "$frame" --host "grep -iE 'ft_pointer' ~/.local/share/Steam/logs/vrserver.txt | tail -n ${2:-20}" ;;
|
||||
|
||||
Reference in new issue
Block a user