Cliff Hacks Things.

Saturday, November 24, 2007

eeebuntu tip: ifup/down for NetworkManager

By switching to NetworkManager, I lost the use of the Linux ifup/ifdown scripts for quickly bringing network interfaces up and down. (These scripts rely on the information in /etc/network/interfaces, which I've stripped bare to transfer control to NetworkManager.)

Now, with nm-applet and kin, I have no real need or desire to control my network interfaces from the shell. However, some of my other scripts do -- in particular, when suspending and resuming the machine, I need to remove/reload the Atheros kernel modules, and I can't do that while the interface is up.

Also, my keyboard has a cute little "Wifi On/Off" button that I want to work. (More info on that in a later post.)

Fortunately, the solution turns out to be dead-simple: NetworkManager's dbus API exposes methods for bringing the network up and down.

To bring all NetworkManager-controlled interfaces down:

dbus-send --system --type=method_call \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \

(Yes, all those switches are necessary.)

To bring 'em back up:

dbus-send --system --type=method_call \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \

In my case, I dropped these into scripts in /etc/acpi/suspend.d and /etc/acpi/resume.d, respectively, alongside their old-school ifup/down counterparts. Works great, assuming the drivers come back up; I'll post the trick for that in a subsequent post. (I'm transcribing my porting notes as fast as I can here.)


  • Hi,

    My experience with NetworkManager and it's function on xubuntu and the eee-pc has been less than positive. I never figured out the value of it and uninstalled it. And that's not coming from someone who has used linux for >10 years; i.e, not a noob.

    Given the dearth of documentation, I'm still using ifup/down in combination with ifscheme from the command-line to manage multiple wifi profile (wpa-psk, open, etc.)

    I'm willing to give NetworkManager a second chance. Could you point the way to some docs?

    Many thanks...

    By Blogger Unknown, at 4:20 PM  

  • Fex,

    n00bs are the intended market for NetworkManager (and people like me who just don't care to grub around with ifconfig anymore), so it doesn't surprise me you were uncomfortable with it. If you're digging on the 'old school' methods for controlling interfaces, keep it up -- you'll be in for fewer surprises.

    I, however, got spoiled by the Mac and like my interfaces to work automagically. NetworkManager does this once you beat it into submission.

    As for docs, sorry, there aren't any I can find. It's possible that Xubuntu doesn't install exactly the same NM configs as Ubuntu, but it works quite well for me on the latter.

    By Blogger Cliff L. Biffle, at 12:14 PM  

  • Cliff, using this method can NetworkManager be used from the command-line?

    Just a few hours ago I was helping someone install ubuntu gutsy and had minor video problems (needed to apt-get the fglrx driver). However, to get the networking to work (WPA2 w/ 802.1X) only NetworkManager can do it (without lots of manual configuration through wpa_supplicant). So I had to drag the machine to my place where I had a zero-authentication network to get the video working so I could type a password into NetworkManager!

    By the way, are you still hacking around with the Propeller?

    By Blogger navaburo, at 2:34 PM  

  • navaburo,

    I'm sure you could configure your interfaces by manually poking NetworkManager using dbus-send -- but I don't know how to do it, nor would I want to. The NetworkManager DBUS API docs I've managed to find are incomplete. Either this stuff isn't documented outside the code, or it lives somewhere that Google can't see.

    I'd be inclined to manually configure the interface in /etc/network/interfaces long enough to get the required packages installed, and then switch back to NetworkManager if you want.

    As for the Propeller, no, beyond a few maintenance updates to propasm. My day job's about as far from small systems as you can possibly get. I've gone back to AVRs for my embedded hobby work -- it's nice to have a C compiler. That said, I've spent the last few months learning Verilog and may release something interesting soon. :-)

    By Blogger Cliff L. Biffle, at 11:13 PM  

  • Yo solo diré que he visto en De manera que un asunto de patología general se.vietnamese girls

    By Blogger Unknown, at 10:29 PM  

  • This is complete package. You write briefly in this article. These both blog entry totally informative for readers.

    Hadoop Training Institute in Noida

    By Blogger ciitnoida, at 11:50 PM  

  • The NetworkManager DBUS API docs I've figured out how to discover are deficient. Either this
    Buy Essays stuff isn't recorded outside the code, or it lives someplace that Google can't see

    By Blogger lara shaun, at 3:27 AM  

  • My involvement with NetworkManager and it's capacity on Xubuntu and the eye-pc has been not as
    Cheap Essays much as positive. I never made sense of its estimation and uninstalled it. What's more, that is not originating from somebody who has utilized Linux for

    By Blogger lara shaun, at 4:31 AM  

  • Thanks For sharing this Superb article.I use this Article to show my assignment in is useful For me Great Work.

    hotmail sign up

    By Blogger hotmail , at 12:10 AM  

  • I understand this column. I realize You put a many of struggle to found this story. I admire your process. funny marriage anniversary wishes to friends

    By Blogger Unknown, at 7:20 AM  

  • Students often feel issues in writing assignment, so to make students comfortable in java assignment we help them to write their assignments. If ever you feel any problem in writing something you can visit our website
    Assignment help New Zealand

    Assignment help Australia

    By Blogger, at 1:46 AM  

  • Hey Thanks for sharing this valuable information with us. I will come back to your site and keep sharing this information with us. krogerfeedback Surveyforcustomers

    By Blogger James Sand, at 11:03 PM  

  • The most authentic post ever i read about this topic so far i must say you have cleared all the required info thank for sharing, keep up the good work and find best e-ticket, visa and travel insurance services at

    By Blogger Jhon Wick, at 3:19 AM  

  • Really love your post about the topic you briefly discussed in your blog post keep up the good work and kepp rocking the best content also visit the MEX Short Term Rentals Dubai office if you're looking to plan you vacations soon in Dubai.

    By Blogger Jhon Wick, at 12:01 AM  

  • Nice Blog...
    If you want to visit Pakistan.. do Visit Hunza with Hunza Tour Packages we provide the best Tour services in Pakistan

    By Blogger ReviewitbySaba, at 5:33 AM  

  • Happy Mother’s Day to the person who gave me life and taught me love.
    happy mothers day 2019

    By Blogger Kartik, at 9:11 AM  

  • Zabaalawi by Naguib Mahfouz is a short story where Zabaalawi is the main character. You should read the zaabalawi summary to decide whether you'd like to read the whole story and if you would like to write the analysis of this essay.

    By Blogger Stewart Brown, at 5:48 AM  

  • I read your blog post and this is nice blog post.. thanks for taking the time to share with us. have a nice day Presentation Is Important

    By Blogger Robert B, at 11:25 AM  

  • Hello!
    I have gone through your content and found it interesting and useful as well. However, I am here to inform you that assignment help is being offered by the Online Assignment Expert. We at Online Assignment Expert known to deliver the best assignment help at the lowest price. So, the students who are looking for experts to get help in their assignment can instantly avail our service called accounting assignment help.
    We have been one of the most favoured choices for university students who need help in their assignment. With us, they will also get guidance by subject matter specialists who have worked on several topics and assignment. You are free to buy samples of the assignment with us to get ideas of designing assignment.
    So, when you need online assignment help, reach us. We assure that you will be highly satisfied with our cheap assignment help.

    By Blogger Lara Gargett, at 3:05 AM  

  • By Anonymous Anonymous, at 10:07 AM  

  • During higher studies in colleges, students often have to prepare multiple documents, quizzes, and surprise tests. This is the main reason why most students search for MyAssignmentHelp over the internet and choose only the most proficient and trusted academic writing experts for 100% free plagiarism free essays.

    By Blogger Alley John, at 4:26 AM  

  • In moments when you feel weak or when you feel as if your spirit is dwindling. Then, rather than succumbing under pressure, students should practice due diligence and should make it a point to acquire the writing help of one of the best writing help services, which is Done Essays.

    By Blogger Susanne McGuire, at 4:56 AM  

  • MyAssignmentHelp being one of the most active assignment help websites has a pool of over 4500+ assignment experts from Australia, UK and US.
    The field of law is, however, vast and extensive. The study of law is not just limited to few topics or concepts. As a result, students often get stuck while doing their assignments due to lack of in-depth knowledge on the topic. However, they need not worry now as we are offering exclusive Law assignment help online to students in Malaysia.

    By Blogger James Wright, at 11:54 PM  

  • Your article is a little bit difficult for me. I'm not an expert in this field. I prefer something more creative. For example, film review outline of book review. I hope that soon I'll share some of my new ideas.

    By Blogger chloebailey, at 3:37 AM  

  • thanks for taking the time to share with us. have a nice day
    Sony WALKMAN App

    By Blogger Leo5, at 9:11 PM  

  • شركات تنظيف الفلل هي من أكبر المؤسسات التي تقدم خدمة التنظيف في مدينة دبي، حيث أن الشركة من الشركات المجربة في هذا المجال فهي تعمل منذ فترة كبيرة جداً لذلك إن كنت ترغب في الحصول على خدمة تنظيف مثالية يجب عليك وبدون أي شك التعامل معنا لأننا هنا من أجل مصلحة، حيث تتشرف شركات تنظيف المنازل دبي بتقديم خدمة تنظيف المنازل وتنظيف الفلل والقصور وتنظيف الشركات والمكاتب وتنظيف جميع أنواع المفروشات سواء كان كنب أو سجاد أو ستائر وغيره باستخدام أحدث معدات التنظيف وشفط البقع دون أن يتم التأثير السلبي على أي شيء.

    شركة تنظيف فلل بعجمان
    شركة تنظيف فلل دبي

    شركة تنظيف كنب بالشارقة
    شركة تنظيف كنب بدبي

    By Blogger shaimaa sami, at 1:09 PM  

  • Hello! When it comes to writing papers then it's time to talk about writing services. There you can find a lot of useful information about writing papers in the right way. For example, buy a motivational letter for scholarship

    By Blogger Ciana Langham, at 8:50 AM  

  • By Blogger Rick Wilson, at 11:22 AM  

  • I have benefited from the content in this blog. The literature review is a written overview of major writings and other sources on a selected topic. Sources covered in the review may include scholarly journal articles, books, government reports, Web sites, etc. The literature review provides a description, summary and evaluation of each source. It is usually presented as a distinct section of a graduate thesis or dissertation. Know more about Literature Review Writing Help ?

    By Blogger James Ian, at 11:21 PM  

  • Best Cat In The World

    We will tell you, and with this, we will know very well about their intelligence and which cat you should take, so without taking much time, we know about the Best Cat In The World.

    Read More :

    By Blogger dude, at 7:00 AM  

  • We Provide the Best tour services in Pakistan. Click here to view
    Hunza Tour Packages and Naran Tour Packages

    By Blogger Barret, at 1:56 AM  

  • View sales and promotions on brands

    By Blogger Barret, at 1:56 AM  

  • The online assessment help has developed throughout the long term, and when one opens the net, he can discover a few choices that are giving on the web assignments. The assignment organizations principally contact the students over the net on their site, and the students are needed to follow through on a particular cost for the administrations they are profiting. Assignment help online has numerous discussions, and it is upon the students that what they select or what they choose about their work and their ideal necessities. more- nursing assignment help , assignment help australia

    By Blogger Jenifer , at 5:56 AM  

    Your car is a leading CAR RENTAL SERVICES in Pakistan.
    Car Rental Islamabad,Rent a Car in Islamabad,Rent a Car Islamabad,Insured Car Rental Islamabad

    By Blogger Smith, at 8:52 PM  

  • Amanat Eye Hospital is the world renowned and state of the art hospital for all eye related treatments.
    Eye Hospital pakistan

    Thanks for sharing the informative post.
    Amanat Eye Hospital is the world renowned and state of the art hospital for all eye related treatments.
    Eye Hospital pakistan

    By Blogger Smith, at 10:13 PM  

  • If you want the best car rental service please visit Rently

    By Blogger King123, at 11:14 AM  

  • Thank you admin for sharing this post with us. I really appreciate your hard work in writing this post. Keep uploading these types of information. Rent a Car Islamabad With Driver Rates

    By Blogger Zaf, at 2:18 AM  

  • I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed...Prado for rent in Islamabad

    By Blogger Zaf, at 2:00 AM  

  • What an amazing article you have shared with us. Pretty much anyone with basic computer skills can create an effective PowerPoint presentation. But there are many reasons students keep asking Google, “Who’ll do my PowerPoint presentation for me?” One of the main reasons students need help with PowerPoint presentation is that they’re always busy. Today’s students are insanely busy most of the days. It’s easy for simple tasks such as developing a PowerPoint presentation to fall through the cracks. Do you want someone to Write My Powerpoint Presentation

    By Blogger Sam Smith, at 5:02 AM  

  • Thanks for sharing this post.

    The Eye Consultants is the best eye hospital in Rawalpindi which is equipped with latest and state of the art equipment. Brig. (R). Dr. M. Amer Yaqub is the best eye specialist in Rawalpindi. He is best is Refractive Surgery, Squint Treatment, Cataract Surgery and Oculoplastic as well.

    Eye Hospital Rawalpindi
    The Eye Consultants

    By Blogger The Eye Consultants, at 11:07 PM  

  • This article has brought to an end my long internet search thank you. Theoretical and conceptual frameworks are among the most critical components of capstones, dissertations, and theses. The theoretical framework is majorly adopted in quantitative studies and it captures the pre-existing theories that explain, predict, and assist readers to master the research phenomena. Read more on Capstone Theoretical Framework Help

    By Blogger Caleb, at 6:04 AM  

  • SalezShark Connect+, one of the world's most trusted leaders in providing a B2B database that is accurate and action-oriented, is known for being reliable. Its HR contacts database holds around 100,000 records for HR people working in different sectors across many countries.

    By Blogger Rakesh chandra, at 8:59 PM  

  • If you are looking for Rent a Car in Islamabad or Rent a Car Rawalpindi then you are on right place.
    Pakistan Qureshi Tours offer all types of cars for rent
    Rent A Car Rawalpindi

    By Blogger Harry, at 10:17 AM  

  • Very good article thank you for sharing energetic information. I really appreciate you.
    keep it up,write and upload on regularly. I read the blog on a daily basis.
    Get the best home tutor in Karachi At your Doorstep. Best Tutor Academy in Karachi For All Classes and Subject

    Jinnah Tutor Academy In Karachi is a trusted tutor academy by parents and children, well-known for its compatibility in a variety of subjects, extensive experienced Home tutor in Karachi to cover loads of curriculum, and determination to guide students on the career-changing path through home tuition.

    We are a team of high-qualified, award-winning, top-rated & professional teachers that not just help students study inTutor Academy crucial hours but also prepare them for future academic challenges.

    By Blogger Home Tutors, at 8:48 AM  

  • Really Nice Post! Thanks for Sharing this this amazing post its really helpful. Really informative no doubt about it. myassignmenthelp

    By Blogger My Assignment Help Online, at 11:22 PM  

  • Wow! This can be one particular of the most useful blogs We have ever arrive across on this subject 야한동영상

    Also feel free to visit may webpage check this link

    By Blogger yadongbizz, at 5:44 AM  

  • Thank you for sharing this information. I read your blog and I can't stop my self to read your full blog. Again Thanks and Best of luck to your next Blog in future. 국산야동

    Also feel free to visit may webpage check this link

    By Blogger yadongbizz, at 5:45 AM  

  • thanks for share this information with us CHAUFFEUR SERVICES

    By Blogger Freeappforyou, at 5:11 AM  

  • thanks for share this information with us 10 Best Hybrid Table Saw Reviews

    By Blogger Freeappforyou, at 10:43 AM  

  • I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely save and revisit your site.

    internship for web development | internship in electrical engineering | mini project topics for it 3rd year | online internship with certificate | final year project for cse

    By Blogger periyannan, at 4:46 AM  

  • Thank you for such a supportive thought on your site which help me in gaining informative knowledge.
    We also provide service in Sop(Statement Of Purpose)writing services and write my assignment. TheStudentHelpline provide such a writer who write best and perfect assignment and sop for you while keeping you expectation into the mind and deliver to you on time.

    By Blogger Dissertation Help, at 12:42 AM  

  • This is not bad. Looking to hire a vehicle in Pakistan's so called cities like Rent a Car Islamabad.

    By Blogger Royal Car Rentals, at 3:30 AM  

  • I love it.. Very Excellent Article..

    By Blogger ApkBrew, at 7:08 AM  

  • Best Discount available for Rent Lamborghini Dubai.

    By Blogger Saud, at 12:05 AM  

  • I like your post..
    Also check Telus Speed Test to get information about your interent connection speed and more.

    By Blogger Internet Speed Test, at 9:59 PM  

  • While in higher education, students are required to submit various assignments, projects, and research works. These are necessary, as these activities can help for building a bridge between theoretical knowledge to the practical world. But, writing an assignment or doing project work requires in-depth subject knowledge, and time-consuming research.
    In order to solve these problems, Global Assignment Help has brought an assignment help service for the students of the United States of America, the United Kingdom, Canada, Australia, and New Zealand. The experts of the organization are dedicated to providing plagiarism-free assignments, maintaining the academic standards, and customization on-time. They provide correct and precise information about the concepts, and the recent technological developments, so that the quality of the assignments are enhanced. By taking services from the organization, students can achieve good academic grades, and pave their way to future success.

    By Blogger Arthur Wilson, at 4:21 AM  

  • Writing a finance assignment requires a deep understanding of financial theories, complex concepts, and their applications. Moreover, the comprehensive study of the ever changing market makes it more difficult and time consuming for the students. Hence, nowadays students are looking for various financial assignment help.
    Global Assignment Help has become a game-changer for the students by providing them assignment help services. By taking assistance from the organization, students can get access to highly qualified finance professionals, who can give them insight into complex principles of finance, and clarify their doubts. The experts are dedicated to delivering plagiarism-free customized solutions as per the requirements, on time. The well-crafted, well-researched, and informative assignments can help the students to improve their academic scores, and thus can open doors to future success. Finally, with the round-the-clock customer services and low price range, the satisfaction of the customers is guaranteed.

    By Blogger Arthur Wilson, at 1:48 AM  

  • I know this is irrelevant but it is important to discuss here, march is coming and people are going to buy orbeez gun for outdoor activity so for those who love outdoor game should check one of the best orbeez gun and play in this summers.

    By Blogger orbeezgunreview, at 11:07 AM  

  • This was very helpful.
    Pakistan is very beautiful country but because people don't know any best tour company they are not able to come here and if you are one of those then check

    By Blogger Karim, at 4:16 AM  

Post a Comment

<< Home