You are not logged in.

#1 2012-08-03 18:48:41

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

There are always people who prefer GUI frontends to CLI frontends. I like the simplicity Frontends provide, personally. So, because I use NetCTL over WICD and NetworkManager, I'm designing a whole new frontend for NetCTL.

Features:

  • Scanning for new networks via iwlist (Complete)

  • GUI way to create new profiles (Complete)

  • Connecting to any created profiles(Complete)

  • Automatic connection to created profiles (if WiFiz is running, and network is in range) - can be disabled (Completed, I think. It may not have gone to the git though, but it was working locally earlier.)

  • Simple, intuitive interface for Gnome/GTK (Complete)

  • Simple editing of current profiles(WIP)

  • Automatically connect to open/unsecured networks (disabled on first run, enable through preferences) (WIP)

  • Integration with Gnome Shell (an indicator in the top right bar of gnome, where volume etc... is, e.g. the panel) (Slightly, but badly, implemented)

  • Open source under custom MIT license

That is the current feature list. If anybody has any ideas to add to it, I would love to hear them!


ORj6s.png
The Main Interface

WiFiz is now available in the AUR: https://aur.archlinux.org/packages/wifiz-git/


The Custom MIT license:

Copyright (c) 2012 Cody Dostal, Pivotraze
       
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
       
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Cody Dostal https://github.com/codywd and its contributors", in the same place and form as other third-party acknowledgments. Alternatively, this acknowledgment may appear in the software itself, in the same form and location as other such third-party acknowledgments.
       
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Last edited by pivotraze (2014-03-10 15:13:07)

Offline

#2 2012-08-03 19:18:51

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

pivotraze wrote:

There are always people who prefer frontends to CLI.

Er, you should say "prefer GUI (frontends) to CLI (frontends)". I'm not one of those people, so that's the only feedback I can give you -- I only read this topic because it wasn't clear it was a GUI frontend tongue

Offline

#3 2012-08-03 19:30:18

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Raynman wrote:
pivotraze wrote:

There are always people who prefer frontends to CLI.

Er, you should say "prefer GUI (frontends) to CLI (frontends)". I'm not one of those people, so that's the only feedback I can give you -- I only read this topic because it wasn't clear it was a GUI frontend tongue

Haha woops smile I forgot they are both technically frontends, I reworded it smile

Offline

#4 2012-08-03 19:47:08

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

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

And we're always curious to see how it looks; so show us a screenshot!

And does it have a system tray icon?

Last edited by Unia (2012-08-03 19:47:20)


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-08-03 21:55:46

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Unia wrote:

And we're always curious to see how it looks; so show us a screenshot!

Here is the first screenshot!

ORj6s.png

Very basic right now, completes scanning and displays all networks. Even iwlist only shows one network around me tongue Might have to go into town to test it more thoroughly.

And does it have a system tray icon?

Not yet, but I can definitely add one!


I need a more... unique logo. This is my current logo tongue
stock_network_24.png

Offline

#6 2012-08-03 22:24:58

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

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

IMO, a systray would make it a viable alternative to WICD or Networkmanager. It's the one thing I missed from the Netcfg GUI frontends when I was back with Openbox for a while. If you have the time to do it, I'd say go for it!


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

#7 2012-08-03 22:27:00

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Unia wrote:

IMO, a systray would make it a viable alternative to WICD or Networkmanager. It's the one thing I missed from the Netcfg GUI frontends when I was back with Openbox for a while. If you have the time to do it, I'd say go for it!

I definitely will try to work it in! It'll be a new learning experience for sure smile

Any ideas on where I can find a tutorial on it? I've never even learned about this part of applications tongue I use wxPython on Python 2.7.3. If there is a cross-de way to do it (so it works on Gnome 3, KDE, Mate maybe?) what is it? Thanks! smile

Last edited by pivotraze (2012-08-03 22:31:19)

Offline

#8 2012-08-03 22:33:17

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

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

I have no idea, am no programmer myself. I can only copy/paste config files big_smile wish you good luck though, and if you need a tester I'm in for it.


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

#9 2012-08-03 22:55:34

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Unia wrote:

I have no idea, am no programmer myself. I can only copy/paste config files big_smile wish you good luck though, and if you need a tester I'm in for it.

I will post an open beta ASAP. I have a github up for it on my personal Github. https://github.com/codywd

It'll be up in a second smile It's not ready for general use though yet (the connection part isn't programmed just yet.)

*EDIT* The git is up now

Last edited by pivotraze (2012-08-03 23:12:06)

Offline

#10 2012-08-03 23:35:59

progandy
Member
Registered: 2012-05-17
Posts: 5,180

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

pivotraze wrote:

Any ideas on where I can find a tutorial on it? I've never even learned about this part of applications tongue I use wxPython on Python 2.7.3. If there is a cross-de way to do it (so it works on Gnome 3, KDE, Mate maybe?) what is it? Thanks! smile

The class wx.TaskBarIcon could work.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2012-08-04 00:17:02

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

progandy wrote:
pivotraze wrote:

Any ideas on where I can find a tutorial on it? I've never even learned about this part of applications tongue I use wxPython on Python 2.7.3. If there is a cross-de way to do it (so it works on Gnome 3, KDE, Mate maybe?) what is it? Thanks! smile

The class wx.TaskBarIcon could work.

Thank you! I will get to work on it soon

Offline

#12 2012-08-04 16:51:19

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

I don't always use GUIs, but when I do, I like them to feel native. I love the idea of this project, and so far, it looks like you've done very well getting it started. I only have one question / possible feature request. Is it planned to ever support binding the tray icon to the panel? NetworkManager doesn't like me, and, in return, I have come to dislike it. However, having the ability to still monitor my network connectivity from GNOME would be nice. If that functionality were ever made, it would allow me to use netCFG as a complete alternative to NetworkManager, which would make me very happy.

I don't know if you have anything like that planned, but I quite hope that you do. Even if you don't, it looks like this is coming along very well!

All the best,

-HG

Last edited by HalosGhost (2012-08-05 22:42:53)

Offline

#13 2012-08-04 19:39:19

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

HalosGhost wrote:

I don't always use GUIs, but when I do, I like them to feel native. I love the idea of this project, and so far, it looks like you've done very well getting it started. I only have one question / possible feature request. Is it planned to ever support binding the tray icon to the panel. NetworkManager doesn't like me, and, in return, I have come to dislike it. However, having the ability to still monitor my network connectivity from GNOME would be nice. If that functionality were ever made, it would allow me to use netCFG as a complete alternative to NetworkManager, which would make me very happy.

I don't know if you have anything like that planned, but I quite hope that you do. Even if you don't, it looks like this is coming along very well!

All the best,

-HG

I could definitely try and work it in! It's a great idea. It might be slightly separate because, as I understand it (and it may be wrong), that would require a Gnome-Shell extension. So I could write one that binds to the information WiFiz provides smile

Offline

#14 2012-08-05 00:13:50

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

pivotraze wrote:

I could definitely try and work it in! It's a great idea. It might be slightly separate because, as I understand it (and it may be wrong), that would require a Gnome-Shell extension. So I could write one that binds to the information WiFiz provides smile

It wouldn't necessarily require one, I don't think. But, you (or someone) could theoretically write the extension as a separate piece but have the extension packaged and list it as an optional dependency (or just upload it to extensions.gnome.org). the latter would likely be preferable as it would allow those who want to use it to do so, but no one would have to.

I have some limited experience with writing/modifying GNOME Shell Extensions, so when you get this to a point that you'd like some help with this side-project, feel free to let me know, and I'll try my hand at it.

All the best,

-HG

Last edited by HalosGhost (2012-08-05 00:14:44)

Offline

#15 2012-08-10 02:42:59

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

HalosGhost wrote:
pivotraze wrote:

I could definitely try and work it in! It's a great idea. It might be slightly separate because, as I understand it (and it may be wrong), that would require a Gnome-Shell extension. So I could write one that binds to the information WiFiz provides smile

It wouldn't necessarily require one, I don't think. But, you (or someone) could theoretically write the extension as a separate piece but have the extension packaged and list it as an optional dependency (or just upload it to extensions.gnome.org). the latter would likely be preferable as it would allow those who want to use it to do so, but no one would have to.

The latter (uploading to extensions.gnome.org) was what I was planning smile

I have some limited experience with writing/modifying GNOME Shell Extensions, so when you get this to a point that you'd like some help with this side-project, feel free to let me know, and I'll try my hand at it.

All the best,

-HG

When it's to that point, I will send you a .tar.gz with all the code, so you can look at the functions etc... without cloning the Git smile

Offline

#16 2012-08-12 21:00:19

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

pivotraze wrote:

The latter (uploading to extensions.gnome.org) was what I was planning smile

When it's to that point, I will send you a .tar.gz with all the code, so you can look at the functions etc... without cloning the Git smile

I mean, it would probably be simpler for me to just clone the git and work from it; but if you'd rather send me a tarball of the source-code, that's fine too. Just let me know. Partially related: I shot you an email a while back regarding the icon, any thoughts? Also, feel free to hit me up through email for any of these correspondences.

All the best,

-HG

Offline

#17 2012-09-09 01:36:21

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

HalosGhost wrote:
pivotraze wrote:

The latter (uploading to extensions.gnome.org) was what I was planning smile

When it's to that point, I will send you a .tar.gz with all the code, so you can look at the functions etc... without cloning the Git smile

I mean, it would probably be simpler for me to just clone the git and work from it; but if you'd rather send me a tarball of the source-code, that's fine too. Just let me know. Partially related: I shot you an email a while back regarding the icon, any thoughts? Also, feel free to hit me up through email for any of these correspondences.

All the best,

-HG

I actually never got an email? It might be because the forum was on the wrong email, that was deleted a while back smile You could forward it to <email now redacted>

Last edited by pivotraze (2012-09-09 03:03:58)

Offline

#18 2013-01-31 06:05:57

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

I have switched the backend over from NetCFG to NetCTL. This is because it better integrates with systemd. WiFiz is still written in WX and Python. The git is still at: https://github.com/codywd/WiFiz

I have implemented the icon made by HalosGhost, and will be adding a systray icon to it as it is more functional.

The app has a bug I have noticed, but am not quite sure (yet) how to fix. The bug is that it will find multiple networks via iwlist scan, but will not add them all, just replace with whatever the last found network is.

The code(s) I have tried:

if os.path.isfile(logfile):
            f = open(logfile, 'r+')
            f.truncate()
            f.close()
        else:
            logging.error("No file exists!!")

        output = str(subprocess.check_output("iwlist scan", shell=True))
        f = open(logfile, 'w')
        f.write(output)
        f.close()        

        f = open(logfile).read()
        for line in open(logfile):
            if "ESSID" in line:
                begin = line.replace(" ", "")
                mid = begin.replace("ESSID:", "")
                final = mid.replace('"', "")
            if "Quality" in line:
                s = str(line)
                s2 = s[28:33]
            if "Encryption" in line:
                if "WPA2" in line:
                    encrypt = "WPA2"
                else:
                    encrypt = "WEP"
            self.index + 1

        ilogfile = os.getcwd() + "/iwconfig.log"
        
        outputs = str(subprocess.check_output("iwconfig | grep " + self.UIDValue, shell=True))
        f = open(ilogfile, 'w')
        f.write(outputs)
        f.close()

        d = open(ilogfile, 'r')
        v = d.read()
        if final in v:
            connect = "yes"
        else:
            connect = "no"

        lines = "Line %s" % self.index
        self.APList.InsertStringItem(self.index, lines)
        self.APList.SetStringItem(self.index, 0, final)  
        self.APList.SetStringItem(self.index, 1, s2)
        self.APList.SetStringItem(self.index, 2, encrypt)
        self.APList.SetStringItem(self.index, 3, connect)

        logging.info("AP Scan completed, and saved.")

And

if os.path.isfile(logfile):
            f = open(logfile, 'r+')
            f.truncate()
            f.close()
        else:
            logging.error("No file exists!!")

        output = str(subprocess.check_output("iwlist scan", shell=True))
        f = open(logfile, 'w')
        f.write(output)
        f.close()        

        f = open(logfile).read()
        for line in open(logfile):
            lines = "Line %s" % self.index
            self.APList.InsertStringItem(self.index, lines)
            if "ESSID" in line:
                begin = line.replace(" ", "")
                mid = begin.replace("ESSID:", "")
                final = mid.replace('"', "")
                self.APList.SetStringItem(self.index, 0, final) 
            if "Quality" in line:
                s = str(line)
                s2 = s[28:33]
                self.APList.SetStringItem(self.index, 1, s2)
            if "Encryption" in line:
                if "WPA2" in line:
                    encrypt = "WPA2"
                else:
                    encrypt = "WEP"
                self.APList.SetStringItem(self.index, 2, encrypt)
            self.index + 1

        ilogfile = os.getcwd() + "/iwconfig.log"
        
        outputs = str(subprocess.check_output("iwconfig | grep " + self.UIDValue, shell=True))
        f = open(ilogfile, 'w')
        f.write(outputs)
        f.close()

        d = open(ilogfile, 'r')
        v = d.read()
        if final in v:
            connect = "yes"
        else:
            connect = "no"  

        self.APList.SetStringItem(self.index, 3, connect)

        logging.info("AP Scan completed, and saved.")

Neither works. The second causes a lot of lines saying "Line 0". I don't know why.

Regardless, it will be fixed later.

Another thing I don't know why it doesn't work is:

iwlist scan in terminal returns:

wlp2s0    Scan completed :
          Cell 01 - Address: E0:91:F5:7D:C9:14
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=66/70  Signal level=-44 dBm  
                    Encryption key:on
                    ESSID:"MomAndKids"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000023b0e2999cc
                    Extra: Last beacon: 2423733ms ago
                    IE: Unknown: 000A4D6F6D416E644B696473
                    IE: Unknown: 010882840B162430486C
                    IE: Unknown: 03010B
                    IE: Unknown: 2A0104
                    IE: Unknown: 2F0104
                    IE: Unknown: 32040C121860
                    IE: Unknown: 2D1A7C181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D160B001300000000000000000000000000000000000000
                    IE: Unknown: 4A0E14000A002C01C800140005001900
                    IE: Unknown: 7F0101
                    IE: Unknown: DD050050F20500
                    IE: Unknown: DD7C0050F204104A00011010440001021041000100103B00010310470010CC0317EE390868DD4B2A8BA6A3A31E111021000D4E4554474541522C20496E632E10230009574E5232303030763210240009574E523230303076321042000230311054000800060050F204000110110009574E52323030307632100800020084
                    IE: Unknown: DD090010180205F0000000
                    IE: Unknown: DD1E00904C337C181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C340B001300000000000000000000000000000000000000

lo        Interface doesn't support scanning.

enp3s0    Interface doesn't support scanning.

but when my app is ran, it returns:

lo        Interface doesn't support scanning.

enp3s0    Interface doesn't support scanning.

It is like is completely ignores wlp2s0 (my wireless adapter)

Offline

#19 2013-01-31 07:02:05

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Are you passing it with root permissions? As far as I know iwlist has always required me to pass it with sudo/su -c to properly return all the results.

All the best,

-HG

Offline

#20 2013-01-31 08:22:23

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Yea, I require/force root at the top of the script via

euid = os.geteuid()

if euid != 0:
    args = ['gksudo', sys.executable] + sys.argv + [os.environ]
    os.execlpe('sudo', *args)

Offline

#21 2013-02-01 08:10:48

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

Added a wizard for New Profile Creation.

Page 1:
IT7g7hm.png

Page 2:
YqoVwgO.png

Page 3:
xLg39nW.png

Page 4:
FrKZC5k.png


Page 5:
yO8nY30.png


Page 6:
8auaRaE.png

Offline

#22 2013-02-01 13:00:22

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

pivotraze, a lot of these dialogs would make much more sense to be done as radio dialogs rather than text input. Is there any particular reason you're favoring textbox input rather than a "Choose which type of interface you'd like" interface?

All the best,

-HG

Offline

#23 2013-02-02 00:51:28

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

HalosGhost wrote:

pivotraze, a lot of these dialogs would make much more sense to be done as radio dialogs rather than text input. Is there any particular reason you're favoring textbox input rather than a "Choose which type of interface you'd like" interface?

All the best,

-HG

Well, a few, like the security type, etc... (now that I'm fully rested. It was a late night lol) will definitely be better as radio.

The reason interface isn't, is because I'm not fully sure how to dynamically add based on available interfaces, and so on. It'd be easier on my side, and potentially on the users side, to have them type in their desired interface.

Like, my wireless interface is wlp2s0, I'm sure most people's isn't.

Offline

#24 2013-02-02 10:00:20

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

You could enumerate which ones are available with "ls /sys/class/net" (as per the wiki). But even without those, connection type and security type, at least, would certainly be simpler as radio.

The other question is, how difficult would it be to put these all on one window rather than having to click through each step? Could/Should make the setup quite a bit faster and more transparent if all the steps are on one screen.

All the best,

-HG

Last edited by HalosGhost (2013-02-02 10:02:58)

Offline

#25 2013-02-03 03:20:29

pivotraze
Member
From: Missoula, MT
Registered: 2011-08-21
Posts: 113

Re: WiFiz - A NetCTL GUI Frontend - Under Development (AUR!)

You could enumerate which ones are available with "ls /sys/class/net" (as per the wiki). But even without those, connection type and security type, at least, would certainly be simpler as radio.

I did not know about that file, so that will likely be implemented in the next release. But connection type, and security type are now radio. SSID will stay textbox, as I don't see any plausible way to do this otherwise, obviously password can not be anything else smile

So I learned about os.listdir, which is how I figure out the files in /sys/class/net.

This is how the first window displays now:
JaqWGw5.png



The other question is, how difficult would it be to put these all on one window rather than having to click through each step? Could/Should make the setup quite a bit faster and more transparent if all the steps are on one screen.
All the best,
-HG

I originally planned on doing that, and I'm certainly not against it, but I found the current setup easier to use as I could describe in more detail what each step was asking. Obviously, for the large majority of arch users, it won't matter if I do this as they will know what each is asking. But there are some threads in the newbie center that ask the same questions I try to describe.

Last edited by pivotraze (2013-02-03 03:41:34)

Offline

Board footer

Powered by FluxBB