• NetBSD
  • xdm now looping back problem

It just loops back, never starting X.

Things I have tried:

  • Used .xsession alone
  • Use .xinitrc alone
  • have both .xinitrc and .xsession identical and executable
  • have both files say "exec startx" for the minimal troubleshooting

How can I force uninstall xdm so that I might start over?

Are the generic default files available for /etc/X11/xdm/* ?

Boot in single-user mode, comment out xdm=YES in /etc/rc.conf and reboot multi-user.
Then, remove .xinitrc and .xsession and run startx to troubleshoot any configuration issue.
When startx works, you can uncomment xdm=YES in /etc/rc.conf and it will work.
If you have changed files in /etc/X11/xdm, you can just reinstall the x11 sets to restore original files.

  • 0x1b replied to this.
  • Jay likes this.

    xdm only uses .xsession not .xinitrc and the script shouldn't contain startx because it's xdm's job to start the x server. It should execute a window manager.

    • Jay likes this.

    20-100 I tried to reinstall xdm earlier, but that does not restore /etc/X11/xdm/files.

    I will keep trying.

      0x1b

      NetBSD has 2 versions of X, one installable in the form of "sets" selectable during installation, and another installable with pkgin. I don't remember if the later overwrites the files of the former, but it is possible it doesn't because pkgin installs under /usr/pkg.

      That said, don't mix both versions. If you need to reinstall the sets, you can find them under https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.1/amd64/binary/sets/. To reinstall configuration files you can just type:

      ftp -V -o - http://cdn.netbsd.org/pub/NetBSD/NetBSD-9.1/amd64/binary/sets/xetc.tar.xz | tar xf - -C /

      Of course, replace 9.1 and amd64 with your version and platform.

      • 0x1b replied to this.
      • Jay likes this.

        20-100 Yes.

        I reinstalled the base X sets last night and that fixed the issue. Everything seems to be working now. I'm going to try to customize xdm again, and do a better job at backing up the original files!

        • Jay likes this.

        Two dummy mistakes in case anyone else has this issue.

        Don't read the internet.

        In either .xinitrc or .xsessions, the command to launch xfce4 is: "xfce4-session"

        Some recommend "startxfce4" - this is not correct.

        PATH=$PATH:andtherestofthedirectorieshere
        must be in /etc/x11/xdm/Xsetup_0 (or whatever Xsetup file you use) or things will not work correctly.

        • Jay replied to this.

          If you use applications depending on dbus (e.g. firefox), you may want to put exec dbus-run-session xfce4-session in you .xsession (instead of exec xfce4-session). And of course make sure you have dbus=YES in /etc/rc.conf.

          0x1b I use
          exec ck-launch-session dbus-launch --exit-with-session xfce4-session

          “Only the paranoid survive.”

          ― Harold Finch
          NetBSD VPS , NetBSD , OS108

          • pin replied to this.

            Jay I use
            exec ck-launch-session dbus-launch --exit-with-session xfce4-session

            😮 You should perhaps reconsider the use of ck-launch, consolekit is no longer maintained, a sad side effect to the wide systemd adoption ☹️

            pin They are dropping ConsoleKit because they can use elogind. The elogind code is extracted from systemd and won't run on BSD and Solaris, where ConsoleKit is still needed. All the BSDs and Solaris are maintaining patches to various packages that restore ConsoleKit support.

            There have been various attempts to write a non-Linux logind shim but they didn't get anywhere.

            • pin replied to this.

              nia yes, this I know. I used consolekit until support was dropped, and I could no long avoid elogind.

              7 months later