Page 1 of 1
SqueezeOS launch chrome for HA panels - auth issue... ?
Posted: Thu May 16, 2024 5:31 pm
by grb
Hi,
Long time joggler user with SqueezeOS, trying to run chrome to show some HA panels. Updates to the HA login js don't work on chromium-browser on the older SqueezeOS
So I installed Debian Bullseye (Kernel 5.10) for OpenFrame version, running from USB, installed chrome, but can't launch:
"Authorization required, but no authorization protocol specified"
If I kill X and run it as the 'of' login, then I can run chrome, but not on the X launched at boot with Squeezeplay.
Any ideas how to 'be allowed' to run an X application on the existing X instance ?
Thanks,
grb.
Re: SqueezeOS launch chrome for HA panels - auth issue... ?
Posted: Fri May 17, 2024 3:33 pm
by grb
Some progress... X runs as the squeezeplay user, so running chromium as that user works, or running 'xhost local:' allows all local users access to the X display.
Next issue is trying to run chromium from a menu entry in Squeezeplay eg:
Code: Select all
text = self:string("CHROME"),
style = 'item_choice',
sound = "WINDOWSHOW",
callback = function(event, menuItem)
log:info(self:string("Opening Chrome Browser"))
os.execute('chromium')
end
Nothing seems to happen, presumably something about the env available when run from Squeezeplay ?
Executing a script which outputs to a file:
Code: Select all
/usr/bin/chromium --verbose --window-position=0,0 --window-size=800,600 'http://10.10.10.8:8123' >> /tmp/test.log 2>&1
gives the error:
Code: Select all
/usr/lib/chromium/chromium: symbol lookup error: /lib/i386-linux-gnu/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates
output of the env in the same script gives:
Code: Select all
SHELL=/bin/sh
LANGUAGE=en_GB:en
SDL_VIDEO_WINDOW_POS=0,0
PWD=/opt/squeezeplay/bin
LOGNAME=squeezeplay
SYSTEMD_EXEC_PID=329
XAUTHORITY=/home/squeezeplay/.Xauthority
WINDOWPATH=2
HOME=/home/squeezeplay
LANG=en_GB.UTF-8
SDL_VIDEO_ALLOW_SCREENSAVER=1
INVOCATION_ID=2f351af20a4147fc8a24a65d08625d44
SDL_NOMOUSE=1
LD_INCLUDE_PATH=/opt/squeezeplay/include:
KMP_DUPLICATE_LIB_OK=TRUE
USER=squeezeplay
SDL_AUDIODRIVER=alsa
DISPLAY=:0.0
SHLVL=2
LD_LIBRARY_PATH=/opt/squeezeplay/lib:
JOURNAL_STREAM=7:3078
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/squeezeplay/bin:/usr/sbin:/opt/squeezeplay/bin
OLDPWD=/
_=/usr/bin/env
Running xmessage in the script works, and shows a message over the top of the squeezeplay gui, and running chromium on the command line also works... but not via the Squeezeplay menu entry.
Any ideas ?
grb
Re: SqueezeOS launch chrome for HA panels - auth issue... ?
Posted: Fri Jun 14, 2024 5:46 am
by Edi
Hello,
It seems that the problem is related to the environment when you try to run Chrome from Squeezeplay. One avenue to explore would be to check the access permissions and the necessary environment variables. On this subject, it is essential to ensure the cybersecurity of your system, especially when you are managing scripts and user access. Make sure that all dependencies are properly configured and that security permissions are not an issue. I suggest you go to
hacker dna's page.
Re: SqueezeOS launch chrome for HA panels - auth issue... ?
Posted: Thu May 22, 2025 8:38 am
by ManceJoan
Sounds like you're running into Xauthority permissions. If you're launching chrome from a different user than the one who owns the X session (in this case, probably squeezeplay or a child of it), X11 will block it unless the user is authorized.
You could try running xhost +SI:localuser:of as the user who owns the X session (likely from an autostart script). That allows the of user to access the X server.
Alternatively, make sure you're setting the proper DISPLAY and XAUTHORITY environment variables when launching Chrome. Let us know how it goes!