[solved] Xorg and non-root startx?

Forum Forums Official Releases antiX-21/22 “Grup Yorum” [solved] Xorg and non-root startx?

  • This topic has 27 replies, 7 voices, and was last updated Apr 15-9:03 pm by techore.
Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
  • #117844

      Which package are you talking about that’s version 21.1.7-3.0nosystemd3? My Xorg is listed as 1:7.7+23.

      On antiX 23:

      $ apt policy xserver-xorg-core
        Installed: 2:21.1.7-3.0nosystemd3
        Candidate: 2:21.1.7-3.0nosystemd3
        Version table:
       *** 2:21.1.7-3.0nosystemd3 500
              500 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bookworm bookworm/nosystemd amd64 Packages
              100 /var/lib/dpkg/status
           2:21.1.7-3 500
              500 http://ftp.de.debian.org/debian bookworm/main amd64 Packages

      When you startx on tty2, is that also where the X session starts?

      I think it does. I need to look into the xorg log again, but I do think it starts on the same tty as it is launched. What I realized is that switching tty would bork the system, though my tests were done on live-USB, so maybe it is something else.

      For those that have Xorg fail to start, please share the error found in $HOME/.local/share/xorg/. It fails for me when starting from greetd, the error starting at:

      [    27.089] (II) FBDEV: driver for framebuffer: fbdev
      [    27.089] (II) VESA: driver for VESA chipsets: vesa
      [    27.089] (EE) 
      Fatal server error:
      [    27.089] (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
      [    27.089] (EE) 
      [    27.089] (EE) 
      Please consult the The X.Org Foundation support 
      	 at http://wiki.x.org
       for help. 
      [    27.089] (EE) Please also check the log file at "/home/demo/.local/share/xorg/Xorg.0.log" for additional information.
      [    27.089] (EE) 
      [    27.089] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
      [    27.089] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
      [    27.089] (II) seatd_libseat finish
      [    27.141] (EE) Server terminated with error (1). Closing log file.

      As @anti-apXos mentioned, needs_root_rights = yes was required by systems with videocards that couldn’t use the KMS (Kernel modesetting) and directly use the xorg-drivers and not modesetting. If you have an xorg configuration set to use an xorg driver, it is likely you still need root rights. seatd was probably included in the xorg package to separate the hardware access from the xorg server, but maybe it cannot separate the need of xorg video drivers.

      Extra note: I got it to work with greetd on my installed system (running antiX with testing repos), but it could be related to me having packaged seatd to support elogind, which the default antiX package doesn’t out of the box.


        Just want to say thanks for this. I built on top of 23.1 Core, updated, and built the minimal TWM environment, and went one tiny step further. Some lurker info too..

        But it was a bit simpler with 23.1, as non-root all I had to do was:

        sudo apt install xorg xinput twm xterm fonts-dejavu

        Of course I created an invisible .xinitrc in my home directory for demo before I could fire up X with startx:

        xterm &
        exec twm

        Startx works just fine as a non-root user startup.

        The need for the dejavu font was that when you CTRL-right-click on an xterm window, it will pull up an easy config. I told it to use TTF fonts, and set the font either huge or enourmous. Better for my high-res screen. TTF font looks nice of course.

        But my days of tweaking xterm configs are best left to experts. So I added an additional terminal with tabs that was relatively simple. Sakura. To configure it, it is just like xterm, ctrl-right-click on a window, or simply right-click in the window to set it up to your liking.

        sudo apt install sakura

        I also added RoxTerm for good measure. Also tabbed, so it makes it a bit more convenient full screen than having multiple xterms all over the place. Obviously this is just a subjective thing adding roxterm or sakura. Didn’t know if I should have used the gtk2 or gtk3 version of roxterm though, but it still played.

        Funky TWM tip if one has never used it: it seems counter-intuitive, but when resizing the window by left-click-hold of the resize button, moving the mouse OUTSIDE the window and back inwards seems a smoother quicker operation than heading inside to grab the window edge. Very cool.

        To fire up this additional new terminal, from xterm itself, I just run

        sakura &

        Sorry – too much info, but Core is too much fun!!


          Sorry – too much info, but Core is too much fun!!

          Not too much information and folks may have missed anticapitalista’s change.

          I have been running without the wrapper modification as non-root for six or so months and knock-on-wood no surprises so far.


            For me, starting a session directly from the console login without slimski requires seatd running in order to have keyboard and mouse/touchpad. This is even with the default antiX WMs like IceWM and herbstluft.

            If I log in with slimski, seatd is not needed, though. Can anyone explain how slimski sets up the session so that it doesn’t require seatd?

            Is seatd ever needed if you’re also using slimski?


              Is it using elogind as an alternative to seatd? I am reasonably certain a session manager is still needed but I do not use slimski so I could be wrong.


                I don’t think I have elogind. This is with antix 23.x and I haven’t installed it.

                Example of the running system

                $ sudo ps_mem.py
                 Private  +   Shared  =  RAM used	Program
                112.0 KiB +  37.5 KiB = 149.5 KiB	runit
                128.0 KiB +  47.5 KiB = 175.5 KiB	runsvdir
                464.0 KiB + 190.5 KiB = 654.5 KiB	watch
                296.0 KiB + 365.0 KiB = 661.0 KiB	getty (2)
                452.0 KiB + 229.5 KiB = 681.5 KiB	dbus-launch
                364.0 KiB + 426.5 KiB = 790.5 KiB	icewm-session
                728.0 KiB +  69.5 KiB = 797.5 KiB	dbus-daemon
                  1.0 MiB +  85.5 KiB =   1.1 MiB	keyd
                748.0 KiB + 410.0 KiB =   1.1 MiB	runsv (8)
                828.0 KiB + 664.5 KiB =   1.5 MiB	desktop-session
                944.0 KiB +   1.0 MiB =   1.9 MiB	sudo (2)
                  1.8 MiB + 683.5 KiB =   2.4 MiB	bash
                  1.9 MiB +   1.2 MiB =   3.1 MiB	udevd (2)
                  2.8 MiB +   2.1 MiB =   4.8 MiB	slimski
                  4.7 MiB +   2.2 MiB =   6.9 MiB	urxvtd (2)
                  8.2 MiB +   3.0 MiB =  11.2 MiB	icewm
                 90.1 MiB +   2.0 MiB =  92.2 MiB	Xorg
                                        130.0 MiB

                My understanding was that elogind or seatd were only needed for certain DEs and all Wayland compositors, but most (or all?) X window managers would work without either. But then, even IceWM didn’t work without seatd when I didn’t login via slimski, so I’m confused by the whole situation.

                I suppose I should try some DEs with slimski and no seatd to see if I can figure it out. Only one I’ve tried is Enlightenment (and it worked without seatd). I guess I’ll try Xfce or one of the Wayland ones or something.


                  Warning – may be tangential/irrelevant.

                  I understand that seatd is a seat manager not a session manager. And I thought the seat manager provides access to hardware for a “seat” (mouse, keyboard, screen) while the session manager controls the processes running on the computer.

                  I have the opposite setup from anti-apXos. I don’t have slimski installed. My Sid system uses seatd, with Xorg started by startx.

                  To work, it requires that I setup the XDG_RUNTIME_DIR before starting X with startx. I have this setup in my /home/user/.profile file.

                  Do you folks have a specific setting for XDG_RUNTIME_DIR?


                    @stevesr0, you may find the link below helpful.


                    @anti-apxos, apt info states there is a dependency on default-logind, logind, consolekit, or stead. Assuming the control file’s information is current, it requires one of those at install or equivalent.

                    Package: slimski
                    Version: 1.5.0-6.0antix8
                    Priority: standard
                    Section: main
                    Maintainer: skidoo <email@redact.ed>
                    Installed-Size: 1,128 kB
                    Provides: x-display-manager
                    Depends: libc6 (>= 2.17), libgcc-s1 (>= 3.0), libjpeg62-turbo (>= 1.3.1), libpam0g (>=, libpng16-16 (>= 1.6.2-1), libstdc++6 (>= 5.2), libx11-6, libxft2 (>> 2.1.1), libxmu6, debconf (>= 1.2.9) | debconf-2.0, default-logind | logind | consolekit | seatd
                    Recommends: xvkbd, scrot
                    Suggests: xauth
                    Homepage: https://gitlab.com/skidoo/slimski
                    Download-Size: 756 kB
                    APT-Sources: http://la.mxrepo.com/antix/bookworm bookworm/main amd64 Packages
                    Description: desktop-independent graphical login manager for X11
                     slimski enables users to initializate a graphical session by entering
                     username and password in a login screen.
                     slimski is configurable via themes and via an options (conf) file.
                     It is suitable for machines that do not require remote logins.

                    Can someone more familiar with slimski chime in?

                    • This reply was modified 1 month, 1 week ago by techore.

                      Hi techore, that is the post I looked at before commenting yesterday <g>.

                      Since posting, I rechecked my previous posts. I was incorrect in linking the RUN_TIME_DIR script to starting Xorg. Apologies.

                      I just read that Xorg has a default session manager (xsm). So possibly, the “usual” (full) antiX install has slimski as a display manager, seatd as a seat manager and either xsm or a specific desktop associated program as the session manager.

                      When I get to my Linux computers, I will check what is running at the command line and in X.

                      • This reply was modified 1 month, 1 week ago by stevesr0.

                        @stevesr0, no worries. It is all good, brother.


                          Hi techore,

                          Used htop to see if xsm was running. Not listed either on the command line or in a terminal within X.

                          Looked at the documentation for xsm – didn’t clarify that it should still be running after starting X.


                            Adding my login user account to the “input” group lets me to start an X session without either slimski or seatd and still have keyboard/mouse. @anticapitalista actually briefly suggested that earlier in this thread, but I hadn’t tried it since the context was different and I didn’t understand seatd’s function to know that that would be necessary with it disabled.

                            From the seatd manpage:

                            seatd provides central seat management, mediating access to shared resources such as displays and input devices in a multi-session, multi-seat environment.

                            I didn’t really understand enough to make sense of that before, but I guess now that it means users don’t have to be members of the “input” or “video” groups, which can be a security issue on systems with multiple simultaneous users. My laptop does not have multiple simultaneous users, so I’m not concerned about that. Can anyone say if this is all that seatd does?

                            slimski runs as root and starts the X session as root, which always has access to input and video devices, so that’s why slimski works without seatd. It’s pretty much the same as using the xserver-xorg-legacy driver with “needs_root_rights=yes,” which obviously also works. I guess neither of these would be considered truly “rootless” X sessions. They’re sort of an intermediate level of rootiness between “sudo startx” and “startx” with seatd or the user added to “input” and “video”

                            I still wasn’t able to start the X session on a different tty than the one I logged in on (which is preferable so that I can switch back and see the console output if needed). This works and is the default with slimski or xserver-xorg-legacy, but also doesn’t work when using seatd without slimski. I added my user to the “tty” group, but it still didn’t work since the default permissions for the /dev/tty* devices don’t have read permission even for group members. I added “chmod 660 /dev/tty3” to my rc.local file and now starting my X session on tty3 after logging in on tty1 works, which is what I wanted. Kind of a janky solution, but whatever.

                            In the end, I don’t know that I will use my system this way long term. It works perfectly as far as I can tell, but I also have no issue using either slimski or seatd (or both), so what’s the point? Well, I guess the point is at least now I feel like I understand these services better.


                              Interesting. A use case I have not needed but interesting nonetheless.

                              @anti-apxos, appreciate the question and your observations.

                            Viewing 13 posts - 16 through 28 (of 28 total)
                            • You must be logged in to reply to this topic.