rulururu

post Ubuntu resetting DNS setting (resolv.conf)

November 30th, 2006

Filed under: Linux, Operating Systems, Ubuntu — Brenton Alker @ 18:28

I have been having a problem with Ubuntu since I installed it (only a few weeks ago now). Every so often, about once a day on average, my DNS settings were being reset.

I had changed the settings in the "Networking" preferences interface, on numerous occasions only to discover later that the settings had been reverted. I figured it was due to the interface being set to DHCP, so I promptly changed it to a static setting (my preference in this case anyway) and thought I would be safe.

So I went ahead and manually added my DNS server (as described in a previous post) to my /etc/resolv.conf

nameserver 192.168.1.100

And went about my business. Only to discover a day later it had reverted again. It seems that even though the interface (the only one on the system) is static, that the dhcpclient still automatically reconfigures the DNS settings, to prevent this, the options are either (in order of my preference):

  1. Change the dhcpclient configuration &em; Simply, elegant, sweet
  2. Make resolv.conf read only &em; That’ll show the sucker
  3. Uninstall the dhcpclient &em; I’d prefer not to, it comes in handy if the network breaks

So I took option one and changed the /etc/dhcp3/dhcpclient.conf adding the line:

prepend domain-name-servers 192.168.1.100;

The dhcpclient still updates my DNS settings, it’s just conveniently adds my preferred server to the top of the list. Isn’t that nice of it.

post Automatically Start Screen

November 27th, 2006

Filed under: Linux, Operating Systems — Brenton Alker @ 22:32

I often find myself only a few minutes (or hours) into a session at the bash CLI/prompt before starting a process that takes some time to complete, such as a long SQL query, or a file download.

Being impatient as I am, I quickly reach for the trusty ‘Ctrl-A c’ key sequence to start a new Screen window, only to realise I never started screen in the first place (arg…)

To prevent such annoyance, I have added this handy snippet to my ~/.bashrc:

if [ "$STY" = "" ]; then
exec screen -RR
fi

Which automatically starts screen when you log into bash, by opening a new terminal for example. Other examples I have seen, such as on the Screen Users Mailing List use screen’s "-dR" or "-x" flags when starting screen to ensure they only have one screen open, but as I am still partial to having multiple terminals running, I currently prefer this option.

post “There are no public key available for the following key IDs”

November 23rd, 2006

Filed under: Linux, Operating Systems, Ubuntu — Brenton Alker @ 23:43

I was trying to install something or other tonight, using the (usually very simple) apt-get system on my web box, but it kept showing up with this error

There are no public key available for the following key IDs:
XXXXXXXXXX

Where the X’s are a hash/key of some description.
After some searching, The solution appears to be to import a key from a key-server (makes sense), here’s how:

# gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys XXXXXXXXXX
# apt-key add /root/.gnupg/pubring.gpg
# apt-get update

Substituting in the same hash/key.
Then, it just works…

ruldrurd
Next Page »
Powered by WordPress, Web Design by Laurentiu Piron
Entries (RSS) and Comments (RSS)