[PLUG] Connect BT keyboard to headless Raspberry

Eric House eehouse at eehouse.org
Sun Jan 23 21:45:24 UTC 2022


On Sun, Jan 23, 2022 at 12:00 PM <plug-request at pdxlinux.org> wrote:

>
> The trouble with tmux was that it defaulted to a small screen and would not
> resize.  Here is a method to get around that. It requires booting into the
> Desktop Gui instead of the console. This allows you to set the resolution
> of the display. I was never able to figure out how to set the resolution of
> the console display, but you can change the resolution of the Gui display.
>
> FIrst in the raspi-config boot options set Desktop-Autologin as the Pi
> user.
>
> Then edit /boot/config.txt
> add the following three lines to force the Pi to think it has an HDMI
> display of a certain size.
>
> hdmi_force_hotplug=1
> framebuffer_width=1900
> framebuffer_height=1024
>
> Make the width and height to match the size you want on the ipad.
>
> and if the following line is present comment it out
> dtoverlay=vc4-kms-v3d
>

Thanks Bill, and to the whole group. It's working now!

It turns out all that I needed to do was edit /boot/config.txt to add the
three hdmi and framebuffer lines and to comment out the dtoverlay line. I
didn't need to make the Pi boot into the Desktop.
(Caveat: maybe it always has. I used 'systemctl set-default
multiuser.target' to put it in console mode.) With my .bashrc change,
/dev/tty1 creates and joins the "main" tmux session on boot, so once you
connect with the iPad you can ctrl-b : list-clients and see how big the
keyboard's console is. Do a bit of math and change the numbers in
config.txt so it'll be the same as the iPad's screen and presto!

The one remaining weirdness is that the command buffer, brought up by
ctrl-b:, is not mirrored. I'm living with that. Perhaps if I weren't a tmux
noob it'd bother me, but not now. :-)

Thanks again,

--Eric



More information about the PLUG mailing list