Tag Archive for 'ubuntu'

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 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

Ubuntu 9.10 has a broken tsclient included

The tsclient included with Karmic has a broken tsclient applet. It is a known bug, as simple as a typo. It was discovered over 4 months ago, and a fix has been made upstream.

For whatever reason, nothing has been done other than having the big confirmed.

If you depend on the tsclient applet, as I do, grab the package from debian and install it.

Grab the package for you architecture from here.

And simply install it with dpkg:

$ sudo dpkg -i tsclient_0.150-3_i386.deb

The only difference between this release and the one previous is the removal of this bug, which is a fairly serious bug. Including this in the karmic repo would be trivial, and it should have been done before the 9.10 went final.

Ubuntu tethering via Bluetooth PAN

I have been attmepting to tether my iPhone to my computer using bluetooth in Karmic.

Supposedy blueman can do this very easily (www.blueman-project.org). To install blueman just run:
$ sudo aptitude install blueman.

My experience with blueman has been very hit and miss however, the connection appears to be made via bluetooth but I can rarely seem to get NetworkManager to make a network connection. Sometimes I have success pairing the devices again.

Using the older pand binary I have had a lot more success. If you are not scared of the terminal, it isn’t difficult and appears far more reliable Continue reading ‘Ubuntu tethering via Bluetooth PAN’

Connecting to an Airport Express from Linux

Wow. Karmic actually did something that really impressed me, there is support for Airport express streaming in the standard repos.

To enable it:
$ sudo apt-get install pulseaudio padevchooser pulseaudio-module-raop pulseaudio-module-zeroconf

Then run System -> Preferences -> Pulse Audio Preference. Tick “Make discovereable Apple AirTunes devices available locally”.

Run RhythmBox, or any app which uses pulse-audio as its backend, and play some audio.

Run Applications -> Sound & Video -> PulseAudio Volume control.

Select Airport Express as the output for this app.

Screenshot-Volume Control

GDM Themes in Ubuntu 9.10

Like Fedora 11, Karmic includes a newer version of GDM that no longer allows theming.

But unlike Fedora, there is no preferences tool to change the background and gtk theme that GDM is going to use. So there appears no easy way of customizing the login screen without editing gconf, but there is a fairly simple way of doing this.

If you want to play with the look of GDM in Karmic, open a terminal and run this:

$ gksudo -u gdm dbus-launch gnome-appearance-properties

Changing the gnome appearance properties for user gdm, changes them at login.

Ubuntu 9.04/Epiphany/Webkit

As mentioned previously my posts will feature Debian and Ubuntu more prominantly now.

Epiphany is still the Gnome web browser, though I think Debian is the only major distro to make it the default. I like Epiphany, it’s smart bookmarks are tremendous, but the gecko backend is pretty crumby and the cause of a few major unresolved bugs. With Gnome 2.28 webkit has become the standard backend for epiphany making it a very cool option.

If you want some webkit goodness your current Ubuntu 9.04 (Jaunty) release, it is pretty simple.

Edit the file “/etc/apt/sources.list” (use sudo to gain priveleges)

Add following lines:

deb http://ppa.launchpad.net/webkit-team/epiphany/ubuntu jaunty main
deb http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main

Import the correct GPG key:
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2D9A3C5B

Update the source list and install epiphany
$ sudo apt-get update
$ sudo apt-get install epiphany-webkit