Jun 18

How to configure Exim to send email using a Gmail account as a Smart Host. After following this guide, Exim should be able to send email out to the internet via your Google Gmail account.

1. Prepare Exim4 using dpkg

dpkg-reconfigure exim4-config

Selections:

a) General type of mail configuration: mail sent by smarthost; received via SMTP or fetchmail

b) System mail name: localhost

c) Ip Addr to listen on: 127.0.0.1

d) Other destinations~: <blank>

e) Machines to Relay for: <blank>

f) ip address or hostname of the outgoing smarthost: smtp.gmail.com::587

g) Hide local mail name in outgoing mail: No

h) Keep number of DNS queries minimal: No

i) Delivery method for local mail: Maildir format in home directory

j) Split configuration into small files: Yes

2. As root, edit /etc/exim4/passwd.client and add the following.

Don’t forget to change emailaddress@gmail.com to your own email address and password to your own password:

gmail-smtp.l.google.com:emailaddress@gmail.com:password
*.google.com:emailaddress@gmail.com:password
smtp.gmail.com:emailaddress@gmail.com:password

Note: You are probably worried about having your password in this file – don’t worry, we’ll make sure the permissions are set correctly in the next step.

3. Set permissions on the /etc/exim4/passwd.client file

Type the following, as root, in the console:

chmod 640 /etc/exim4/passwd.client
chown root:Debian-exim /etc/exim4/passwd.client

4. Add/Edit the /etc/exim4/email-addresses file

In the console as root, add or edit the /etc/exim4/email-addresses file. Just add the following line (no others)

your-local-user-name@localhost:    your-gmail-email-address

And set permissions:

chmod 640 /etc/exim4/email-addresses

5. Edit the /etc/exim4/update-exim4.conf.conf file

It should look like the following:

dc_eximconfig_configtype='smarthost'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com::587'
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname='false'
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'

6. Restart Exim

/etc/init.d/exim4 restart

That should be it!

May 9

One of the nice things about the Debian GNU\Linux distribution is that it is highly customisable. As new applications are written and existing applications mature, along with personal preferences changing, I often find myself preferring different applications for specific tasks. This blog lists the main applications that I change, primarily for my own reference so that I can easily remember how to change them again in the future.   :) Maybe it will be useful for others too.

Note that this is primarly Debian specific, but should work on Ubuntu too.

Change Default File Manager

I am a Gnome user and find Nautilus great most of the time, however when I am moving a lot of files around I find the simpler and more light weight PCman File Manager more convenient, especially because it supports tabs. Thus, I set up my Gnome Panel so that my home directory (Places  >  Home) loads PCman, and Computer (Places  >  Computer) loads Nautilus.

Firstly, locate the following file:

/usr/share/applications/nautilus.desktop

Note: A lot of blogs also mention changing nautilus-computer.desktop and nautilus-home.desktop, although I do not do this as explained in the summary above.

Locate the line beginning with “Exec” and change it as follows:

Exec=pcmanfm

Now, its done!

Changing Gnome to use OpenBox instead of Metacity

I much prefer OpenBox to Metacity, its lean, fast, written in C/C++ (which I am learning) and provides excellent key binding support. In addition, with Gnome also installed, one has many different options:

  • Run Gnome normally
  • Run only OpenBox
  • Run Gnome with Open Box
  • Run OpenBox, and only load the Gnome panel (gnome-panel) – which seems very similar to the one above!

Fortunately, in Debian Etch and above, installing OpenBox updates gdm to include a Gnome with OpenBox option, so the installation and change is quite straight forward:

# aptitude install openbox openbox-themes obconf obmenu

If you also want a panel, perhaps give pyPanel ago.

Use Sun Java as default

# aptitude  install sun-java6-jdk sun-java6-jre sun-java6-plugin

Now, set it as the default:

# update-java-alternatives -s java-6-sun

Change the default web browser

I tend to prefer firefox to Epiphany, only because the Epilicious application stopped working on my system a little while ago and I havent managed to figure out how to fix it yet. I use Delicious for bookmark storage.

# update-alternatives --config x-www-browser

Now, select desired default.

If you use Thunderbird (Icedove on Debian), you may also want to set the default browser for it. To do so, add the following lines to your user.js file, which on Debian is located in ~/.mozilla-thunderbird/<profile name>/

Now create, or add if it is already there, the user.js file:

user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

NOTE: There is a symlink to iceweasel, so using firefox on Debian also works. You can also specify opera, or any other browser you would prefer.

Restart Thunderbird and your new preferred browser should be working.

Set Default Image / Media Viewer

There are many options when it comes to image viewers. Thankfully, its pretty easy to make your favourite the default. This assumes you are using a recent version of the Gnome desktop environment:

  1. Right click on a file of the type that you wish to change the default application for
  2. Select Properties
  3. Change the application in the “Open With” drop down menu
  4.  After you log out, this setting will be saved and preserved for all future sessions.
May 7

Here is my sources.list file and preferences file for Debian Sid that I use on my laptop (not for environments requiring a stable system though!, although to be honest I rarely ever have issues that cause me any great drama).

sources.list file

Located: /etc/apt/sources.list

# Debian GNU/Linux 4.0 r1 _Etch_ - Official i386 NETINST Binary-1 20070820-20:21]/ etch contrib main

deb http://mirror.pacific.net.au/debian/ unstable main contrib non-free
deb-src http://mirror.pacific.net.au/debian/ unstable main contrib non-free

deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

deb http://mirror.pacific.net.au/debian/ etch main contrib non-free
deb-src http://mirror.pacific.net.au/debian/ etch main contrib non-free

deb http://mirror.pacific.net.au/debian/ testing main contrib non-free
deb-src http://mirror.pacific.net.au/debian/ testing main contrib non-free

deb http://mirror.pacific.net.au/debian/ experimental main contrib non-free
deb-src http://mirror.pacific.net.au/debian/ experimental main contrib non-free

# After adding the debian-multimedia sources type 'apt-get update && apt-get install debian-multimedia-keyring'
deb http://www.debian-multimedia.org lenny main
deb-src http://www.debian-multimedia.org lenny main

# Compiz Fusion
# deb http://download.tuxfamily.org/shames/debian-sid/desktopfx/unstable/ ./

# Google
deb http://dl.google.com/linux/deb/ testing non-free

# Skype
deb http://download.skype.com/linux/repos/debian stable non-free

# Experimental Kernels
deb http://kernel-archive.buildserver.net/debian-kernel/ trunk main
deb-src http://kernel-archive.buildserver.net/debian-kernel/ trunk main

# Opera Beta
deb http://deb.opera.com/opera-beta/ unstable non-free

# Unofficial Debian packages
# http://packages.kirya.net/
# deb http://packages.kirya.net/debian/ unstable main contrib non-free
# deb-src http://packages.kirya.net/debian/ unstable main contrib non-free

# Debian Unofficial Repository
# For more info visit http://debian-unofficial.org/
#deb http://ftp.debian-unofficial.org/debian stable main contrib non-free restricted
#deb-src http://ftp.debian-unofficial.org/debian stable main contrib non-free restricted

# Star Control II - The Ur Quan Masters A really cool game!!
deb http://uqm.debian.net/ unstable/

# sidux http://sidux.com/files/misc/sources.list
# deb http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free
# deb-src http://sidux.com/debian/ sid main contrib non-free firmware fix.main fix.contrib fix.non-free

Preferences File

Located: /etc/apt/preferences

 Package: *
Pin: release a=unstable
Pin-Priority: 990

Package: *
Pin: release a=experimental
Pin-Priority: 450

Adding Required Keys

http://dl.google.com

wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -

http://uqm.debian.net

wget -O - http://uqm.debian.net/key.gpg | sudo apt-key add -

http://deb.opera.com

wget -O - http://deb.opera.com/archive.key | apt-key add -

kernel-archive.buildserver.net

wget -O - http://kernel-archive.buildserver.net/key | apt-key add -

download.tuxfamily.org

wget http://download.tuxfamily.org/shames/A42A6CF5.gpg -O- | apt-key add -
May 1

In July 2006 I acquired an ASUS A8JS laptop. The purchasing decision was made based on the following assessment at the time:

  • High Specs for the price
  • Relatively compact, but not small (14.1″ Widescreen)
  • NVidia Graphics Card (NVidia GeForce Go 7700)
  • Good Reviews: Most people seemed to be quite happy with the Laptop in forums and reviews, thus I felt confident it was a good model.

Having used the laptop for 6 months, in December I switched to an Apple MacBook, which despite Apples hopeless warranty service (1 week for a replacement hard drive after it died), has so far served me very well.

For several reasons, the ASUS A8JS laptop was not well suited for me at all and for the benefit of others, here is the list of Good and Bad characteristics that I have found.

Use Case:

The laptop ran Ubuntu or Debian Etch/Lenny/Sid over the period and performed well with both operating systems. I mostly used the laptop working from home, with less than 10% travel. The Laptop was never dropped or had any other bumps that I am aware of.

The Good:

  • Bang for buck: Price wise, at the time the laptop seemed to have better specs than any other contender.
  • NVidia GeForce Go 7700 Graphics Card: With 512 Mb Dedicated memory, and being Linux friendly, this seemed great.
  • Runs Linux well: Both Ubuntu and Debian Etch/Lenny/Sid worked well on it with only minor tweaks required to get it working properly.
  • Runs Games Well: For the brief period that I had a Windows XP partition, I found this Laptop has the guts to run games well. I had no problem at all running Call of Duty 4, for instance.

The Bad:

  • Build Quality: The Laptop is not robust at all. The laptop case cracked around the hinges, and within 6 months of use primarily on my desk at home, the screen became very loose. The Keyboard felt flimsy from the start, and within 6 months the delete key literally broke off (perhaps thats an indication that I use it a lot when typing :s). Compared to HP, IBM and Apple laptops that I have used, it gets a 1 out of 10 for build quality.
  • Overheating: The heat sink and fan unit seem not very well thought out. The fan sucks air from directly under the laptop, blows it through the heat sink that has very fine fins, and out the side. There are two issues with this – right handed mouse users will find they get a warm thumb after a while, but worse, the heat sink gets blocked with lint and dust easily. The laptop will then overheat regularly and cut power (switch itself off) when the sensors indicate the processor is at about 80 degrees Celsius. I found that I had to clean it every few months.
  • Microphone Placement: The microphone is located on the left hand side of the base unit near the key pad, not exactly where my palm rests when typing but close. Alas, you’ll get feedback every time you put your hand on it by accident. So I just disabled the microphone and enabled it when I needed. As a side benefit, I also felt there was no way anyone was listening too me.
  • Touchpad: For some reason, more than any other laptop I have ever used, I found that I bumped the touch pad all the time. This made typing quite a frustrating experience – perhaps this is why the delete key broke, correcting all the mistakes from accidental cursor relocation via the overly sensitive and in-the-way touchpad.
  • Warranty: The warranty service in Australia is a bit poor. I have to take the laptop to a service center myself, drop it off, and find out later when it will be ready. I haven’t done this yet as I haven’t found time to drive all the way over too it.

This post is only intended to be informational for people who are curious about this model of laptop, and is based on my personal experience only. I am sure others have had much better or worse experiences.

Feb 2

I recently found a page at TechPatterns that makes installing proprietary Video Card drivers when using the Debian Sid (unstable) distribution quite easy and automated.

The sgfxi script provides a simple and (in my case anyway) reliable means to swap between your open video drivers, and the proprietary Nvidia or ATI drivers. Please note that this script is for Debian Sid and not Ubuntu

I also noticed that my computer ran about 10 degree’s cooler once I had installed the driver. So if anyone is having over heating problems, ensuring that you are using your video card’s processor could be your answer. If you do have overheating issues, a possible cause/solution is also mentioned in my ASUS A8JS Hardware Review post.

The above was tested on an ASUS A8JS Laptop running Debian Sid (2.6.23-1-686 kernel).