“Waiting for network configuration…” problem with Ubuntu

WHAT: Running Ubuntu 12.04 LTS “Precise”. After software upgrade, during boot the message displays:

Waiting for network configuration…

After an inordinate amount of time a new message appears:

Waiting up to 60 more seconds for network configuration…

After the system is finished booting and the user logs in, there is no network.

WHY: Unknown.  Apparently however, based upon extensive researching of this problem online, not many people know, including Ubuntu themselves.  Forums are filled with basically useless information about purported fixes which don’t work.  Many seem just lost.

HOW: After logging in I found out that the network can be fixed by simply running the command:

sudo /etc/init.d/network-manager restart

from a console window.  So the solution – admittedly a temporary fix – suggested itself to find a way to simply run this command at login.

WHERE: Ok the question word meme thing is getting stretched at this point, but here’s how I managed to workaround the networking bug:

WHAT: Create a script in the user’s $HOME/bin directory which runs the command and have it automatically run at login.

HOW: First make the $HOME/bin directory if it doesn’t exist:

mkdir ~/bin

Then create the script with a text editor.  I chose to install vim and use it:

vi ~/bin/fixnet

The contents of which should be:

#!/bin/sh
sudo /etc/init.d/network-manager restart

Now make sure the script is executable:

chmod +x ~/bin/fixnet

AND THEN: The issue now is that if we try to have this script automatically run at login as our user, sudo will require a password and the script will not run.  We need therefore to allow this one particular command to execute without a password via sudo.

Edit the sudoers file:

sudo visudo

At the very end of the file add a line like the following:

user      ALL=(ALL) NOPASSWD: /etc/init.d/network-manager restart

Replace user with your username.  The line has to be at the end, or at least after a line which grants permissions to those in the sudo group because entries at the bottom of the file overrule those above.  The sudo line will basically revoke the NOPASSWD directive of the above line if it comes after it.

FINALLY: Now you can test if it all works.  Open a brand new terminal (important!) and type fixnet and see if it runs without asking for a password.

If it does then all is good.  Now you can click on the little gear icon at the very upper right of the screen and choose “Startup Applications…“.  There you can select the script you just created and set it to run automatically at login.

NOTE: This will not fix the stupid “Waiting for network configuration…” bootup delay, but it will ensure that once logged in the network will be up.

PHILOSOPHY: Why didn’t I use the preferred /sbin/initctrl restart method instead of deprecated /etc/init.d/network-manager restart?  Because for some reason I was getting an error with the former method.

Why didn’t I put the script in rc.local to run?  Good question.  I did actually try editing the runlevel rc.2 to have network-manager run.  In fact, since some time ago, I don’t know wtf is going on with the Ubuntu boot process.  network-manager (and a slew of other things) are not even set to run by default in runlevel 2 and are apparently being invoked some other way.  Since I know running the init.d network-manager script from a console after the user logs in works, I decided to just stick with it.

Need to get color codes? Here’s a very useful site.

www.colorpicker.com has one of the best color selection tools that I have seen either as a standalone application or on the web.

Connecting with Sun

There is a popular belief that the Sun is extremely detrimental for skin and that it should be avoided at all costs.  Prominent speakers who appear to be basing their statements on medical facts claim that the Sun is extremely bad for skin.

Unfortunately this is erroneous and bad advice to follow.  What matters more than whether one gets Sun is how one gets Sun.  If one is laying on a beach like a dead fish that is one thing.  But if one is outdoors and active, breathing and sweating in some activity like running, it is entirely another.  If one is in a forest or area with partial canopy, then the Sun intermingles with shadow, and if one is also active and respirating, it is entirely different than some generic false conception of being “exposed” to the Sun.

Of course its important to use common sense with respect to Sun exposure as with everything else.  The body has an amazing capacity to know what is good for it and what is harmful, only people do not tune in and listen.

Our species and our progenitor species have been exposed to Sun for millions of years.  The Sun is not bad for us.  We require Sun.  Sun is very healthy and we do not give our bodies enough credit for being able to handle Sun exposure.  We often allow a very reductionist, limited vision of natural processes supplant the deeper wisdom within us and then start to become overly worried or even obsessed with things which will not benefit us.

We should be more concerned about connecting with our bodies and with nature at the deepest levels.  Many people have a long way to go and hence the Sun will be damaging to them.  But eventually we should connect with the Sun as a primal source of energy.

 

Useful Shell Scripting: Skip first n lines of a text

This is one of those really amazing shell commands which is very concise, powerful, and yes elegant.

Let’s say you have a file of some text and want to view everything except the top n lines of file.txt, where n is any number.  The command simply is:

awk 'NR>n' file.txt

Where n is the number of lines at the beginning of file.txt to skip.

You can then do whatever you want with the output, like pipe it to some other command.  By the way, you can also pipe in to awk, i.e. go the other way, as:

some_command file.txt |awk 'NR>n'

So awesome!  And so simple even I can remember it 🙂

Laser Treatment of Vitreous Eye Floaters

Today I was researching laser treatment of vitreous eye floaters and came across this mind-blowing video of a live procedure being done by one of the only very few physicians in the US who perform it:

To anyone who has never had a floater, it might be difficult to imagine how amazing this procedure seems.  Floaters look like this junk that floats around inside your eye.  They often look like a sort of diffuse clod of blurry hair which can sometimes be quite annoying.  I’ve had mine since I was around 10 and experienced a traumatic injury to my left eye which, luckily, didn’t leave me permanently blind (although I was legally blind in the eye for a while after it bled internally).

Here’s another video by the same physician in which he explains the procedure:

When it seems impossible to organize

I wanted to offer this method I sort of discovered today on how to organize when you are in a situation where it seems like the task is too overwhelming to the point of being impossible. That is how it has been with me for too long. I have had piles of junk all over my studio and its driving me crazy. Every time in the past when I finally got enough energy to attack the piles – which was very infrequently – I usually did not complete the task and then the piles on got worse.

But today I discovered a very powerful way to organize when it seems totally hopeless. To do it I used two sizes of boxes, both from my local office supply store. One type is the standard “banker’s box” which are usually sold in ten-packs very cheap. The other type is just a smaller brown box in which it is just possible to fit an 8 1/2 x 11 inch piece of paper.

Since boxes are cheap there’s no reason not to just get a lot of them in advance. This way, if – and more than likely when – they are needed they will be available.

For things like paper work or smaller objects like office supplies, small parts, etc. use the smaller boxes. For larger things use the banker’s boxes.

At first do not even think about trying to do fine-detail-level sorting. Think about coarse levels. What types of things generally go together. Put those types of items in the same boxes.  Always label every box that is filled, with the labels consistently in the same location on the same edge of every box.  Make the labels useful so you will remember what is in them.  Labeling is essential.  Later on, when things are needed, it will be possible to very easily and quickly locate them becasue of the labels.

As a strategy, I recommend putting as much as absolutely possible into labeled boxes and stacking them.  Try to stack boxes of items which you know are the least important at the bottom of the stacks.

Once you have everything except absolute essentials in boxes (and it doesn’t hurt at all to even have put some essentials into them), you will then have the space to clean, arrange, and, most importantly, to think and process how you want your environment to be.

See the Venus Transit Right Now

Transit of Venus | exploratorium.edu/venus

brightcove.createExperiences();

Checking out online? Don’t forget coupons!

For those who like to shop online, it often occurs when checking out that there is a chance to enter a coupon code before the final sale transaction is completed.  Its often worth checking to see if you can find a coupon.

Today I ordered a $20 fitness apparel item and was able to get free shipping on my order just by entering a coupon code.

The site I found which had a working code was retailmenot.com.  If one just does a search via search engine for coupon codes for a particular online store, one will likely obtain a large number of matching results.  But in this day and age of search engine spam and other types of scams its wise to be skeptical of many of these sites.

I ended up trusting retailmenot.com because I believe they are related to another site which was popular some time ago called bugmenot.com.  There was a time in the evolution of the Internet before where all sorts of separate sites required passwords to participate, comment, contribute, or gain access of some kind.  But then each individual site started requiring users to register and login to their site in order for such access.

This was rightly seen as a major annoyance by many, and bugmenot.com’s raison d’etre was to save users from having to go through the cumbersome registration process by openly providing working login/passwwords to websites.  Visitors could search for a site they were visiting or even contribute their own login/password for others to use.

At any rate, both these sites seem to have been run by reputable, upstanding people and today I managed to save 25% of an order using a coupon code.

Get rid of “Press Esc to exit fullscreen mode” annoyance!

Hi, this is my first post with the newly arranged Alaya: Tech blog thingy.  All the previous tech and science related posts will be here.  I apologize if any are missing.  There are around 800 posts to go through and preen and I have not finished the process yet.

The other day I finally got so sick and annoyed by the “Press Esc to exit fullscreen mode” notification which blocks out the whole middle section of the screen whenever a flash video is opened in a browser, I decided to see if there was a way to disable it.  And there is!

A great way!  This really cool app made by Chronomaster on the forum at videohelp.com does the trick.  Here is a link to the forum post where it can be downloaded.

After running the app the result is no more annoying fullscreen escape notification.  It makes a huge difference.

Massive, hidden planet in our solar system?

Is there a massive, hidden planet in our solar system, bigger even than the largest known planet Jupiter?  Or perhaps a red dwarf star that is a sister to our Sun yet which until now has been undetected?

Far far beyond the orbit of Neptune lie what are called trans-neptunian objects.  Way out there is a region called the Oort Cloud where it is believed trillions of objects exist.  The only thing is, at such a far distance, the region of space is exceedingly vast, so even though there are so many objects, they are still extremely far apart.

 

Page 92 of 100« First...102030...9091929394...100...Last »