You are not logged in.

#1 2009-06-25 02:18:04

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

netcfg tray icon v3

This is the release of what I consider a 'simple' tray icon for netcfg. The aim is a very simple front to start/stop netcfg/netlib profiles and just make it a little more convenient. Not a full clicky configure-everything GUI. 

The icon and tooltip indicate the network connectivity, and networks can be selected for the menu. It's still a little rough around the edges, but already very useful.

At present it can connect/disconnect profiles and run auto-wireless on an interface.

Permissions
As netcfg needs to be run as root, the tray icon needs to be configured to run /usr/bin/netcfg-tray-helper as root somehow.

By default the tray icon uses gksudo, in the package 'gksu'. This brings in gnome deps - however this can be changed:

cp -r /etc/xdg/netcfg-tray ~/.config/

Then edit the root_cmd option to something without gnome deps. I set mine to sudo, then ran visudo and configured sudo to allow passwordless use of /usr/bin/netcfg-tray-helper.

Notifications
Notifications are somewhat configurable. Have a look at the default configuration, presently it supports:

* no notifications
* libnotify
* dzen2

For libnotify with no gnome deps, either use xfce4-notifyd or noteo  (written by an Archer! - http://aur.archlinux.org/packages.php?ID=15952)

Download
PKGBUILD: http://aur.archlinux.org/packages.php?ID=27601
Source: ftp://ftp.archlinux.org/other/netcfg/tr … y-3.tar.gz
Package: ftp://ftp.archlinux.org/other/netcfg/tr … pkg.tar.gz

Depends on netcfg >=2.2.0b3 (testing) - The netcfg release in testing is pretty stable,  and will be moved to [core] in the near future with some minor changes.

Feature Requests
Keep in mind the aim is a very simple front to start/stop netcfg/netlib profiles and just make it a little more convenient. Not to become a full clicky configure-all GUI. 

* Creating new profiles - Next feature to add. It'll be basic, not a full GUI for every option, probably just a simple text box/editor.
* Scanning for available wireless networks - Will be optional. When I find a _clean_ way that does not introduce new deps, and does not involve parsing iwlist scan. I'm thinking a very short C app that uses the standard wireless extensions to get a parsable list of available networks, though I havn't used C for years.
* Link quality - Maybe. Definitely optional, but like scanning, I need to find a good way to do it.

Last edited by iphitus (2009-06-26 14:50:37)

Offline

#2 2009-06-25 02:51:38

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: netcfg tray icon v3

testing it right now....

i dont use any notification daemon, is it safe to leave settings as is? could there be a no-notify option?

Offline

#3 2009-06-25 04:12:09

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

Yeah, no harm without notifications, just doesnt tell you what it's doing. I'll add something to disable them.

note to self: fix tooltip when no networks active.

Offline

#4 2009-06-25 07:08:04

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: netcfg tray icon v3

I love it!

Offline

#5 2009-06-25 07:41:47

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: netcfg tray icon v3

So far it works nicely. It should be started with netcfg-tray right? If I start the helper I just get "yeah... no" or something like that.

Maybe signal strength should be included in the list.

At the moment the icon is not very informative. Could it contain some info. If nothing else the strength or the activity of the network.

To me it would be more attractive with some kind of X-menu (as is !=terminal) that worked similar to wifi-select/netcfg-menu (as opposed to a tray). Of course Xdisplay could be used for this. . .

netcfg-auto-wireless is not working for me in newer versions of netcfg. It always chooses the profile starting with a.

Thanks!

Rasmus


Arch x64 on Thinkpad X200s/W530

Offline

#6 2009-06-25 07:57:07

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: netcfg tray icon v3

Pank wrote:

Maybe signal strength should be included in the list.
At the moment the icon is not very informative. Could it contain some info. If nothing else the strength or the activity of the network.

Please don't make it into another network manager. Let it do its job, that is, being a frontend for netcfg.

Offline

#7 2009-06-25 08:09:54

folletto
Member
From: Poland
Registered: 2009-03-31
Posts: 26

Re: netcfg tray icon v3

It could be very nice gtk replacement for netcfgGUI.
But it doesn't work for me. It shows connected/disconnected profiles but doesn't up/down them, alwas fails and I'm getting this:

/usr/bin/netcfg-tray:237: Warning: glib.io_add_watch callback returned None; should return True/False
  gtk.main()

Another thing - it's very hard to get it download from server (at least for me), I had few attempts fails and few corrupted archives. Maybe you could add md5 sum check to AUR pkg?

edit: typo

Last edited by folletto (2009-06-25 08:16:10)

Offline

#8 2009-06-25 08:47:07

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

folletto: Did you configure permissions as I suggested? I think one of the Arch FTP servers is unwell which may explain the download issue. The built package should work fine on any arch as it's just a python script.

Pank: Presently the icon simply shows if
a) A profile is connected
b) It is in the process of connecting
c) No profile is connected.

As for netcfg-auto-wireless, if that network is available, then it's working as expected. If that network is unavailable, then it's a bug. That said, if there's multiple available it should try each until one works, possibly in order of signal strength. auto-wireless is going to get a bit of attention in an upcoming release.

edit: Who was it that marked the AUR package out of date. wtf, I know when my own package is out of date and it isn't -- it's only ever had one release!

Last edited by iphitus (2009-06-25 08:53:19)

Offline

#9 2009-06-25 09:08:45

folletto
Member
From: Poland
Registered: 2009-03-31
Posts: 26

Re: netcfg tray icon v3

My sudoers:

(...)
predki  ALL=NOPASSWD: /usr/bin/netcfg
predki  ALL=NOPASSWD: /usr/bin/netcfgGUI
predki  ALL=NOPASSWD: /usr/bin/netcfg-tray-helper
(...)

NetcfgGUI work with this configuration, netcfg-tray doesn't.

About this problem with server: I've just checked history and firefox tried to download packages from some strange server. I don't have a clue why. Doesn't matter.

Offline

#10 2009-06-25 09:21:50

folletto
Member
From: Poland
Registered: 2009-03-31
Posts: 26

Re: netcfg tray icon v3

And i have this:

/usr/bin/netcfg-tray-helper: line 3: /usr/lib/network/network: Nie ma takiego pliku ani katalogu

translation: there is no file or directory
I have: /usr/lib/network/network.subr
All files in my /usr/lib/network have ".subr" suffix
i had to do something funny to my network config, probably. But netcfg works, and netcfgGUI as well.

Offline

#11 2009-06-25 10:55:19

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

oh ok. I forgot that it depends on netcfg from testing. I'll mention that and update the PKGBUILD soon.

Offline

#12 2009-06-25 11:45:23

folletto
Member
From: Poland
Registered: 2009-03-31
Posts: 26

Re: netcfg tray icon v3

ok, after installing netcfg from testing, works fine.
Thanks for this application smile

Offline

#13 2009-06-25 12:55:10

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: netcfg tray icon v3

withouth a notification-daemon, it fails to update network with my actions. had to install one.

feature requests: (dont know if they are feasable)
- hide profiles of networks not within range.
- signal strenght
- no-notification option
- add/remove profiles <-- i believe this is alrady in the todo list though wink


good work

Offline

#14 2009-06-25 13:49:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

ok. updated PKGBUILD with extra dep on netcfg v2.2.0b3 from [testing] no other changes yet.

Will add option to use no notifications next.

Offline

#15 2009-06-25 16:57:51

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: netcfg tray icon v3

iphitus wrote:

If that network is unavailable, then it's a bug. That said, if there's multiple available it should try each until one works, possibly in order of signal strength. auto-wireless is going to get a bit of attention in an upcoming release.

The university's network starts with 'a'. My home network starts with 'd'. At the moment I only have these two profiles. It always tries to connect to the uni's network even though it is not reachable. It never find my home-network.


eldragon wrote:

- add/remove profiles <-- i believe this is alrady in the todo list though wink

You are probably already aware of it, but check out wifi-select. It adds profiles on the fly.

Cheers,
Rasmus


Arch x64 on Thinkpad X200s/W530

Offline

#16 2009-06-25 21:52:04

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: netcfg tray icon v3

When clicking on the About option, I get:

$ Traceback (most recent call last):
  File "/usr/bin/netcfg-tray", line 219, in about
    about.set_license(read("/usr/share/licenses/netcfg/LICENSE").read())
NameError: global name 'read' is not defined

Offline

#17 2009-06-26 06:56:53

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

uploaded v2, will update first post and respond to other comments later tonight.

- added dzen2 support (see /etc/xdg/netcfg-tray/config)
- added support for not having notifications at all
- because of above, removed dep on python-notify
- fixed snowman's bug

ftp links below will work shortly once the ftp servers sync.

PKGBUILD: http://aur.archlinux.org/packages.php?ID=27601
Source: ftp://ftp.archlinux.org/other/netcfg/tr … y-2.tar.gz
Package: ftp://ftp.archlinux.org/other/netcfg/tr … pkg.tar.gz

Pank: I like that x-menu idea. It'd be pretty trivial to add support for say, "netcfg-tray -m" which would merely show it's menu and then close (ie, no systray icon). It'd probably just be a couple of lines, so not bloat either. It'd make it super easy to keybind this, as a lot of laptops come with some sort of wifi switch/key.

Last edited by iphitus (2009-06-26 07:04:50)

Offline

#18 2009-06-26 07:45:26

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: netcfg tray icon v3

Maybe if you separate the GUI from its logic even more a KDE frontend would even possible. :-)

Offline

#19 2009-06-26 12:16:35

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

Pierre wrote:

Maybe if you separate the GUI from its logic even more a KDE frontend would even possible. :-)

It's already very separate, there's no networking logic in the GUI, it just calls a helper script which utilises the code below netcfg. Most of the netcfg related python code, like get_active_profiles() is reusable and in netcfg.py.

To give you an idea of how little there is in this tray applet, I wrote the original basic tray icon in about 2 hours because it's mostly just using interfaces that were already created. Since then, it's largely been tidying it up, adding configuration and packaging so it works on other systems than mine.

So netcfg-tray-helper could be leveraged by another app, as could 'netcfg.py' which contains some basic functions to query active profiles and load profile information. Though there's a few things which should probably be moved to netcfg.py like start/stop profiles.

I think a KDE frontend could be done very quickly, QT has QSystemTrayIcon, or KDE's plasmoids which can all be interfaced through python and leveraged pretty easily.

Last edited by iphitus (2009-06-26 12:17:47)

Offline

#20 2009-06-26 12:45:26

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: netcfg tray icon v3

i noticed that picking a new profile does not in fact disconnect the connected one... is this a desired behaviour?

Offline

#21 2009-06-26 13:22:08

ilembitov
Member
Registered: 2008-10-07
Posts: 124

Re: netcfg tray icon v3

Do I get this right, that this tray icon allows a NetworkManager-like functionality to laptop users, etc? Meaning, I can go to a wifi-enabled cafe and connect to a network easily?
Also, some screenshots would be nice. Can we expect an Archwiki article as soon as this thing (and the Netcfg version it depends on) gets stable?

Offline

#22 2009-06-26 14:32:15

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: netcfg tray icon v3

i noticed a new update....any changes we should know of?

Offline

#23 2009-06-26 14:33:46

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg tray icon v3

uploaded v3, again more small fixes.

- picking a new profile on an active interface now disconnects the existing profile (thanks eldragon)
- tooltip gives more useful information
- factored out another couple of functions to netcfg.py

PKGBUILD: http://aur.archlinux.org/packages.php?ID=27601
Source: ftp://ftp.archlinux.org/other/netcfg/tr … y-3.tar.gz
Package: ftp://ftp.archlinux.org/other/netcfg/tr … pkg.tar.gz

ilembitov: ftp://ftp.archlinux.org/other/netcfg/tr … g-tray.png - The icon does not have a black background, that's just the intel drivers or import not taking a proper screenshot. If you've been to that cafe before and made a profile already, then yes, just select the profile in the menu. If you've never been there, you'll need to create the profile, then you can connect. Oh, and it'll get a wiki entry/webpage, and all that soon.

Last edited by iphitus (2009-06-26 14:46:44)

Offline

#24 2009-06-26 19:29:39

ilembitov
Member
Registered: 2008-10-07
Posts: 124

Re: netcfg tray icon v3

@iphitus I never used netcfg before, so probably my question may be dumb, but still... In my city, most cafes with free wifi access are run by one provider. So, for example, my current GNOME/NetworkManager laptop has an entry for a wifi connection named "GoldenWifi_free" (this is how the connection appears in all cafes where this provider offers its services). So, NetworkManager uses this entry everytime he finds a connection under this name. Will this also work that way with netcfg? Can I get a single profile for that "GoldenWifi_free" and use it in all locations where this connection is present?

Offline

#25 2009-06-26 21:12:03

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: netcfg tray icon v3

ilembitov wrote:

@iphitus I never used netcfg before, so probably my question may be dumb, but still... In my city, most cafes with free wifi access are run by one provider. So, for example, my current GNOME/NetworkManager laptop has an entry for a wifi connection named "GoldenWifi_free" (this is how the connection appears in all cafes where this provider offers its services). So, NetworkManager uses this entry everytime he finds a connection under this name. Will this also work that way with netcfg? Can I get a single profile for that "GoldenWifi_free" and use it in all locations where this connection is present?

Yes, so long as all connections by that SSID use the same security model.


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB