# [SOLVED] wpa_supplicant (dla tych co uzywali wireless-tools)

## Xywa

Witam

W poradniku Gentoo jest taki dzial:

4. Połączenia bezprzewodowe

http://www.gentoo.org/doc/pl/handbook/handbook-amd64.xml?part=4&chap=4

Od kilku lat lacze sie z netem przy wykorzystaniu pakietu wireless-tools (ifconfig wlan0 up > iwconfig wlan0 essid "router" key "haselko" > dhcpcd wlan0) i wszystko dziala pieknie (WEP)...

Poniewaz musze ostanio byc w innym miejscu w pracy i nie mam zasiegu do mojego ulubionego routera, probuje (bez skutku) polaczyc sie z routeram WPA...

Wg poradnika skonfigurowalem  /etc/conf.d/net dla wpa_supplicant

```
modules=( "wpa_supplicant" )
```

 /etc/wpa_supplicant/wpa_supplicant.con

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

   ssid="proste"

   psk="bardzo tajne hasło"

     priority=5

}

```

...i...

...nie wiem co dalej? W poradniku opis konczy sie konfiguracji plikow i zaczyna sie juz opis do wireless-tools. 

Co mam zrobic zeby sie polaczyc z siecia? Jak mozna sie przelaczyc na inna siec WPA a jak sie przelaczyc na inna siec WEP (wireless-tools). Czy jest cos pod Gentoo jak graficzny wybor sieci - tak zeby tylko kliknac na wybrana siec, wpisac haslo i nie martwic sie jaki pakiet uzywac i bawic sie w konfiguracje? (np. w kawiarence interentowej)

Dzieki za pomoc bo juz jestem cofused   :Twisted Evil: Last edited by Xywa on Fri Aug 21, 2009 1:30 pm; edited 1 time in total

----------

## SlashBeast

mergnij sobie >=wicd-1.6, klikany w gtk i konsolowy w curses (jak mc) konfigurator, ktory za Ciebie odwali konfiguracje wpa_suppa, autoconnect gdy dana siec jest w zasiegu itp, nie ma co sobie zycia komplikowac. Pozbywasz sie z init.d net.* poza net.lo i heja, wszystko robi wicd, dodajesz go do runlevelu i juz przy boocie systemu laczy Cie do sieci, wpa(2), wep czy jakies sprytne autoryzacje wspiera bez problemu.

----------

## Xywa

 *SlashBeast wrote:*   

> Pozbywasz sie z init.d net.* poza net.lo 

 

Czy także mam skasować z init.d: net.eth0 -> net.lo?

 *SlashBeast wrote:*   

> dodajesz go do runlevelu

 

Jak to sie robi?

----update

[1] Czy mam też wykasować ręcznie całą konfiguracje jaką zrobiłem powyżej dla WPA?

[2] Gdy uruchomie WPA Suplicant administration GUI  nie mogę wybrać nić w miejscu Adapter...

[3] Nie mogę uruchomić wicd-client

```
wicd-client

Traceback (most recent call last):

  File "/usr/lib/wicd/wicd-client.py", line 38, in <module>

    import gtk

  File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>

    from gtk import _gtk

ImportError: No module named cairo

```

----------

## SlashBeast

przebuduj pycairo, widac po aktualizacji pythona nie dales python-updater, WPA Suplicant administration GUI olej, odpal wicd-curses albo graficzny wicd-client, to wicd sam odpala wpa_suppa.dla runlevelu daj rc-update add wicd default, net.eth0 mozesz zostawic a mozesz wywalic, ja w wicd wywalilem zajmowanie sie wired ale mozna uzywac go spokojnie do tego.

----------

## dziadu

Jeśli masz wpa_supplicant skompilowane z flaga qt3 lub qt4 to powinieneś (nie wiem czy bez tych flag też jest) mieć program wpa_gui do zarządzania konfiguracją, szukania sieci i łączenia się.

----------

## Xywa

 *SlashBeast wrote:*   

> przebuduj pycairo, widac po aktualizacji pythona nie dales python-updater, WPA Suplicant administration GUI olej, odpal wicd-curses albo graficzny wicd-client, to wicd sam odpala wpa_suppa.dla runlevelu daj rc-update add wicd default, net.eth0 mozesz zostawic a mozesz wywalic, ja w wicd wywalilem zajmowanie sie wired ale mozna uzywac go spokojnie do tego.

 

[1] Przebudowalem pycairo + python-updater

[2] dodalem rc-update add wicd default

[3] Zrobile restart compa i...

Xy sie nie odpalaja     :Sad:  nie jest zle bo wyswietla przez sekunde logo Nvidi, ale potem mam blad (pelne logi ponizej) - wyglada na to ze cos z prawami dostepu:

 *Quote:*   

> [config/dbus] couldn't take over org.x.config: org.freedesktop.DBus.Error.AccessDenied (Connection ":1.5" is not allowed to own the service "org.x.config.display0" due to security policies in the configuration file)
> 
> (EE) config/hal: couldn't initialise context: unknown error (null)

 

```

X.Org X Server 1.6.3

Release Date: 2009-7-31

X Protocol Version 11, Revision 0

Build Operating System: Linux 2.6.29-gentoo-r5 x86_64 

Current Operating System: Linux localhost 2.6.30-gentoo-r4 #1 SMP Tue Aug 4 14:49:02 BST 2009 x86_64

Build Date: 04 August 2009  02:03:22PM

 

   Before reporting problems, check http://wiki.x.org

   to make sure that you have the latest version.

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Fri Aug 21 10:36:47 2009

(==) Using config file: "/etc/X11/xorg.conf"

(==) ServerLayout "Layout0"

(**) |-->Screen "Screen0" (0)

(**) |   |-->Monitor "Monitor0"

(**) |   |-->Device "Device0"

(**) |-->Input Device "Keyboard0"

(**) |-->Input Device "Mouse0"

(**) Option "AllowEmptyInput" "Off"

(==) Automatically adding devices

(==) Automatically enabling devices

(WW) The directory "/usr/share/fonts/TTF/" does not exist.

   Entry deleted from font path.

(WW) The directory "/usr/share/fonts/OTF" does not exist.

   Entry deleted from font path.

(WW) The directory "/usr/share/fonts/Type1/" does not exist.

   Entry deleted from font path.

(WW) The directory "/usr/share/fonts/100dpi/" does not exist.

   Entry deleted from font path.

(==) FontPath set to:

   /usr/share/fonts/misc/,

   /usr/share/fonts/75dpi/,

   built-ins

(==) ModulePath set to "/usr/lib64/xorg/modules"

(II) Loader magic: 0xd60

(II) Module ABI versions:

   X.Org ANSI C Emulation: 0.4

   X.Org Video Driver: 5.0

   X.Org XInput driver : 4.0

   X.Org Server Extension : 2.0

(II) Loader running on linux

(--) using VT number 8

(--) PCI:*(0:2:0:0) 10de:086f:1043:16b2 nVidia Corporation rev 177, Mem @ 0xfd000000/16777216, 0xe0000000/268435456, 0xde000000/33554432, I/O @ 0x0000dc00/128, BIOS @ 0x????????/131072

(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

(II) No APM support in BIOS or kernel

(II) System resource ranges:

   [0] -1   0   0xffffffff - 0xffffffff (0x1) MX[B]

   [1] -1   0   0x000f0000 - 0x000fffff (0x10000) MX[B]

   [2] -1   0   0x000c0000 - 0x000effff (0x30000) MX[B]

   [3] -1   0   0x00000000 - 0x0009ffff (0xa0000) MX[B]

   [4] -1   0   0x0000ffff - 0x0000ffff (0x1) IX[B]

   [5] -1   0   0x00000000 - 0x00000000 (0x1) IX[B]

(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.

(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.

(II) "glx" will be loaded. This was enabled by default and also specified in the config file.

(II) "record" will be loaded by default.

(II) "dri" will be loaded by default.

(II) "dri2" will be loaded by default.

(II) LoadModule: "dbe"

(II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so

(II) Module dbe: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.0.0

   Module class: X.Org Server Extension

   ABI class: X.Org Server Extension, version 2.0

(II) Loading extension DOUBLE-BUFFER

(II) LoadModule: "extmod"

(II) Loading /usr/lib64/xorg/modules/extensions//libextmod.so

(II) Module extmod: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.0.0

   Module class: X.Org Server Extension

   ABI class: X.Org Server Extension, version 2.0

(II) Loading extension MIT-SCREEN-SAVER

(II) Loading extension XFree86-VidModeExtension

(II) Loading extension XFree86-DGA

(II) Loading extension DPMS

(II) Loading extension XVideo

(II) Loading extension XVideo-MotionCompensation

(II) Loading extension X-Resource

(II) LoadModule: "type1"

(WW) Warning, couldn't open module type1

(II) UnloadModule: "type1"

(EE) Failed to load module "type1" (module does not exist, 0)

(II) LoadModule: "freetype"

(WW) Warning, couldn't open module freetype

(II) UnloadModule: "freetype"

(EE) Failed to load module "freetype" (module does not exist, 0)

(II) LoadModule: "glx"

(II) Loading /usr/lib64/xorg/modules/extensions//libglx.so

(II) Module glx: vendor="NVIDIA Corporation"

   compiled for 4.0.2, module version = 1.0.0

   Module class: X.Org Server Extension

(II) NVIDIA GLX Module  185.18.31  Tue Jul 28 19:34:01 PDT 2009

(II) Loading extension GLX

(II) LoadModule: "record"

(II) Loading /usr/lib64/xorg/modules/extensions//librecord.so

(II) Module record: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.13.0

   Module class: X.Org Server Extension

   ABI class: X.Org Server Extension, version 2.0

(II) Loading extension RECORD

(II) LoadModule: "dri"

(WW) Warning, couldn't open module dri

(II) UnloadModule: "dri"

(EE) Failed to load module "dri" (module does not exist, 0)

(II) LoadModule: "dri2"

(II) Loading /usr/lib64/xorg/modules/extensions//libdri2.so

(II) Module dri2: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.1.0

   ABI class: X.Org Server Extension, version 2.0

(II) Loading extension DRI2

(II) LoadModule: "nvidia"

(II) Loading /usr/lib64/xorg/modules/drivers//nvidia_drv.so

(II) Module nvidia: vendor="NVIDIA Corporation"

   compiled for 4.0.2, module version = 1.0.0

   Module class: X.Org Video Driver

(II) LoadModule: "kbd"

(II) Loading /usr/lib64/xorg/modules/input//kbd_drv.so

(II) Module kbd: vendor="X.Org Foundation"

   compiled for 1.6.2, module version = 1.3.2

   Module class: X.Org XInput Driver

   ABI class: X.Org XInput driver, version 4.0

(II) LoadModule: "mouse"

(II) Loading /usr/lib64/xorg/modules/input//mouse_drv.so

(II) Module mouse: vendor="X.Org Foundation"

   compiled for 1.6.2, module version = 1.4.0

   Module class: X.Org XInput Driver

   ABI class: X.Org XInput driver, version 4.0

(II) NVIDIA dlloader X Driver  185.18.31  Tue Jul 28 18:13:23 PDT 2009

(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs

(II) Primary Device is: PCI 02@00:00:0

(II) Loading sub module "fb"

(II) LoadModule: "fb"

(II) Loading /usr/lib64/xorg/modules//libfb.so

(II) Module fb: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.0.0

   ABI class: X.Org ANSI C Emulation, version 0.4

(II) Loading sub module "wfb"

(II) LoadModule: "wfb"

(II) Loading /usr/lib64/xorg/modules//libwfb.so

(II) Module wfb: vendor="X.Org Foundation"

   compiled for 1.6.3, module version = 1.0.0

   ABI class: X.Org ANSI C Emulation, version 0.4

(II) Loading sub module "ramdac"

(II) LoadModule: "ramdac"

(II) Module "ramdac" already built-in

(II) resource ranges after probing:

   [0] -1   0   0xffffffff - 0xffffffff (0x1) MX[B]

   [1] -1   0   0x000f0000 - 0x000fffff (0x10000) MX[B]

   [2] -1   0   0x000c0000 - 0x000effff (0x30000) MX[B]

   [3] -1   0   0x00000000 - 0x0009ffff (0xa0000) MX[B]

   [4] -1   0   0x0000ffff - 0x0000ffff (0x1) IX[B]

   [5] -1   0   0x00000000 - 0x00000000 (0x1) IX[B]

(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32

(==) NVIDIA(0): RGB weight 888

(==) NVIDIA(0): Default visual is TrueColor

(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)

(**) NVIDIA(0): Enabling RENDER acceleration

(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is

(II) NVIDIA(0):     enabled.

(II) NVIDIA(0): NVIDIA GPU GeForce 8200M G (C79) at PCI:2:0:0 (GPU-0)

(--) NVIDIA(0): Memory: 524288 kBytes

(--) NVIDIA(0): VideoBIOS: 62.79.38.00.03

(--) NVIDIA(0): Interlaced video modes are supported on this GPU

(--) NVIDIA(0): Connected display device(s) on GeForce 8200M G at PCI:2:0:0:

(--) NVIDIA(0):     CPT (DFP-0)

(--) NVIDIA(0): CPT (DFP-0): 330.0 MHz maximum pixel clock

(--) NVIDIA(0): CPT (DFP-0): Internal Dual Link LVDS

(II) NVIDIA(0): Assigned Display Device: DFP-0

(==) NVIDIA(0): 

(==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"

(==) NVIDIA(0):     will be used as the requested mode.

(==) NVIDIA(0): 

(II) NVIDIA(0): Validated modes:

(II) NVIDIA(0):     "nvidia-auto-select"

(II) NVIDIA(0): Virtual screen size determined to be 1280 x 800

(--) NVIDIA(0): DPI set to (98, 96); computed from "UseEdidDpi" X config

(--) NVIDIA(0):     option

(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.

(--) Depth 24 pixmap format is 32 bpp

(II) do I need RAC?  No, I don't.

(II) resource ranges after preInit:

   [0] -1   0   0xffffffff - 0xffffffff (0x1) MX[B]

   [1] -1   0   0x000f0000 - 0x000fffff (0x10000) MX[B]

   [2] -1   0   0x000c0000 - 0x000effff (0x30000) MX[B]

   [3] -1   0   0x00000000 - 0x0009ffff (0xa0000) MX[B]

   [4] -1   0   0x0000ffff - 0x0000ffff (0x1) IX[B]

   [5] -1   0   0x00000000 - 0x00000000 (0x1) IX[B]

(II) NVIDIA(0): Initialized GPU GART.

(II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon

(II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X

(II) NVIDIA(0):     configuration option may not be set correctly.  When the

(II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will

(II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For

(II) NVIDIA(0):     details, please see the "ConnectToAcpid" and

(II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X

(II) NVIDIA(0):     Config Options in the README.

(II) NVIDIA(0): Setting mode "nvidia-auto-select"

(II) Loading extension NV-GLX

(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized

(==) NVIDIA(0): Disabling shared memory pixmaps

(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture

(==) NVIDIA(0): Backing store disabled

(==) NVIDIA(0): Silken mouse enabled

(**) Option "dpms"

(**) NVIDIA(0): DPMS enabled

(II) Loading extension NV-CONTROL

(II) Loading extension XINERAMA

(==) RandR enabled

(II) Initializing built-in extension Generic Event Extension

(II) Initializing built-in extension SHAPE

(II) Initializing built-in extension MIT-SHM

(II) Initializing built-in extension XInputExtension

(II) Initializing built-in extension XTEST

(II) Initializing built-in extension BIG-REQUESTS

(II) Initializing built-in extension SYNC

(II) Initializing built-in extension XKEYBOARD

(II) Initializing built-in extension XC-MISC

(II) Initializing built-in extension XINERAMA

(II) Initializing built-in extension XFIXES

(II) Initializing built-in extension RENDER

(II) Initializing built-in extension RANDR

(II) Initializing built-in extension COMPOSITE

(II) Initializing built-in extension DAMAGE

(II) Initializing extension GLX

(**) Option "CoreKeyboard"

(**) Keyboard0: always reports core events

(**) Option "Protocol" "standard"

(**) Keyboard0: Protocol: standard

(**) Option "AutoRepeat" "500 30"

(**) Option "XkbRules" "xorg"

(**) Keyboard0: XkbRules: "xorg"

(**) Option "XkbModel" "pc105"

(**) Keyboard0: XkbModel: "pc105"

(**) Option "XkbLayout" "us"

(**) Keyboard0: XkbLayout: "us"

(**) Option "CustomKeycodes" "off"

(**) Keyboard0: CustomKeycodes disabled

(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)

(WW) Option "Protocol" requires an string value

(**) Option "Device" "/dev/input/mice"

(II) Mouse0: Setting mouse protocol to "ExplorerPS/2"

(**) Mouse0: Device: "/dev/input/mice"

(==) Mouse0: Protocol: "Auto"

(**) Option "CorePointer"

(**) Mouse0: always reports core events

(**) Option "Device" "/dev/input/mice"

(**) Option "Emulate3Buttons" "no"

(**) Option "ZAxisMapping" "4 5"

(**) Mouse0: ZAxisMapping: buttons 4 and 5

(**) Mouse0: Buttons: 9

(**) Mouse0: Sensitivity: 1

(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)

(**) Mouse0: (accel) keeping acceleration scheme 1

(**) Mouse0: (accel) filter chain progression: 2.00

(**) Mouse0: (accel) filter stage 0: 20.00 ms

(**) Mouse0: (accel) set acceleration profile 0

(II) Mouse0: Setting mouse protocol to "ExplorerPS/2"

(II) Mouse0: ps2EnableDataReporting: succeeded

[config/dbus] couldn't take over org.x.config: org.freedesktop.DBus.Error.AccessDenied (Connection ":1.5" is not allowed to own the service "org.x.config.display0" due to security policies in the configuration file)

(EE) config/hal: couldn't initialise context: unknown error (null)

Backtrace:

0: X(xorg_backtrace+0x26) [0x4df6a6]

1: X(xf86SigHandler+0x39) [0x48351b]

2: /lib/libc.so.6 [0x7f2710451290]

3: [0x13a51c0]

Fatal server error:

Caught signal 11.  Server aborting

Please consult the The X.Org Foundation support 

    at http://wiki.x.org

 for help. 

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

(II) UnloadModule: "kbd"

(II) UnloadModule: "mouse"

```

----------

## SlashBeast

Troche bzdurny blad dbusa z halem, sprawdz czy z roota Xy wstana.

----------

## Xywa

 *SlashBeast wrote:*   

> Troche bzdurny blad dbusa z halem, sprawdz czy z roota Xy wstana.

 

Z roota tez nie wstawaly. Ale byl juz watek na anglojezycznym forum:

https://forums.gentoo.org/viewtopic-t-786654-postdays-0-postorder-asc-start-0.html

i w moim przypadku pomoglo rozwiazanie:

 *Quote:*   

> At a CLI, do the following: 
> 
> 1. /etc/init.d/hald stop && /etc/init.d/dbus stop (stops hal and dbus). 
> 
> 2. emerge -C dbus hal (removes the packages). 
> ...

 

Ok. Wracajac do naszej sieci wireless  :Smile: 

Mam komunikat: Could not connet to wicd's D-Bus interfrance. check the wicd log for error mesages.

----------

## SlashBeast

odpal dbusa i wicd z inita (deamona).

----------

## Xywa

 *SlashBeast wrote:*   

> odpal dbusa i wicd z inita (deamona).

 

Odpalilem i znowy mi Xy nie chca startowac   :Twisted Evil:  grrrrr...

----------

## SlashBeast

dbusa miales juz wczescniej wystartowanego pewnie, po starcie wicd Xy nie wstaly? To jakas magia.

----------

## Xywa

 *SlashBeast wrote:*   

> dbusa miales juz wczescniej wystartowanego pewnie, po starcie wicd Xy nie wstaly? To jakas magia.

 

Nie wiem co było, ale po 3-krotnym restarcie kompa - wszytsko działa OK (jak w Winowsie 2000 hehehehe)

Dzięki wielkie Slash! 

DZIAŁA  :Smile:  a akurat dzisiaj wyłączyli an stałe router WEP, więc uratowałeś mi tyłek.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

[SOLVED]

----------

