You are not logged in.

#1 2012-05-24 20:52:09

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

[SOLVED] A tray icon for netcfg?

Hey all,

Recently I have been playing around with Openbox instead of DWM and I have come to the point that I'm gonna use this as my primary WM for some time. In DWM, I just showed the network status in my statusbar but with Openbox this of course isn't possible (I use tint2 and don't want to use Conky).

I know there are several programs in AUR that give me a system tray icon for netcfg, but most are either unmaintained or out-dated. Can you tell me if there's an alternative to these or which of those unmaintained/out-dated ones work?

Thanks in advance!

Last edited by Unia (2012-05-27 22:18:57)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2012-05-24 22:45:44

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] A tray icon for netcfg?

https://aur.archlinux.org/packages.php?ID=49634

Might require a bit of fiddling, and the AUR maintainer does not seem to be too responsive.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-05-25 09:25:08

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] A tray icon for netcfg?

.:B:. wrote:

https://aur.archlinux.org/packages.php?ID=49634

Might require a bit of fiddling, and the AUR maintainer does not seem to be too responsive.

Indeed, he isn't. I had already placed a comment on that package before I posted this topic but I haven't gotten a reply yet. I'll play around with it in my breaks from studying and see if I can get it to work. I'll let you know.

In the meantime, any other suggestions?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2012-05-25 09:53:25

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] A tray icon for netcfg?

Hm.. just built the package. So far, it's not working:

┌─[jente@lappy netcfg-tray-git][11:50:45] 
└─> netcfg-tray

** (process:3624): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:3624): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:3624): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
/home/jente/.config/netcfg-tray/config
Traceback (most recent call last):
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg-tray.py", line 275, in <module>
    tray = NetcfgTray()
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg-tray.py", line 52, in __init__
    self.update_status_icon()
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg-tray.py", line 223, in update_status_icon
    profiles = netcfg.get_active_profiles()
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg.py", line 36, in get_active_profiles
    profs=[Profile(x) for x in os.listdir(state_dir) if not os.path.isdir(os.path.join(state_dir,x)) ]   
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg.py", line 76, in __init__
    self.update(read_config(self.filename))
  File "/usr/share/pyshared/netcfg-tray-git-20120525-1/netcfg.py", line 13, in read_config
    cfg = shlex.split(open(config, "r").read())
IOError: [Errno 13] Toegang geweigerd: '/etc/network.d/Homenetwork'

I'm a complete disaster on Python. Can anyone tell me what's going on here? (or should I open a new thread at this in the AUR section?)

.:B:., I noticed you have posted a comment on that AUR page too. Are you using it and if so, is it working for you?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5 2012-05-27 17:41:42

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] A tray icon for netcfg?

After a bit of Googling, I now found this:
https://bbs.archlinux.org/viewtopic.php?id=74742

However, this time, when running it with sudo, I get:

┌─[jente@lappy Downloads][19:40:26] 
└─> sudo netcfg-tray
  File "/usr/bin/netcfg-tray", line 211
    print message 
                ^
SyntaxError: invalid syntax

Anyone?

EDIT: The ^ is actually under the last 'e' of 'message'

Last edited by Unia (2012-05-27 17:42:04)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#6 2012-05-27 19:37:15

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] A tray icon for netcfg?

I use Arch Assistant with XFCE.  It works fine, but takes a little tweaking to get it to connect as a normal user with Netcfg.

http://kde-apps.org/content/show.php?content=76760

https://wiki.archlinux.org/index.php/Ne … _.28GUI.29

Offline

#7 2012-05-27 22:01:44

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] A tray icon for netcfg?

Unia, I have tested it yes. You should run it with Python 2 instead of Python 3, that should fix the error(s).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2012-05-27 22:18:47

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] A tray icon for netcfg?

.:B:. wrote:

Unia, I have tested it yes. You should run it with Python 2 instead of Python 3, that should fix the error(s).

Thanks, that works indeed! Consider this solved!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB