# gtkwifi?

## tessmonsta

Is gtkwifi available for gentoo? I can't seem to find it in portage, but I've heard that it's available in another package. The text-based configuration won't work well for me, since this laptop and I travel a lot.

----------

## uweklosa

Have you tried net-wireless/wifi-radar. I don't use it my self but could be worth a try.

----------

## tessmonsta

I tried wifi-radar, but it seems to insist on pinging eth2, and not eth1 where my wifi card is located.

----------

## KillMinusNine

http://gentoo-wiki.com/HOWTO_Gnome_Wifi

There are instructions there for GTKWifi installation, but sadly no ebuilds for it and portage to get along nicely.

----------

## Monkeh

Because I'm bored (and semi-interested in this), I'll see if I can knock up an ebuild.

----------

## tessmonsta

 *Monkeh wrote:*   

> Because I'm bored (and semi-interested in this), I'll see if I can knock up an ebuild.

 

That'd be wonderful! Thank you!

----------

## tessmonsta

 *KillMinusNine wrote:*   

> http://gentoo-wiki.com/HOWTO_Gnome_Wifi
> 
> There are instructions there for GTKWifi installation, but sadly no ebuilds for it and portage to get along nicely.

 

Ahhh, I misread that site before. I was thinking so much of finding the proper emerge string that I failed to notice the base installation instructions.

----------

## Monkeh

Here's your ebuild: 

```
DESCRIPTION="GTKWifi is a GNOME panel applet that displays wireless

        connection status, finds wireless networks, and allows

        storage of WEP keys and automatic connection to

        preferred networks."

HOMEPAGE="http://gtkwifi.sourceforge.net"

SRC_URI="mirror://sourceforge/${PN}/${P}.deb"

LICENSE="GPL-2"

SLOT="0"

KEYWORDS="~x86"

IUSE=""

DEPEND="net-wireless/wireless-tools

        >=dev-python/gnome-python-2

        >=dev-python/gnome-python-extras-2

        dev-python/gnome-python-desktop"

RDEPEND=""

src_unpack() {

        cd ${T}

        ar x ${DISTDIR}/${A} data.tar.gz

}

src_install() {

        cd ${D}

        tar -xzf ${T}/data.tar.gz

        rm .deb

}

pkg_postinst() {

        einfo gtkwifi will not work until you add the following

        einfo line to your sudoers file \(use visudo\)

        einfo ALL     ALL=\(root\) NOPASSWD: /usr/bin/gtkwifi-settings-client

}
```

I haven't tested the program, so I can't tell you if it works or not, but it installs just fine.Last edited by Monkeh on Tue Jun 06, 2006 2:22 am; edited 1 time in total

----------

## KillMinusNine

That's very cool.  You should submit it to be added to the main portage, or at least add it to the Gnomewifi wiki.

BTW, in case someone else comes across this and doesn't know how to do portage overlay stuff, I'll describe how to use this:

add the line 

```
PORTDIR_OVERLAY=/usr/local/portage
```

to /etc/make.conf  then

```
mkdir -p /usr/local/portage/net-wireless/gtkwifi/
```

Save the ebuild text into a file called "gtkwifi-1.09.ebuild" in the directory you just created. (or 1.08, 1.07, etc, for different versions)

```
cd /usr/local/portage/net-wireless/gtkwifi/

ebuild gtkwifi-1.09.ebuild digest

echo net-wireless/gtkwifi >> /etc/portage/package.keywords

emerge -av gtkwifi
```

Last edited by KillMinusNine on Mon Jun 05, 2006 10:13 pm; edited 1 time in total

----------

## KillMinusNine

 *tessmonsta wrote:*   

> I tried wifi-radar, but it seems to insist on pinging eth2, and not eth1 where my wifi card is located.

 

I guess it may be too late to tell you (I didn't know at the time), but wifi-radar uses /etc/wifi-radar.conf to determine what interface to look on. You needed to change it from eth2 to eth1 manually.

----------

## iarwain

 *KillMinusNine wrote:*   

> echo net-wireless/gtkwifi > /etc/portage/package.keywords
> 
> emerge -av gtkwifi

 

Oh no! I know it's my fault for just copy/pasting, but I've just overwritten my package.keywords file! Please edit your post and substitute ">" with a ">>".

Anyway, thanks for the guide and Monkeh for the ebuild.

----------

## tessmonsta

Okay, I downloaded the *.deb file from sourceforge, and then used the alien command to create a *.tgz as per the Gentoo Wiki. 

```
rei gtkwifi # ls

gtkwifi-1.08.deb  gtkwifi-1.09.ebuild  gtkwifi-1.09.tgz
```

I assumed that I had to rename the tgz if I wanted to have the ebuild work. Then I created the *.ebuild as directed.  And performed the emerge:

```
rei gtkwifi # emerge -av gtkwifi

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] net-wireless/gtkwifi-1.09  0 kB [1]

Total size of downloads: 0 kB

Portage overlays:

 [1] /usr/local/portage

Do you want me to merge these packages? [Yes/No] yes

>>> emerge (1 of 1) net-wireless/gtkwifi-1.09 to /

!!! No package manifest found: /usr/local/portage/net-wireless/gtkwifi/Manifest

rei gtkwifi #
```

Did I do something wrong?

----------

## Xithix

Digest the ebuild.

```
ebuild gtkwifi-1.09.ebuild digest
```

Then try emerging again.

----------

## tessmonsta

 *Xithix wrote:*   

> Digest the ebuild.
> 
> ```
> ebuild gtkwifi-1.09.ebuild digest
> ```
> ...

 

Wonderful! That worked. Now I have another problem.  ^^;

```
rei gtkwifi # gtkwifi

Traceback (most recent call last):

  File "/usr/bin/gtkwifi", line 37, in ?

    import gnome.applet

ImportError: No module named applet

rei gtkwifi #   
```

I know I'm not helping by trying to run this in KDE, sorry!

----------

## tessmonsta

 *KillMinusNine wrote:*   

> [I guess it may be too late to tell you (I didn't know at the time), but wifi-radar uses /etc/wifi-radar.conf to determine what interface to look on. You needed to change it from eth2 to eth1 manually.

 

No, not too late. That actually fixed the appliction. I can get it to load now, but only when I'm running from a terminal as root.  Part of it was that I didn't add my user account to sudoers. Even after I fixed that I still have a bit of a problem:

```
tess@rei ~ $ sudo wifi-radar

Password:

Sorry, try again.

Password:

Traceback (most recent call last):

  File "/usr/sbin/wifi-radar", line 1795, in ?

    import gtk, gobject

  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 45, in ?

    from _gtk import *

RuntimeError: could not open display

tess@rei ~ $
```

Neither the root or my password works in the password query above. Worse, because it's querying for a password, the link in the KDE menu is completely broken.

But! When I do run the app from a terminal as root, it's mighty spiffy.   :Wink: 

----------

## Monkeh

 *tessmonsta wrote:*   

> Okay, I downloaded the *.deb file from sourceforge, and then used the alien command to create a *.tgz as per the Gentoo Wiki. 
> 
> ```
> rei gtkwifi # ls
> 
> ...

 

You do not need to download the .deb or use alien. the ebuild does it all for you (without requiring alien or it's dependencies)

As posted above, you must digest the ebuild to use it.

And you can't use gtkwifi in KDE, at least, not without most of GNOME installed. Should probably be renamed to gnomewifi really..

----------

## tessmonsta

 *Monkeh wrote:*   

> [
> 
> And you can't use gtkwifi in KDE, at least, not without most of GNOME installed. Should probably be renamed to gnomewifi really..

 

I actually have a lot of gnome apps in my system already. So most of it is already installed.

----------

## Monkeh

 *tessmonsta wrote:*   

>  *Monkeh wrote:*   [
> 
> And you can't use gtkwifi in KDE, at least, not without most of GNOME installed. Should probably be renamed to gnomewifi really.. 
> 
> I actually have a lot of gnome apps in my system already. So most of it is already installed.

 

Well you're missing something. I'm assuming gnome.applet comes with gnome-panel, but I'll go find it and check.

Edit: Do you have gnome-python-desktop installed?

----------

## tessmonsta

 *Monkeh wrote:*   

> Edit: Do you have gnome-python-desktop installed?

 

Me thinks not:

```
rei gtkwifi # emerge -p gnome-python-desktop

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] app-text/gnome-doc-utils-0.6.0

[ebuild  N    ] gnome-base/gnome-desktop-2.14.1.1

[ebuild  N    ] gnome-base/gail-1.8.11

[ebuild  N    ] dev-util/desktop-file-utils-0.10-r1

[ebuild  N    ] gnome-base/gnome-menus-2.14.0

[ebuild  N    ] gnome-base/eel-2.14.1

[ebuild  N    ] media-video/mpeg2vidcodec-12-r1

[ebuild  N    ] media-gfx/imagemagick-6.2.6.0

[ebuild  N    ] media-libs/libwmf-0.2.8.3-r1

[ebuild  N    ] gnome-extra/libgsf-1.14.0

[ebuild  N    ] dev-libs/libcroco-0.6.1

[ebuild  N    ] gnome-base/librsvg-2.14.3

[ebuild  N    ] gnome-base/nautilus-2.14.1

[ebuild  N    ] dev-python/pyxml-0.8.4

[ebuild  N    ] app-text/iso-codes-0.49-r1

[ebuild  N    ] media-video/totem-1.4.0

[ebuild  N    ] app-cdr/cdrtools-2.01.01_alpha07

[ebuild  N    ] gnome-extra/nautilus-cd-burner-2.14.1

[ebuild  N    ] x11-wm/metacity-2.14.3

[ebuild  N    ] x11-libs/libwnck-2.14.1

[ebuild  N    ] gnome-base/gnome-panel-2.14.1

[ebuild  N    ] gnome-base/libgtop-2.14.1

[ebuild  N    ] x11-libs/gtksourceview-1.6.1

[ebuild  N    ] media-libs/gstreamer-0.10.6

[ebuild  N    ] dev-libs/liboil-0.3.8

[ebuild  N    ] media-libs/gst-plugins-base-0.10.7

[ebuild  N    ] media-plugins/gst-plugins-alsa-0.10.7

[ebuild  N    ] media-plugins/gst-plugins-oss-0.10.3

[ebuild  N    ] media-plugins/gst-plugins-xvideo-0.10.7

[ebuild  N    ] media-plugins/gst-plugins-x-0.10.7

[ebuild  N    ] media-plugins/gst-plugins-esd-0.10.3

[ebuild  N    ] media-plugins/gst-plugins-gconf-0.10.3

[ebuild  N    ] media-plugins/gst-plugins-mad-0.10.3

[ebuild  N    ] media-libs/gst-plugins-good-0.10.3

[ebuild  N    ] media-plugins/gst-plugins-ogg-0.10.7

[ebuild  N    ] media-plugins/gst-plugins-vorbis-0.10.7

[ebuild  N    ] gnome-extra/gnome-media-2.14.0-r1

[ebuild  N    ] dev-python/gnome-python-desktop-2.14.0

rei gtkwifi #                             
```

----------

## Monkeh

Far as I can tell, you need it.

----------

## mihochan

 *tessmonsta wrote:*   

> I tried wifi-radar, but it seems to insist on pinging eth2, and not eth1 where my wifi card is located.

 

Just alter the config file in /etc!

----------

## KillMinusNine

 *iarwain wrote:*   

> Oh no! I know it's my fault for just copy/pasting, but
> 
> I've just overwritten my package.keywords file! Please edit your post
> 
> and substitute ">" with a ">>".
> ...

 

Sorry about that, it's fixed now.

 *Monkeh wrote:*   

> 
> 
> Well you're missing something. I'm assuming gnome.applet comes with
> 
> gnome-panel, but I'll go find it and check.
> ...

 

gtkwifi didn't run on my system until I installed gnome-python-desktop.

Could you edit your original ebuild to add that to the dependencies

list?

Also - I don't know why - but gtkwifi does bad things to my wireless connection and forces me to restart to get wireless back.

----------

## Monkeh

 *KillMinusNine wrote:*   

>  *Monkeh wrote:*   
> 
> Well you're missing something. I'm assuming gnome.applet comes with
> 
> gnome-panel, but I'll go find it and check.
> ...

 

Added, thanks for the confirmation on that.

----------

## Sachankara

It was quite a while ago someone even said anything is this thread, so I guess most people don't use it. Well, anyway, I tried it with my Broadcom 4318 and it doesn't work. All I get when listing the available cards is this:

Device: sh:

Name: sh: Card ID: config: command n

Very useful error message.  :Wink:  Just thought it could be of some use to someone else.

----------

