You are not logged in.

#26 2013-04-30 11:30:21

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: connman_dmenu: netcfg(netctl) alternative!

I use connman in a wpa2-psk network and it connects just fine. The profile looks like this.

# cat /var/lib/connman/***-psk.config 
[service_wifi_***_***_managed_psk]
Type = wifi
Name = ***
Passphrase = ***

I'm also using connman-git.

Offline

#27 2013-04-30 11:33:11

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: connman_dmenu: netcfg(netctl) alternative!

To me it seems it can't create the service_wifi_.... for a wpa2 network: if I connect to a unencrypted network, in /var/lib/connman/ I can see the new service, while with an encrypted network it isn't there.

Offline

#28 2013-04-30 12:18:43

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: connman_dmenu: netcfg(netctl) alternative!

Sounds like a bug, don't you think? I'd suggest to tell upstream.

Offline

#29 2013-05-05 19:00:59

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: connman_dmenu: netcfg(netctl) alternative!

Hey taylorchu, I have a question:

In the list of available networks, you display them like $ssid_$number. Is there a specific reason for this? I was wondering in silence about this, but just now I read https://bbs.archlinux.org/viewtopic.php … 7#p1268317 and it looks like this causes problems for others too (I did the same workaround). Afair you didn't have _$number in your earlier releases.

Offline

#30 2013-05-06 08:55:53

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

@army
the number is trying to prevent ssid name collision. I pushed a newer solution to this. Please test.


"After you do enough distro research, you will choose Arch."

Offline

#31 2013-10-13 05:31:39

bout10bucks
Member
Registered: 2009-09-11
Posts: 25

Re: connman_dmenu: netcfg(netctl) alternative!

Trying to set this to a keybinding in openbox, but for some reason it doesn't have any output other than "select wifi network" so it is running somewhat. If I run it from a terminal then it works great, or if I set the binding to urxvt -e connman_dmenu it works, but very ugly to launch a terminal to launch a program. Also, root is no longer needed, but seen someone already posted it on git. Any help would be appreciated

Offline

#32 2014-01-15 06:50:12

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

@everyone
* correct the link
* add vpn pptp support
1. choose "setup vpn pptp"
2. type the name (ucla vpn, it can be anything you like), domain (pptp.vpn.ucla.edu for example),  id, and password.
3. run the app again, and you will be able to choose a newly created service (no routing config required)

Last edited by taylorchu (2014-01-15 06:51:52)


"After you do enough distro research, you will choose Arch."

Offline

#33 2014-01-18 12:36:07

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: connman_dmenu: netcfg(netctl) alternative!

I'm thinking about trying this, but I can't quite understand the technical advantages over netctl. Is it faster (netctl is faster than the old netcfg, hence the question)
Does connman also support "net-auto" syle behaviour/roaming?

I like the idea of having everything working with dmenu, just had some tech questions I couldn't answer by reading the FAQ. thanks

Offline

#34 2014-01-18 13:10:55

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

Re: connman_dmenu: netcfg(netctl) alternative!

el mariachi wrote:

I'm thinking about trying this, but I can't quite understand the technical advantages over netctl. Is it faster (netctl is faster than the old netcfg, hence the question)
Does connman also support "net-auto" syle behaviour/roaming?

I like the idea of having everything working with dmenu, just had some tech questions I couldn't answer by reading the FAQ. thanks

I found this script somewhere to use netctl with dmenu:

#!/bin/sh
PROFILE=`ls -l /etc/netctl | grep ^- | awk '{print $9}' | /usr/bin/dmenu -p "Selecteer profiel:" $*`
if [ "empty$PROFILE" != "empty" ]; then
    sudo netctl stop-all
    sudo netctl start $PROFILE
fi

I think I found it in the dmenu thread.


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

#35 2014-01-18 13:39:34

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

Re: connman_dmenu: netcfg(netctl) alternative!

el mariachi wrote:

I'm thinking about trying this, but I can't quite understand the technical advantages over netctl. Is it faster (netctl is faster than the old netcfg, hence the question)
Does connman also support "net-auto" syle behaviour/roaming?

As far as I know, connman behaves a bit better with automatic connections. It is designed for mobile use, after all. netctl is great to build customized profiles while connman is more of a leightweight alternative to the Gnome NetworkManager.


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

Offline

#36 2014-01-18 14:26:11

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: connman_dmenu: netcfg(netctl) alternative!

Thanks guys!

dbus has crashed?:

 ~  connmanctl
process 6785: dbus message iterator is NULL
  D-Bus not built with -rdynamic so unable to print a backtrace
[1]    6785 abort (core dumped)  connmanctl

EDIT: forget it... connman.service wasn't started

Last edited by el mariachi (2014-01-18 14:46:05)

Offline

#37 2014-01-18 19:45:22

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

@everyone
1. I fixed some bugs which were introduced recently.
2. to use this, connman.service needs to be enabled. If you also want to use vpn, connman-vpn.service needs to be enabled too.

Last edited by taylorchu (2014-01-18 20:11:13)


"After you do enough distro research, you will choose Arch."

Offline

#38 2014-01-18 23:31:49

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: connman_dmenu: netcfg(netctl) alternative!

this is pretty neat and fast I like it! my hosts file is not being used though.. I have everything set like in the "hostsblock" thread (dnsmasq and so forth). Do I have to redirect connman or something?

Offline

#39 2014-01-18 23:53:54

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: connman_dmenu: netcfg(netctl) alternative!

@el mariachi, either edit the configuration file created by connman_dmenu directly, or use connmanctl to modify the config.  Connmanctl is quite neat and drops you into its own kind of shell when you use it with no args.  From there you can access 'help' which will show you the ways in which you can modify configs.  I think you would just need to do 'config <your config> --nameservers 127.0.0.1 [whatever] [whatever]'.  (Where whatever are the other nameservers that it might fall back to... or that dnsmasq might get its info from).

Offline

#40 2014-01-19 01:01:01

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: connman_dmenu: netcfg(netctl) alternative!

so you can't just set a global nameserver? hmmkay. Changing the individual config worked, but it feels hacky. anyway, this is not connman_dmenu related. thanks

Offline

#41 2014-02-11 20:10:47

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: connman_dmenu: netcfg(netctl) alternative!

Whenever I try connecting with connman_dmenu to a secured network, I always get the same error message in dmenu "Invalid password" and it always asks for the password even if connman has a profile for said network.

running it from the command line shows nothing

Offline

#42 2014-02-14 03:15:08

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

thx for reporting the bug. it is fixed now


"After you do enough distro research, you will choose Arch."

Offline

#43 2014-02-14 09:06:07

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: connman_dmenu: netcfg(netctl) alternative!

It might be worth starting a wiki page for connman_dmenu might give users a chance to try it out rather than wading through a long post. I for one want to try it out on my laptop to see if it is better than using netctl.

MrG


Mr Green

Offline

#44 2014-02-23 06:03:05

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: connman_dmenu: netcfg(netctl) alternative!

Today I switched from netctl, which didn't have any issues for me, to connman.  In the wiki it pointed me to connman_dmenu-git so I am giving that a shot too.  One thing I noticed is that I don't know how to activate it besides

sudo connman_dmenu

in terminal.  Running the same line in dmenu results in nothing.  Also, in terminal, I did

time sudo connman_dmenu

and the result is 7s until connman_dmenu appears.  I'd love to adopt this but fear I am doing it wrong.  Any pointers or is this as designed?

Offline

#45 2014-02-23 10:36:49

sekret
Member
Registered: 2013-07-22
Posts: 283

Re: connman_dmenu: netcfg(netctl) alternative!

What about launching dmenu from a terminal, then run sudo connman_dmenu in dmenu and see the output in the terminal?

Offline

#46 2014-02-23 17:23:34

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

@frank604
you need to enable connman.service, and optionally enable connman-vpn.service if you want to use vpn.


"After you do enough distro research, you will choose Arch."

Offline

#47 2014-02-23 19:36:21

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: connman_dmenu: netcfg(netctl) alternative!

@sekret If dmenu is run, I return to terminal prompt with dmenu started.  So further actions from this point will never show in terminal.

@taylorchu, both are enabled and loaded.I am not trying to use vpn.  I made a short video https://www.dropbox.com/s/bqsg7j3ypejyt6q/first.mkv

Basically, to start sudo connman_dmenu, if I start it in terminal it'll take 7 seconds to show.  I was wondering if 7s is normal.  Next, If I run 'sudo connman_dmenu' from dmenu itself, no wireless AP are shown. (I also set connman_dmenu in visudo)  All it shows is  'setup vpn'.  Is this normal?  Thanks for the response.  I was just seeing if I'm doing this wrong as there isn't much documentation.  I would like to echo Mr Green's comment on starting a wiki page.

Offline

#48 2014-03-15 18:25:56

sekret
Member
Registered: 2013-07-22
Posts: 283

Re: connman_dmenu: netcfg(netctl) alternative!

I've had problems with dhcpcd@wlp1s0.service, which used to work fine until the latest update and dhclient doesn't provide a service file, so I switched to connman with this script here and I really like it!

One possible issue:
For wpa2 enterprise networks you only provide

...
EAP = peap
Phase2 = MSCHAPV2
...

but there are networks out there which use e.g.

EAP = ttls
Phase2 = PAP

(I use one such network, so that's proof enough I think big_smile )
What about providing those possibilities with

]$ diff connman_dmenu.old connman_dmenu.new
117a118
>  chmod 600 "${VPN_STORAGE_PATH}/${name}.config"
144a146,147
>    dmenu_ask "Please provide the EAP" eap
>    dmenu_ask "Please provide Phase2" phase2
149,150c152,153
<                       EAP = peap
<                       Phase2 = MSCHAPV2
---
>                       EAP = $eap
>                       Phase2 = $phase2
153a157
>    chmod 600 "$config_file"
160a165
>    chmod 600 "$config_file"

(untested!) edit: tested, workes fine, although it would be better to provide possible entries with echo -e "ttlp\npeap\notherstuff" | dmenu -p 'bla'. For this the dmenu_ask function had to be changed, which I'm not capable of, don't understand IFS= etc.
? Or is there a way to get those relevant informations from the network? AFAIK in networkmanager you also have to select that stuff manually, so my guess is that there's no way. But we are better than nm right? smile

Btw, netctl uses the settings I need as default, see /etc/netctl/examples/wireless-wpa-configsection. Maybe they are more common? I don't know..


edit: One more issue

The files /var/lib/connman/*.config are readable to everybody. But they include my passwords in plain form! So please make them readable for root only. For now I've done it manually. (edit: provided in the diff above)

Last edited by sekret (2014-03-17 20:55:51)

Offline

#49 2014-03-18 16:13:29

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: connman_dmenu: netcfg(netctl) alternative!

done. please test it


"After you do enough distro research, you will choose Arch."

Offline

#50 2014-03-18 17:11:17

sekret
Member
Registered: 2013-07-22
Posts: 283

Re: connman_dmenu: netcfg(netctl) alternative!

Dude you rock!! I'll be in the wpa enterprise network tomorrow, so I cannot give you a full ok right now. But if you setup a vpn network, the config file will still have 644 rights. Don't you want to chmod it to 600 as well? edit: Another idea, what about putting a

umask 0077

at the beginning of the script. Should solve all rights problems, right?

And - because I don't know anything about this - do PEAP/MSCHAPV2 and TTLS/PAP always only come pairwise? Is PEAP/PAP and TTLS/MSCHAPV2 not possible? Are those the only common combinations? Maybe we'll need some input from the community on this.

Last edited by sekret (2014-03-18 17:16:38)

Offline

Board footer

Powered by FluxBB