vincent-1lg
Posts: 5
Joined: Tue Nov 24, 2020 1:58 pm

does x-windows require a physical monitor?

Sun Jan 03, 2021 8:02 pm

Does this question already seem weird?

I do hope so! So the idea is simple: I have my very own Raspberry Pi 400 with Raspberry PI OS lite on it. It works great so far. Sometimes I use SSH to connect to it, sometimes I just use the builtin keyboard and plug in my Braille display, since I'm blind (and deaf, so a Braille display is pretty much all I need, and all I get).

Tonight I thought I would be testing one of the desktops I heard about, and after some thought I chose mate, mostly because it seems to behave relatively well with Orca. So I followed instructions to install Mate with apt, then configured a bit to have Orca start up with the desktop application (something useful for me!). I didn't install a login manager, because I'm quite happy with the console as-is, and just want to test (and start manually, if needed) the desktop, so I'm happy starting it in my console.

So I thought, rather triumphantly, I was done, with `xinit` set, no error that I could see. So I typed in `startx` and was ready to exclaim in amazement at my own good luck for once, when, after a few seconds, Xorg complained:

No screen.

Duh, there's no screen! There's a builtin keyboard. There's no mouse. There's nothing but a RJ45 connection, a Braille display and a guy nearby wondering what on earth is wrong. Does X require a monitor to work? Well, that might be a stupid question, but I wasn't expecting to buy one (a monitor isn't all that cheap as that, and I won't use it anyway). I tried to search the web a bit and it seems like Xorg doesn't really need a physical minotir, since it can work through a connection... assuming there's a screen on the other hand. Which isn't my case, of course. Last time I used a desktop environment that was Gnome on a Ubuntu machine a few years back), I did have a screen, though it sat on my desk, switched off all the time. All I know is `startx` didn't complain by then, but since I had a login manager at the time, I wasn't running it manually.

So: can't I run X without a physical monitor? Remember that for me, the beautify of the screen in picture is really not the point. Rather, I would like to see how Orca plays with the accessibility API under Linux and possibly get more comfortable with a good file manager and perhaps a good editor (yes, these things do exist in the console).

If you have any tip, thanks for sharing! I hope I explained the situation clearly.

Vincent

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13541
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 1:00 am

modified the topic, a bit.

pidd
Posts: 1514
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK
Contact: Website

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 3:49 am

In normal RPiOS

There doesn't have to be a physical monitor, but it does have to have a framebuffer, you achieve this by forcing screen output even though there is no hdmi connected.

edit /boot/config.txt to have

Code: Select all

hdmi_force_hotplug=1
From ssh you can't easily start the gui, the normal trick is to use settings in raspi-config to boot to gui instead of cli. This won't affect your ssh into the Pi.

There probably is a way to to start the gui from ssh.

User avatar
Gavinmc42
Posts: 5062
Joined: Wed Aug 28, 2013 3:31 am

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 3:58 am

I have made 4K framebuffers on a Zero.
Draw to the FB and then copied the FB to a bitmap on a ramdrive and then converted that to a jpg and saved the jpg to uSD.
No need for a screen.
There is a limit to the framebuffer size, I think it was 4096x4096?
Now changed in Pi4 to 7680x7680?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

vincent-1lg
Posts: 5
Joined: Tue Nov 24, 2020 1:58 pm

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 9:32 am

Thanks for your reply!

So editing the boot config did the trick. I edited and rebooted and then just logged in and entered startx (I was connected to the Rpi directly, through USB, using the builtin keyboard) and things went pretty smoothly. I was told Orca was starting and it started correctly, since my Braille display started seeing what was going on, but then somehow Orca didn't go on. This time I assume it's because I don't have an audio output on the pi, or perhaps I have to tweak about a bit, but that's probably a problem with Orca.

So thanks! If I have to try with a sighted user (and with a monitor), I assume I'll have to comment that line in my boot config? In any case, thanks for the tip, it did work!

Cheers,

Vincent

pidd
Posts: 1514
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK
Contact: Website

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 2:49 pm

vincent-1lg wrote:
Mon Jan 04, 2021 9:32 am
If I have to try with a sighted user (and with a monitor), I assume I'll have to comment that line in my boot config?
Probably not, it just forces the hdmi on.

If it is booted with the hdmi screen attached then it will read the edid from the hdmi screen and work normally.

If it is booted without the screen attached and if the resolution it is forced to is compatible with the hdmi screen attached then it will still work.

User avatar
Gavinmc42
Posts: 5062
Joined: Wed Aug 28, 2013 3:31 am

Re: does x-windows require a physical monitor?

Mon Jan 04, 2021 10:05 pm

I had one uSD config still set for a 480x320 LCD.
Boy did I get big boot text on a DVI 1280 x 1024 monitor ;)
Good for visual impaired or reading from a distance.

I suspect the HVS, Hardware Vector Scaler was doing some magic.
Taking the 480 x 320 framebuffer and scaling it to 1280 x 1024?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Assistive technology and accessibility”