How I got this installing headless on Pi5 over SSH (being blind) #121
tgeczy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Wanted to write in about this as I just love love this project. Something I could totally see myself getting into in college or late high school, now I'm too much of in the corporate world to have time and explore things like this. But you're carrying it forward!
I'm fully blind, use screen readers. Generally this means Linux accessibility can be patchy, so I stick to Mate and GTK, no Wayland for me until they get their act together!
Often I'm running my Pi just over SSH and my Windows machine in general. This is easy for quick and dirty work, but I was a bit sad when the firstboot prompt told me that a desktop must be attached. Of course, over SSH, unless you connect to X11 or another remote protocol, you're not going to have env vars set for even having one, despite a Lightdm greeter session running, la sigh...
That's OK, Linux is Linux, so I hacked around it.
Using XVFB! (X Virtual Framebuffer.) This allows me to at least get a dummy session up and going, so the script and Qemu can initialize a software-based display driver and get things going.
So, grab XVFB (sudo apt install xvfb) and go forth with these commands!
commands:
Xvfb :99 -screen 0 1280x720x24 &
export DISPLAY=:99
export LIBGL_ALWAYS_SOFTWARE=1
export GALLIUM_DRIVER=llvmpipe
(end of commands here)
This creates the right display for your session, and now you can run bvm/bvm firstboot ~/win11.
Would be neat to see this made into a headless form for folks such as myself or anyone who just needs that convenience. Now you know the secret. :) Since those vars get exported, no complaints about not being able to open your framebuffer device. Oh, and for some reason with SSH you get a weird permission error about the KVM module. Solve that by running "sudo usermod -aG kvm $USER" - then logging out, logging in. Boom.
All this to say, it's such a neat little script and GUI. I'm not sure if reduce_graphics sets gl to off for real, I would rather not have any 3D graphics anyway, but hey, that's just me, don't need em. reduce_graphics=true never touches QEMU’s OpenGL switch. Also unfortunate, I want there to be a way to just always begin with GL=off.
Not well documented, but there: A shiny command, "bvm boot-ramfb ~/win11". (replace that last part with your path) it's good from console, but the ramfb path simply isn’t wired into the GUI list. I'd have to inspect that a bit more to figure out how I could get it there.
In the meantime, (and I didn't like to do it, I replaced all instances of gl=on to gl=off in the script. Plan to go back to the regular copy as this is not viable long-term, but if you feel like it's sluggish (especially in direct-full mode, in Ramena it may do better), run: "sed -i 's/gl=on/gl=off/g' ~/bvm/bvm" (or where your script is.) This will change them, but a big warning: it will blind-replace (pun intended!) every literal gl=on in the file with gl=off, including boot-gtk, Direct, and the default CLI boot mode. Right now this has little consequence, but later when Qemu gets hardware-backed 3D-rendering, it will not be good. So again, now you know why I say not long-term!
Gone on long enough, but these tips should get anyone who's blind (or heck, just wanting to get this running headless, ignore my yammering on in the last part) going successfully from start to finish. Hats off for this project and I hope it keeps growing!
Beta Was this translation helpful? Give feedback.
All reactions