Tag Archive for 'linux'

Ubuntu, DHCP and hostnames

I just worked out that Ubuntu won’t set the hostname according to what is returned from dhcp. This makes sense in some ways, but I was deploying a VM template and I wanted the hostname set by dhcp.

I am not using network-manager in the following examples. And honestly network-manager only makes life easier on a laptop, or desktop when operating wirelessly.

Make sure your network interface is set to dhcp, as network-manager is installed by default the relevant line may be commented out (also if your not using it, purge network-manager from your system). The relevant entries from my /etc/network/interfaces:


# The primary network interface
auto eth0
iface eth0 inet dhcp

Add an script in /etc/dhcp3/dhclient-exit-hooks.d. It should check if GDM is running, as after it has started up you should not change the hostname. My script read as follows:
/etc/dhcp3/dhclient-exit-hooks.d/set_hostname

# If you want to enable this script, change SETHOSTNAME to "yes"

SETHOSTNAME="yes"

if [ "$SETHOSTNAME" = "yes" ]; then
	if test -r /var/run/gdm.pid && ps -ef | grep $(cat /var/run/gdm.pid) | g
rep -q /usr/sbin/gdm ; then
	echo "$(date): GDM running, not changing host name"
	else
		hostname $new_host_name;
	fi
fi

That should be it. Though you may need to remove some incorrect entries from /etc/hosts, and remove /etc/hostname if the file contents are wrong.

OpenVPN client with Username and Password auth

Following on from last week’s post. We now need to setup the client.
Continue reading ‘OpenVPN client with Username and Password auth’

OpenVPN server with Username and Password auth

I did this on Debian but these instruction should work equally well for Ubuntu
Continue reading ‘OpenVPN server with Username and Password auth’

USB Ethernet drivers for iPhone

Diego Giagio has built coded a Linux network driver to allow USB tethering with an unmodified iPhone. The source and more info can be found at: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver.

For an easy to install Ubuntu package use this PPA, from pmcenery.

GMail Notifier

Gmail Notifier is the best gmail checker I have found. It makes use of libnotify and the Indicator Applet in GNOME, so it plugs in brilliantly with Karmic

DavMail, open standards for Exchange

I have been frustrated with the Exchange server here at work, and found that Evolution MAPI support simply crashes everytime I try it. It is in the ubuntu bug list if you want to go hunting. And I really don’t like Evolution anyway.

But I just found DavMail, and it appears to work great. It is basically a java program that connects to an Outlook OWA (up tp 2007) and presents the information through standard services IMAP/SMTP/CalDAV. So I can now use Sunbird as my Calendar client, pointing it to a CalDAV server running on localhost,  and it seems to work a treat. Installation is straightforward on most platforms and after a bit of fidlling with the settings it is up and running.

Lenny, Icedove and teeny tiny fonts

You know the font situation on debian and gnome isn’t terrible in lenny. Actually it looks fairly decent. Until you load icedove (thunderbird).

The fonts are teeny, pixelated and hard to read. Luckily it is a very easy fix.

Open icedove, go to “Edit -> Preference -> Advanced -> Config Editor

Change the value for “layout.css.dpi” from “-1″ to “0″

Restart icedove

Setting up pptpd on debian (lenny)

There are other giudes to do this, but none seemed complete, I had to get the iptables rules from the debug document on poptop.org. I guess they are not always needed.
Continue reading ‘Setting up pptpd on debian (lenny)’

Moving host

I am thinking of moving host again. I have no issues with dreamhost, but I have been playing with the rackspace cloud, and I like it.

I can have my own virtual machine, lowest specs, for abut the same price as dreamhost each month. And since it is my own box I can do whatever I like with it.

If this site got more hits, and I had to increase the specs, dreamhost would be cheaper, but no one comes here so rackspace will work super.

More importantly this lets me setup a vpn server outside of Australia. While I find it very unlikely that I will ever go to a site banned by the government’s filtering scheme, my protest is to simply bypass it.

http://nocleanfeed.com/

The move will happen over the next few weeks as I find time to install wordpress on debian and get it configured and hardened. The DNS will be staying on dreamhost, so I doubt any changes will be noticed.

Adobe air hard-codes web browser to firefox

I have been using chromium as my primary browser. Unfortunately I have been using some adobe air twitter clients, and they ignore my preferred browser setting.

I found this page: http://blog.andreaolivato.net/open-source/change-adobe-air-apps-default-browser.html.

I followed this except my link pointed to chromium-browser, and the file was simply “/opt/Adobe AIR/Versions/1.0/libCore.so”.