• NetBSD
  • xfce4-battery-plugin renounces my user’s ability to startx.

The subject tells the story. Running a fresh NetBSD 10.1 system on a Lenovo T480s laptop. I am currently using the system without a login manager. After I installed xfce4-battery-plugin, on reboot, using the startx command was refused with an error message about a missing authorization file in /home/user. I assume that this is a bug, but might have something to do with me not using a login manager???

  • Jay replied to this.

    I think it's a coincidence. I'm pretty sure this is not related to xfce4-battery-plugin.

    rm ~/.serverauth* , make sure you have write access in your home directory, and make sure you startx as you. If that doesn't work, edit your startx and make sure it looks normal. (Maybe that package does mess with that??)

      anarchosax is your user in operator group? Also what's your rc.conf ?

      “Only the paranoid survive.”

      ― Harold Finch
      NetBSD VPS , NetBSD , OS108

        Jay Yes, my user is in operator group. Here is my rc.conf:

        dhcpcd=YES
        dhcpcd_flags="-qM iwm0"
        wpa_supplicant=YES
        wpa_supplicant_flags="-B -s -i iwm0 -D bsd -c /etc/wpa_supplicant.conf"
        hostname=ironhorse
        dhcpcd=YES
        dhcpcd_flags="-qM iwm0"
        wpa_supplicant=YES
        wpa_supplicant_flags="-B -s -i iwm0 -D bsd -c /etc/wpa_supplicant.conf"
        cgd=NO
        raidframe=NO
        wscons=YES
        dbus=YES
        avahidaemon=YES
        cups_browsed=YES
        cupsd=YES

        kc9udx Not finding any startx file. Here is a more precise quote of the error message:
        xauth: /home/user/.serverauth.1367 (or 1517) does not exist

          • Edited

          anarchosax what are the contents of /etc/hosts?

          EDIT:

          Here's mine removing my IP-address. It need to be formatted using domain hostname

          #	$NetBSD: hosts,v 1.9 2013/11/24 07:20:01 dholland Exp $
          #
          # Host name database.
          #
          # This file contains addresses and aliases for local hosts whose names
          # need to be resolvable during system boot; typically this includes only
          # the address and FQDN for this machine's hostname.
          #
          # By default this file is consulted before DNS, so adding additional
          # material here that then becomes out of date can lead to confusion.
          # See nsswitch.conf(5).
          #
          ::1			mybox.my.domain mybox
          xxx.x.x.x		mybox.my.domain mybox
          #
          # RFC 1918 specifies that these networks are "internal":
          # 10.0.0.0        -   10.255.255.255  (10/8 prefix)
          # 172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
          # 192.168.0.0     -   192.168.255.255 (192.168/16 prefix)

            kc9udx I think this is a xauth issues because /etc/hosts doesn't match domain and host names.

            pin The only difference that I see is my file has "localhost" instead of "mybox"...

            kc9udx Thanks for that. I had a look at the file, but to be honest, I have no idea what it is supposed to look like, but nothing obvious stood out...

              Hmm. Definitely irritating. I tried installing the plugin again to confirm behavior, which was the same. I removed again with pkg_delete -r. I tried running rm ~/.serverauth* which reported that there was nothing. I then rebooted and now every time that I try to startx, I get the xauth: /home/user/.serverauth.1367 (or 1517) does not exist and am unable to startx at all. Last time, I was able to save the situation by plugging in the laptop to a wall socket, but that doesn't work this time.

              anarchosax what's the modification date of startx? If it isn't recent I wouldn't worry about it.

              I still don't expect that package to be causing this problem though. It shouldn't be modifying startx, or anything else that could cause this problem. I've had this happen, but it's only been because my home directory wasn't writable by me (my home directory is NFS mounted so doesn't always exist).
              Do make sure you are the owner of your home directory and that it is writable by you.
              ls -ld ~ the permission bits should be 700 (at least).

                And now it works again, after another reboot 🤦‍♂️ Not sure what is going on, but definitely related to the plug-in. Not trying that again.

                  • Edited

                  anarchosax I don't know. If I were you I'd install the package again and see if the problem is repeatable. If it is, it needs to be reported to the package maintainer.

                  Well, I installed it and it didn't do any such thing to me. But I don't have xfce4 installed, I may try that.. I installed xfce4. Frankly it doesn't work. It just displays "—". I assume it gets its information from acpi or some other resource that my Pinebook Pro doesn't have. But it didn't affect me starting X. I was even able to start two different X sessions at the same time 🙂

                  Also note that sysutils/xbattbar is a pretty good choice. It works no matter what wm you use (or even if you don't use one!)

                    anarchosax xauth errors don't always lead to failure. Is localhost the output of hostname?

                      pin my hostname isn't in /etc/hosts, localhost is.

                      • pin replied to this.

                        kc9udx Every time I've add issues with xauth, this was the problem.

                          pin The output is the hostname that I set at install.

                          pin How did you solve the xauth issues?

                          kc9udx Frankly it doesn't work. It just displays "—".

                          That is the same result that I got. However, my startx problem was alarming in my opinion…