:: Re: [DNG] window manager fails to c…
Top Page
Delete this message
Reply to this message
Author: Ralph Ronnquist
Date:  
To: dng
Subject: Re: [DNG] window manager fails to connect to XServer
On Thu, Mar 21, 2024 at 06:18:41AM -0400, Haines Brown via Dng wrote:
> On Thu, Mar 21, 2024 at 10:29:51AM +1100, Ralph Ronnquist via Dng wrote:
>
> Ralph, thanks for your patience!


I see a couple more of lines of inquiry before I'm out of ideas...

> My .xinitrc is:
>
> #!/bin/sh
> #
> # ~/.xinitrc
> #
> # Executed by startx (run your window manager from here)
>
>   if [ -d /etc/X11/xinit/xinitrc.d ]; then
>     for f in /etc/X11/xinit/xinitrc.d/*; do
>       [ -x "$f" ] && . "$f"
>     done
>     unset f
>   fi

>
> exec startfluxbox


Firstly re ~/.xinitrc:
1) is there something in /etc/X11/xinit/xinitrc.d ?
   One possibility is that it has a script fragment that causes Xorg
   to exit prematurely.
2) you could insert a line at the top, below the 5th '#' line:
        pgrep -a Xorg >&2
   and also, just above that "exec startfluxbox line", insert the two lines:
        sleep 2
    pgrep -a Xorg >&2


Those lines (assuming you have pgrep installed) will/should print the
running Xorg command line, and normally look something like:
    1815 /usr/lib/xorg/Xorg :0 vt7 -nolisten tcp -auth ...


That output will/should appear in the terminal where you run startx.

In your case there might be a) no output, b) one line of output or c)
2 lines of output.

If (a), it means that Xorg has exited even before the script is run,
and then your issue is firmly isolated to the Xorg startup. Perhaps
something with the graphics (as tempforever noted), perhaps something
with that barcode reader you seem to have connected, and perhaps
something else. It may also be Xorg itself dropping dead before the
script is run. (If (a) is the result then you will need to go one step
deeper into the Xorg startup scripting to extract the start command)

If (b), it suggests there is something with some script snippet in
/etc/X11/xinit/xinitrc.d causing Xorg to drop dead.

If (c), it suggests firmly that there is something with the fluxbox
startup. Either that something causes Xorg to exit first or that
fluxbox terminates (which also results in Xorg terminating [but
usually not silently]).

The reason for viewing the Xorg command line is so you can try that
directly as command and then its stderr output, if any, will come
directly into that shell rather than being captured by startx and
whatnot.

Also, to run Xorg requires the running user to have access to the
input streams (/dev/input), to the VT control (/dev/tty0 and /dev/ttyN
wherein Xorg starts), and to the graphics (typically /dev/drm/card0).
That access is ensured either by appropriate file mode settings for
the device nodes concerned or partly via some daemon that mediates
access (seatd or elogind+dbus).

Perhaps that can lead you closer to the core problem...

Ralph.

>
> Xorg.0.log starts:
>
>   [293324.757]
>   X.Org X Server 1.21.1.7
>   X Protocol Version 11, Revision 0
>   [293324.757] Current Operating System: Linux lenin 6.1.0-17-amd64 #1 
>     SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86>
>   [293324.757] Kernel command line: BOOT_IMAGE=/vmlinuz-6.1.0-17-amd64 
>     root=UUID=c581c272-29b9-40d1-81a6-1a33ed539bb9 ro
>   [293324.757] xorg-server 2:21.1.7-3+deb12u2devuan1 
>     (https://www.devuan.org/os/community)
>   [293324.758] Current version of pixman: 0.42.2
>   [293324.758]    Before reporting problems, check http://wiki.x.org
>     to make sure that you have the latest version.
>   [293324.758] Markers: (--) probed, (**) from config file, (==) 
>     default setting,
>     (++) from command line, (!!) notice, (II) informational,
>     (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
>   [293324.758] (==) Log file: 
>     "/home/haines/.local/share/xorg/Xorg.0.log", Time: Thu Mar 21 
>     05:05:58 2024
>   [293324.759] (==) Using system config directory 
>     "/usr/share/X11/xorg.conf.d"
>   [293324.759] (==) No Layout section.  Using the first Screen 
>     section.
>   [293324.759] (==) No screen section available. Using defaults.
>   [293324.759] (**) |-->Screen "Default Screen Section" (0)
>   [293324.759] (**) |   |-->Monitor "<default monitor>"
>   [293324.759] (==) No monitor specified for screen "Default Screen 
>     Section".
>     Using a default monitor configuration.
>   [293324.759] (==) Automatically adding devices

>
> There are warnings that don't seem significant
>
>   [293324.910] (II) modeset(0): using drv /dev/dri/card0
>   [293324.910] (WW) Falling back to old probe method for fbdev
>   [293324.910] (II) Loading sub module "fbdevhw"
>   [293324.910] (II) LoadModule: "fbdevhw"
>   [293324.911] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
>   [293324.911] (II) Module fbdevhw: vendor="X.Org Foundation"
>   [293324.911]    compiled for 1.21.1.7, module version = 0.0.2
>   [293324.911]    ABI class: X.Org Video Driver, version 25.2
>   [293324.911] (WW) VGA arbiter: cannot open kernel arbiter, no 
>     multi-card support
>   [293324.911] (II) modeset(0): Creating default Display subsection in 
>     Screen section 

>
> It terminates abruptly:
>
>   [293325.180] (II) XINPUT: Adding extended input device "Barcode 
>     Reader  Consumer Control" (type: KEYBOARD, id 17)
>   [293325.180] (**) Option "xkb_model" "pc105"
>   [293325.180] (**) Option "xkb_layout" "us"
>   [293325.180] (**) Option "xkb_options" "compose:ralt"

>
> as for ~/.xsession-errors, no file was created when non-root user
> logged in and ran startx.
>
> In /var/log I find that startx created a big binary wtmp file and a
> syslog. I find that syslog has changed its format. Its lines used to
> start like Mar 17 13:45.... In the syslog today they start
> 2024-03-20T22:37:33.488234-04:00... It looks not only a sensible new
> date format but that it seems garbled.
>
> Oddly, auth.log has mostly dozens of open and close of CRON [22238]:
> pam_unix(cron:session)by root user. But what worries me is
>
>   sudo:   haines : TTY=pts/2 ; PWD=/var/log ; USER=root ; 
>     COMMAND=/usr/local/bin/nano syslog
>   sudo: pam_unix(sudo:session): session opened for user root(uid=0) by 
>     (uid=1000)

>
> root did not not log in.
>
> When I'm prompted for password with when I issue $ su command, my
> password is now the same as that for user. I usually have passwords
> that differ a bit, but I could be wrong. It is possible that when
> non-root user does $ startx it opens X that belongs to root rather
> than non-root user?
>
> --
>
>      Haines Brown 
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng