# wpa_supplicant -- how to use as 'user' not 'root' [SOLVED]

## papapenguin

I'm using wpa_supplicant, but would like to scan and connect using the nice wpa_gui

...I must have missed a step in setup, but not sure what...

right now, wpa_supplicant opens at startup, but does not connect to anything...so I must first open a terminal shell, log in as root and type 'iwlist scan'

instead of these steps, I'd like to just click on 'scan' and select the wireless network to connect and click 'connect'

...is this possible?

 *Quote:*   

> papapenguin ~ # rc-update show
> 
>                 acpid | battery boot default                                  
> 
>             alsasound |         boot                                          
> ...

 

 *Quote:*   

> papapenguin ~ # cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

----------

## cach0rr0

 *papapenguin wrote:*   

> 
> 
> instead of these steps, I'd like to just click on 'scan' and select the wireless network to connect and click 'connect'
> 
> 

 

not sure I'm following exactly; you basically want a UI that'll let you do this? have you checked out wicd or wpa_gui ? 

normally to allow a non-root user to be able to interact *directly* with wpa_supplicant, you have something like this in wpa_supplicant.conf

```

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

```

but that's more for CLI access. If you want a UI so that things are point and click, my personal preference is wicd (built with USE="gtk"), but wpa_gui works as well. With wicd at least, no setup of /etc/conf.d/net is required, no setup of wpa_supplicant.conf required. Just start the daemon at 'default' runlevel, launch wicd-gtk whenever you feel like it (in some DE's you can set its tray icon to appear automatically), point, click,connect.

I'll re-read your post and see if I've missed something just in case, but yeah...part of it implies "how to set up wpa_supplicant", part of it is "I would like a UI"

----------

## chtof

It runs properly for me, maybe because I have "ctrl_interface_group=wheel" in /etc/wpa_supplicant/wpa_supplicant.conf and my user belongs to this group ( /etc/group : wheel:x:10:root,username.

And also, according http://en.gentoo-wiki.com/wiki/Wireless/Configuration :

 *Quote:*   

> To use wpa_gui, the gui supplied by wpa_supplicant, you need: 
> 
> File: /etc/wpa_supplicant/wpa_supplicant.conf
> 
> ctrl_interface=/var/run/wpa_supplicant
> ...

 

----------

## papapenguin

thanks cach0rr0, I do use wpa_gui, I'm just trying to use it as a user, instead of root, I'd just like to click 'scan' and connect to a wifi signal...

also thanks chtof, here is my wpa_supplicant.conf, in which, I am in the 'wheel' group, which is also why I'm asking the question...why can I not access this without root privileges?

 *Quote:*   

> papapenguin ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=wheel
> ...

 

----------

## cach0rr0

 *papapenguin wrote:*   

> thanks cach0rr0, I do use wpa_gui, 

 

whoops, yeah I re-read your post. Sorry about that, too early, eyes not working all that well at the time! 

unless the control group is getting ignored i dont know why it would require root; no great ideas there unfortunately

----------

## papapenguin

ok, so how would I know if the control group is getting ignored? and then, how would I fix that?

----------

## papapenguin

so this is what happens, as well as I can remember it...

upon startup, wpa_supplicant and the wpa_gui start up,

but on startup, the wpa_gui shows a network (most likely the last network that was connected), but shows status as 'disconnected'

to connect, I must open a terminal, log in as root and type 'iwlist scan'

I cannot just click 'connect' nor can I change anything in the wpa_gui

any ideas?

----------

## derk

maybe set ap_scan=1 or comment it out .. my working configuration does not have that line

----------

## Etal

Since you're not using /etc/conf.d/net (it's blank), maybe try removing net.* scripts from the default runlevel, and add dhcpcd and wpa_supplicant instead?

----------

## papapenguin

thanks all, what solved it was actually setting

 *Quote:*   

> ap_scan=1

 

not sure why it is automatically set to 0...

thanks derk...

now my wpa_supplicant and wpa_gui automatically connect to my network, I haven't tried it on a public wireless network, yet...

----------

## frank56

 *Etal wrote:*   

> Since you're not using /etc/conf.d/net (it's blank), maybe try removing net.* scripts from the default runlevel, and add dhcpcd and wpa_supplicant instead?

 

I had tried, it seems everything, but doing just what Etal suggested here to care of it. I have some entries, in /etc/conf.d/net but these steps alone solved my problem. Which was I could start wpa_gui from root console, but not from desktop application, or from regular user console  Thanks Etal and others contributing to this thread.

----------

