0

I have two different setups I use on my work laptop; one enables synergy over an ethernet ssh tunnel with my work computer on the local network, and the other opens an HTTP tunnel to my work computer from outside the network.

When I have wifi enabled at work, my laptop seems to use it by preference. This makes synergy run incredibly slowly. At home I must use wifi.

I have scripts that begin my ssh tunnels, add my ssh keys, and starts up other programs like synergy, and close themselves when I shut my laptop. However, every day I have to start out my routine by opening my gnome-control-center and turning on my ethernet.

I have tried route add and ifup, none of it works, so I dove into gnome-control-center's source code and found that it enabled the connection by libnm's method nm_client_activate_connection with some libnm specific structs that I am having trouble tracking down. I'm not much of a c programmer, and I'm not familiar with either GTK or libnm.

Does anybody know what fedora 17 does with ethernet connections to fully enable them? Or does anybody know what libnm does to fully enable an ethernet connection? Do I have to write a c script to run libnm for me to fully emulate whatever gnome-control-center is trying to do?

0

I would not use libnm to control it. NetworkManager publishes objects over D-Bus, so I would look at using dbus-send (or perhaps a script written in Python) to manipulate it.

  • Great, this looks like it will do! – Mike Fairhurst Jun 27 '13 at 21:21
0

Fedora 17 includes a cli tool nmcli. http://arstechnica.com/civis/viewtopic.php?t=1163023

I can bring ethernet up with nmcli con up 'System p5p1' and turn off wifi with nmcli con down id 'MyWifiNetworkName'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.