Non-Root User Connect to Wifi in Arch Linux with SLiM

I’m a fan of Arch Linux. A big reason for that (for me at least) is that Arch doesn’t do everything for you. For the most part, I’m a self-taught Linux user, so the more things that aren’t done for me, the better. In that light, I of course have discovered yet another thing that has not been done for me like it was in Debian (not knocking Debian at all that’s still my server distro). That would be the .xinit file for my user. Consequently, since my .xinit file is custom made, it is obviously lacking certain handy tricks for increased functionality. In this case, non-root wifi connections.

To be able to run [some additional] privileged commands as your non-root user without sudo, we need to have a package installed called consolekit. When we use this to launch our X interface, it gives our GUI applications permissions to do more stuff (science!). To do this, we need to edit our .xinitrc file so our GUI is launched from within a consolekit session so it can make requests for elevated permissions without requiring root access.

For our current example, we have xfce4 installed, so we will be editing the line that likely looks like <pre> exec startxfce4 </pre> We want our xfce4 session to launch from within consolekit, so we change the line to look like…​

exec ck-launch-session startxfce4

That should be it. Log yourself out of your X session (if you are logged in) and log back in and you should be able to connect to wifi networks without having to give your root password.

Category:Linux