• OwOarchist@pawb.social
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 days ago

    the only way I can connect to wifi now is via command line

    On the plus side, you’ll look like a super-leet haxor to your friends when you do this in front of them. Be sure to say, “Okay, I’m in” once it connects.

          • pet the cat, walk the dog@lemmy.world
            link
            fedilink
            arrow-up
            5
            ·
            edit-2
            1 day ago

            Presumably they can also make it run at startup.

            But I’m just suggesting a solution for the existing situation, not saying that the distro should work this way.

            • Allero@lemmy.today
              link
              fedilink
              arrow-up
              2
              ·
              24 hours ago

              Sure thing, I was just joking around. This should solve the issue. Although it’s still weird that this issue exists in the first place.

        • Pika@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          21 hours ago

          I Actually had attempted to do that via a service, It didn’t work. And at that point, I had spent a few hours trying to get it connected to the internet alone so I was already frustrated and was happy enough that it was able to at least connect again. Telling myself I’ll go back to it later. Guess what never happend 🦊

          When I bother testing it again, I will attempt to fix the service for it. Although in a perfect world it would be nice to have it remember passwords that way the startup is just having it connect to the already saved network, but I don’t believe that’s going to get fixed any time soon.

          You might be right and binding it to a key binding may end up being the easier route.

          • pet the cat, walk the dog@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            21 hours ago

            The service probably either starts too early, or doesn’t have access to the desktop session (idk if the latter would be necessary for the script). You can try putting the script into autostarting applications for the user’s session, typically via a .desktop file in ~/.config/autostart — e.g. by copying a file from /usr/share/applications and adjusting it.

            • Pika@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              21 hours ago

              I have been really trying to avoid implementing it into the user session, it requires superuser to run the commands and I don’t like the concept of hardcoding sudo paths using nopasswd

              But I probably will end up having to do something similar in the user environment.

              edit: Now that I think about it, I could probably just make the command path to the network command be authorized as no password on any user as I don’t really see a situation where the user logged in shouldn’t be able to manipulate the network it’s connected to.

              • pet the cat, walk the dog@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                20 hours ago

                Afaik you can make a particular script available without a password, via sudoers. I forget how exactly, but I’ve looked into this in the past.

                Alternatively, you can set the owner of the script to root and set the setuid permission on it, so it runs as root regardless of who launches it.

                In both cases, if you hardcode the necessary operations in the script, it shouldn’t be possible to do anything else with it other than connect to WiFi.

                Of course, you can also try setting it as a service to run as late as possible, perhaps that would fix it. Idk how services are specified in Arch, but usually with oldstyle init systems it’s the numbers at the beginning of the filename, and if you name symlinks to the script something like ‘99-start-wifi’, it should run among the last services at the particular init level.

                • Pika@sh.itjust.works
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  20 hours ago

                  I had forgotten about the set UID flag. That might actually fix the issue altogether without having to do a hard-coded sudo path.

                  And would mean I wouldn’t have to double check the commans to make sure that there’s no destructive subcommands that could be done as well.

                  I might try that later, thanks!