You are not logged in.

#1 2014-08-02 09:39:38

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

netctl-gui: Qt based GUI for netctl and plasmoid

Hi, guys,

Recently I've pushed a new release of the application and I think that it is ready for presentation to world-wide Arch community.

What is it?
It was started as KDE widget and DataEngine (KDE specific system backend) and then I've added a Qt graphical interface which provides a common interactions with netctl, such as wifi-menu, profile creation and connection to a profile. I want note that the GUI doesn't depend on any KDE component except for kdebase-runtime if you want to use kdesu as sudo frontend. Also it doesn't depend on any additional stuff which isn't required by netctl.

Feel free to ask me for a new features. It is highly probable that it will be added to the project.

Unfortunately, the current version provides only English and Russian translations, but if you want to create a translation for your language you are welcome smile

Features

  • Full interaction with netctl

  • Profile creation support. It support all available options which are described in netctl.profile man page.

  • Wifi-menu based on wpa_supplicant and netctl-auto support

  • DBus interface

  • KDE widget which can be transformed into panel/system tray popup applet.

  • Сomponents are fully customizable. Any command may be replaced by any other.

  • It has minimal dependencies list.

  • Components for developers - shared library and DataEngine.

Components

  • Widget and DataEngine for KDE (AUR link). BTW you may use the DataEngine for your own KDE widgets.

  • Widget and DataEngine for Plasma 5 (AUR link).

  • Qt5-based shared library for interaction with netctl (AUR link). HTML documentation may be found here.

  • Qt5-based helper daemon (AUR link). HTML documentation may be found here.

  • Qt5-based graphical interface (AUR link). It is a recommended version of the application.

  • Qt4 graphical interface (AUR link) (helper, library). Although the recommended version is Qt5-based, I plan to continue the development for both Qt versions as long as it is possible.

Screenshots
(More screenshots may be found on the Project Homepage.)
Application
netctl-gui_main_prev.jpg
netctl-gui_profile_prev.jpg
netctl-gui_wifi_prev.jpg
Widget
netctl-gui_plasmoid_prev.jpg
DataEngine
netctl-gui_dataengine_prev.jpg

Links

Last edited by arcan1s (2015-01-12 16:43:13)

Offline

#2 2014-08-04 05:43:28

mhogomchungu
Member
Registered: 2013-03-29
Posts: 69

Re: netctl-gui: Qt based GUI for netctl and plasmoid

just looked at the source code and i noticed you are doing a lot of something like:

Qprocess p ;

p.start() ;

p.waitForFinished(-1)  ;

example is here[1]

These are blocking calls and if the mentioned line blocks for 10 seconds,the entire plasma desktop will hang with it for those ten seconds and that is not good GUI programming.

You can renamed "netctl" tool and add a substitute to it that blocks for 5 seconds before calling the real "netctl" to see how your tool will behave on slow responding "netctl" and i doubt the experience will be pretty.


[1] https://github.com/arcan1s/netctl-gui/b … l.cpp#L279

Offline

#3 2014-08-04 10:19:12

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

mhogomchungu wrote:

These are blocking calls and if the mentioned line blocks for 10 seconds,the entire plasma desktop will hang with it for those ten seconds and that is not good GUI programming.

You can renamed "netctl" tool and add a substitute to it that blocks for 5 seconds before calling the real "netctl" to see how your tool will behave on slow responding "netctl" and i doubt the experience will be pretty.

Thank you for the report.

The line on the link to which you refer is a defect since all netctl calls from plasmoid should be detached. In this case (stoping profile before start another one) it should have signal-slot model. It will be fixed. I also plan to rewrite DataEngine to use signal-slot model (as I did it for another DataEngine) (for example the current external IP test from DE really causes system freeze and that's why it is disabled by default).

As for GUI/library I don't plan to change the current model, because all actions must be consistent. Moreover I specifically block any actions while netctl works by disabling interface. The simple example is user may run 'stop profile' and 'restart profile' immediately. But if you don't agree with me, I'm open to discussion smile

Last edited by arcan1s (2014-08-04 10:30:46)

Offline

#4 2014-08-04 20:37:07

mhogomchungu
Member
Registered: 2013-03-29
Posts: 69

Re: netctl-gui: Qt based GUI for netctl and plasmoid

No disagreement from me as long as you are not calling blocking APIs on the main thread.How you are doing so is a matter of opinion and taste and detaching QProcess instance is just as good as any other way.

You should take it as a rule to not call blocking API on the main thread.The main thread of a plasmoid or dataEngine runs on plasma-desktop's main thread and that means any blocking on a plasmoid or dataEngine will result in the entire plasma-desktop hanging.

For example in your other project here[1],that line will block plasma-desktop and that is not something you should do.The blocking window maybe too small for you to notice on your computer but somebody,somewhere,has a slow computer and it will be visible.

I have a project here[2] that will allow you to write synchronous without blocking using Task::await API.

With my API,the function ExtendedSysMon::getAllHdd() could be changed to something like this[3] that will give you synchronous API without blocking the calling thread while waiting for the result.

[1] https://github.com/arcan1s/pytextmonito … on.cpp#L62
[2] https://github.com/mhogomchungu/tasks
[3]http://pastebin.com/qy9tL8j7

Last edited by mhogomchungu (2014-08-04 20:52:21)

Offline

#5 2014-08-05 06:16:29

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

wow, thank you for link to the your project. I think I will rewrite some function to include functionality that provides by tasks.

Offline

#6 2014-08-19 05:15:30

mhogomchungu
Member
Registered: 2013-03-29
Posts: 69

Re: netctl-gui: Qt based GUI for netctl and plasmoid

hey,
just wondering what you think of the task library based on your use case.

Found any problem you had to work around in any way?

Offline

#7 2014-08-19 19:15:57

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

thank you for your development again smile Including it in the project allow me to reduce the number of supported code and to run backend functions (which uses 3rdparty applications) without blocking GUI. For example definition of external IP, which uses curl, works w\o any problem (if I had used the standard library call, it causes .5 sec freezes for me).

I don't find any problem with task both for autotests and for manual tests (but I should note that I use only part of the features).

Offline

#8 2014-08-19 19:37:15

mhogomchungu
Member
Registered: 2013-03-29
Posts: 69

Re: netctl-gui: Qt based GUI for netctl and plasmoid

arcan1s wrote:

thank you for your development again smile Including it in the project allow me to reduce the number of supported code and to run backend functions (which uses 3rdparty applications) without blocking GUI. For example definition of external IP, which uses curl, works w\o any problem (if I had used the standard library call, it causes .5 sec freezes for me).

I don't find any problem with task both for autotests and for manual tests (but I should note that I use only part of the features).

thanks for your feedback and i am glad it works as advertised :-).

Offline

#9 2014-08-25 13:04:41

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

Release 1.3.0, the start topic has been updated. Significant changes:

  • Add test support of several active profiles

  • Rewrite to use task instead of direct QProcess calls

  • Rewrite DataEngine to better integration with Qt

  • Add helper daemon, which allows users to control netctl w\o sudo. Running as normal user it will provide access too, since capabilities are used (CAP_SETUID). (Optional integration with the widget and GUI)

  • Add DBus interface

  • Add tray icon for GUI which can be used as an alternative to the widget

  • Changes in the graphical interface

Full ChangeLog

Offline

#10 2014-10-10 12:31:31

chaonaut
Member
From: Kyiv, Ukraine
Registered: 2014-02-05
Posts: 317

Re: netctl-gui: Qt based GUI for netctl and plasmoid

very nice app, but i can't figure out how can it be used properly without kdesu.
should it be started as «sudo netctl-gui» ?
when started from user, it just reports itself as «inactive» and does not list any profiles.
when started from root, it works as expected.
user is a member of network group, but seems like this is insufficient.


— love is the law, love under wheel, — said aleister crowley and typed in his terminal:
usermod -a -G wheel love

Offline

#11 2014-10-10 17:21:15

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

Does user has rights to list directory with netctl profiles? Does you use helper? Because if you use helper you don't need to use sudo normally. If you use it you can try to run it using systemd:

systemctl start netctlgui-helper

BTW list of available profiles comes from listing /etc/netctl/ and normally it doesn't requires any special permission

Last edited by arcan1s (2014-10-10 17:58:15)

Offline

#12 2014-10-11 08:18:25

chaonaut
Member
From: Kyiv, Ukraine
Registered: 2014-02-05
Posts: 317

Re: netctl-gui: Qt based GUI for netctl and plasmoid

thanks for clearing things up, enabling & running netctlgui-helper solved my issue.


— love is the law, love under wheel, — said aleister crowley and typed in his terminal:
usermod -a -G wheel love

Offline

#13 2015-01-12 16:45:53

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

Release 1.4.0, the start topic has been updated. Significant changes:

  • Change settings format from shell-like to ini

  • Create Plasma 5 components (may be unstable)

Full ChangeLog

Offline

#14 2015-03-20 00:33:27

arcan1s
Trusted User (TU)
From: Moscow
Registered: 2013-09-27
Posts: 11
Website

Re: netctl-gui: Qt based GUI for netctl and plasmoid

1.4.1 is out. Significant changes are:

Full ChangeLog

NOTE Plasma 5 widget should be still marked as beta since it wasn't tested on real machine (only in VBox)

Last edited by arcan1s (2015-03-20 00:35:49)

Offline

Board footer

Powered by FluxBB