GUI works over headless ssh, does not work locally

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

GUI works over headless ssh, does not work locally

Postby fionnbharr » Fri Jan 14, 2022 3:28 pm

I've been running a RPi-3B as a remote/headless box for a while; all setup after the initial install was done over ssh. Xorg and LXDE were installed remotely, and everything's been working fine: ssh -X allows me to start whatever application I need, and the remote interface, while occasionally laggy, works just fine.

I happened to hook up a monitor and keyboard for the first time since the initial install, and startx displays a black/blank screen. I think that means X is actually working. But there's no mouse cursor, an unresponsive keyboard, no alternate TTY's. Even 'exec twm' in .xinitrc isn't helping things.

Suggestions towards getting a local graphical interface up and running are appreciated.
fionnbharr
 
Posts: 19
Joined: Mon Apr 20, 2015 12:48 am

Re: GUI works over headless ssh, does not work locally

Postby fionnbharr » Sat Jan 15, 2022 6:03 pm

The contents of ~/.xinitrc are being executed:

$this->bbcode_second_pass_code('', '$ ps aux | grep xterm
fionn 473 0.0 0.8 17004 7668 tty1 S 17:50 0:00 xterm -geometry 80x66+0+0 -name login
fionn 479 0.0 0.8 17020 7692 tty1 S 17:50 0:00 xterm -geometry 80x50+494+51
fionn 480 0.0 0.7 17080 7500 tty1 S 17:50 0:00 xterm -geometry 80x20+494-0
fionn 530 0.0 0.1 2728 1452 pts/3 S+ 17:58 0:00 grep xterm
')

And twm is also shows up as running.

So this means that xorg is working, but it's not able to display any of the specified/running xterms. The only error showing up in Xorg.0.log:
$this->bbcode_second_pass_code('', '[ 90.542] (EE) open /dev/fb0: Permission denied')

And, again, calling any graphical application (such as xterm) from an X-enabled ssh session shows up with no problem on the remote box; this is only a problem on the local box.

Still looking for suggestions.
fionnbharr
 
Posts: 19
Joined: Mon Apr 20, 2015 12:48 am

Re: GUI works over headless ssh, does not work locally

Postby Mettacrawler » Tue Jan 18, 2022 3:18 pm

Stack exchange "startx cannot open /dev/fb0: Permission denied"
https://unix.stackexchange.com/question ... ion-denied

Arch wiki "Rootless Xorg"
https://wiki.archlinux.org/title/xorg#Rootless_Xorg

To configure rootless Xorg using xinitrc:

    Run startx as a subprocess of the login shell; run startx directly and do not use exec startx.
    Ensure that Xorg uses virtual terminal for which permissions were set, i.e. passed by logind in $XDG_VTNR via .xserverrc.
    If using certain proprietary display drivers, kernel mode setting auto-detection will fail. In such cases, you must set needs_root_rights = no in /etc/X11/Xwrapper.config.

For the $XDG_VTNR part this is an example:

$this->bbcode_second_pass_code('', '$ cat .xserverrc
#! /bin/bash

exec /usr/bin/Xorg -nolisten tcp "$@" vt"$XDG_VTNR"')
Mettacrawler
 
Posts: 56
Joined: Sun Mar 18, 2018 7:19 pm

Re: GUI works over headless ssh, does not work locally

Postby fionnbharr » Thu Jan 20, 2022 3:13 pm

$this->bbcode_second_pass_quote('', 'S')tack exchange "startx cannot open /dev/fb0: Permission denied"
https://unix.stackexchange.com/question ... ion-denied

Arch wiki "Rootless Xorg"
https://wiki.archlinux.org/title/xorg#Rootless_Xorg


I've seen both of these; It's my understanding that the permission issues were fixed years ago (the first link is over seven years old); I've never had to adjust permissions before with Arch on any of my other RPi's. I've got two other Arch RPi's with working X locally -- I'm wondering what's different about this one.

For troubleshooting & grins, I swapped out the microSD card, and installed Manjaro on the new card -- because Manjaro is basically "pre-installed Arch+DE"; the symptoms are the same: X loads, but with a blank screen, and all applications can be accessed remotely using 'ssh -X'. I swapped out the microSD card again, this time using RaspbianOS -- and it works as expected with local graphics. A third swap with a brand-new Arch install has the same problem; no locally useable X, and since the permission issues have been fixed in recent releases, I don't believe that's the issue.

This suggests the issue is specific to Arch-based installs, what with the similar symptom using Manjaro, but not with others.

Did I miss something basic in the install process? I followed the instructions on Archlinuxarm.org, and then followed the General Recommendations in the Arch Wiki. Again, X runs, but there's none of the requested applications displayed.
fionnbharr
 
Posts: 19
Joined: Mon Apr 20, 2015 12:48 am


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 7 guests