Posts by Adam Siembida

Changing the Steam icon in Ubuntu 16.04

The official tray icon for Steam looks good with Ubuntu’s Ambiance theme, however, it doesn’t adjust its color when you change to the Radiance theme.

Luckily, in order to change the icon, all you have to do is replace the existing icon: /usr/share/pixmaps/steam_tray_mono.png

The icon is a 48 x 48 png image, so I suggest you use the same. Originally I tried modifying the colors of the official icon, however, it didn’t seem to look good with the new coloring once it was shrunk down to size.

Modified Official Icon

Instead, I took an alternate icon from another article and modified the color of that one. (Note that the instructions in that article are out-of-date.)

steam_tray_mono

Just save one of these images onto your computer as custom_icon.png, then browse to that folder in the command line. Once you’re in that folder, run the commands below. The last two commands set the permissions and ownership of the file to match the other files in the pixmaps folder. The icon should change within a few seconds of copying it in.

sudo mv ./custom_icon.png /usr/share/pixmaps/steam_tray_mono.png
sudo chmod 644 /usr/share/pixmaps/steam_tray_mono.png
sudo chown root:root /usr/share/pixmaps/steam_tray_mono.png

Creating Launcher Icons in Ubuntu (14.04)

TLDR

sudo apt-get install --no-install-recommends gnome-panel
gnome-desktop-item-edit ~/Desktop/ --create-new
sudo mv ~/Desktop/name.desktop /usr/share/applications/

Full Version

Sometimes programs you want to install in Linux come as nicely packaged deb files, making them easy to install. Other times programs come as a folder with a shell script *.sh inside that you are supposed to run through the command line. This can be annoying, and some of us want to create a launcher icon so that we can search for it in the dashboard or add it to the sidebar.

I’m running Ubuntu 14.04 right now, and here is the easiest way to “install” those kinds of programs without having to manually edit config files or run tons of commands. I’m going to use the installation of the program SmartSynchronize (a file comparison utility) as an example.

  • First, download and unzip the program. In the case of SmartSynchronize, we will have a “smartsynchronize” folder as a result.
  • Create a new folder called “.bin” inside your home directory, and copy the smartsynchronize folder inside. If you can’t see the folder (folders that start with a dot are hidden folders) then push ctrl-h to view hidden folders.
  • Install the ubuntu-panel application. This can be done through the Ubuntu Software Center, or using the command below.
sudo apt-get install --no-install-recommends gnome-panel
  • Run gnome-desktop-item-edit with the options below, and use the resulting GUI to create an launcher file. These files end in the “.desktop” extension, but you can’t see the extension if they are on your desktop. They are basically a shortcut to launch a program.
gnome-desktop-item-edit ~/Desktop/ --create-new
  • Fill out the information:
    • Type: Application
    • Name: Don’t use spaces and just type the name of the application. This is the name of the “.desktop” file that will be created in the next step.
    • Command: Browse inside the folder you placed in the “.bin” folder, and find file that is used to launch the program. Usually this is a file ending in “.sh” that is inside the downloaded folder called “bin”.
    • Comment: This can be anything and isn’t really that useful.
    • Icon: Click on the icon to browse for a new icon. Usually the icons are located in the same folder as the file you chose for the command. Just choose the highest resolution icon available.

create-launcher-gui

  • You should now have a “<name>.desktop” icon on your desktop. In my case, this created a “smartsynchronize.desktop” folder on my desktop.
  • Now all that is left is to copy that file into the correct folder. You need root to do this, so it is easiest to do it using the command line. Just make sure to replace “name.desktop” to the name of the file you created in the last step.
sudo mv ~/Desktop/name.desktop /usr/share/applications/

In Ubuntu 14.04 the changes should be effective immediately. Just search in the launcher for the program name and it should show up. Then you can drag the icon to your launcher if you want.

How to Compile MPLABX Projects from the Command Line

Within the past couple of years, Microchip has released MPLABX, a Netbeans based IDE for their microcontrollers. The IDE works great and makes it easy to develop and build your projects; however, building releases locally on developer machines is not the ideal way to be releasing software. Continuous Integration (CI) and build servers solve this problem and are in widespread use by the software industry, but I am surprised that I don’t see more embedded developers using them.

I suspect that one of the contributing factors for this is that setting up embedded toolchains can be complicated and time consuming. Continue reading

How to Change Back to the Keyboard on the Samsung Note 10.1

I just recently bought a new Samsung Note 10.1 tablet, and it is a tablet with a stylus. It has a text input mode where you can write the text by hand and it changes it into typed text. Think back to the old Windows CE devices, but handwriting recognition that actually works surprisingly well.

Anyways, the reason of this post is that, embarrasingly enough, once I switched to the handwriting recognition mode, I couldn’t find any way to switch back to the regular keyboard. It was hard to find a solution when I Googled for it, so I figured I would put it here to help out anyone else having issues.

So, long story short, to close the handwriting recognition keyboard and switch back to the regular typing keyboard on the Samsung Note 10.1, follow these steps (or just look at the picture below):

  1. Click and hold on the gear icon (the three little dots actually suggest that you can click and hold for more options)
  2. Click on the icon of the keyboard that pops up

Handwriting recognition to keyboard note 10.1

 

 

 

How to Change the Firefox Button Color and Text

Note: This article is obsolete. They got rid of that button starting with Firefox 29.

Firefox seems to change how the settings for the Firefox button work with every release, meaning that most of the tutorials explaining how to do this are either broken or buggy. Here is another tutorial on how to change the color of the Firefox button, but this time I am going to keep the article up to date with the different versions of Firefox that it works with.

These instructions below have been verified to work with Firefox versions 22-28. Here is how to do it:

  1. Start Firefox
  2. Click on Firefox Button >> the arrow next to Help >> Troubleshooting Information
  3. Under the Application Basics heading, click on the Show Folder button next to Profile Folder.
  4. After clicking the Show Folder button, a folder should have opened in your computer’s file manager. Within this folder, manually create a new folder called chrome.
  5. Go inside this newly created chrome folder and either:
    1. Download the userChrome.css file I have attached to this article and place it into the chrome folder.
    2. Create a new file called userChrome.css (inside the chrome folder) and enter the following text into it. (Make sure that you name the file userChrome.css and not userChrome.css.txt or else it won’t work).
      @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
      #appmenu-button {
      background: #D4D4D4 !important;
      }
      
      #appmenu-button dropmarker:before {
      content: "Menu" !important;
      color: #FFFFFF !important;
      }
      
      #appmenu-button .button-text {
      display: none !important;
      }
  6. Restart Firefox and the changes should take place immediately.
  7. You can edit the background and color properties, then restart Firefox, to tweak the colors to your liking.

If you have any questions, then either email me directly or ask in the comments below. If there is demand, I can quickly create a video showing how to do it.

Attachment: userChrome.css (right-click on the link, then save it to your computer).

Negative Resistor Lesson

This tutorial is going to cover the topic of negative resistance. At first, it might seem like a strange idea that you could have a current flowing in the opposite direction of an applied voltage; but, hopefully by the end of this tutorial you will have a better intuitive understanding of what a negative resistance really is, and how to build a negative resistor out of common circuit components.

  1. What is a Negative Resistance?
  2. Creating a Negative Resistor Using a CCVS
  3. Creating a Negative Resistor Using a VCVS
  4. Creating a Negative Resistor Using Real Components
  5. Example Problem
  6. Summary

What is a Negative Resistance?

Our first step is to try to develop an intuitive notion of what a negative resistance is, and how it would behave in a circuit. The definition of resistance is governed by simple a relationship called Ohm’s Law.

$$R=\frac{V}{I}$$

We can see by looking at this equation, that to create a negative resistance we would need to create a circuit component which develops a negative voltage whenever a positive current is passed through it (assuming passive sign convention). However, rather than thinking about it in terms of mathematics, a simpler way to understand the idea of negative resistance is to consider the resistance of two resistors in series.

From a basic understanding of circuits, we know that the values of resistors add in series. Therefore, if we had a resistor with a positive value of 11 Ohms in series with a resistor with a negative value of -4 Ohms, the equivalent resistance in series comes out to 11 + (-4) = 7 Ohms. In other words, we can think of a negative resistor as a device we can put in series with another resistor to decrease its value.

Example of a negative resistor circuit

Return to Top

Creating a Negative Resistor Using a CCVS

Now that we have an idea of what we are trying to achieve, we can start our quest to create a negative resistor returning to Ohm’s Law and rearranging.

$$R=\frac{V}{I} \Rightarrow V=RI$$

Looking at this equation, we notice that it looks very similar to the equation governing the operation of a current-controlled voltage source (CCVS). In the equation below, $V_{CCVS}$ is the voltage output of the CCVS, $I_c$ is the controlling current, and $r_c$ is the “gain parameter” with units of Ohms—hint, hint!

$$V_{CCVS}=r_c I_c$$

If we make the assumption that the control current $( I_c )$ is flowing into the positive terminal of the CCVS, we can easily calculate the resistance $( R_{CCVS} )$ of the CCVS by once again using Ohm’s Law.

$$R_{CCVS}=\frac{V_{CCVS}}{I_c} = R_c$$

This leads us to the solution that the resistance of a current-controlled voltage source, whose control current is measured at the positive terminal, is simply equal to the gain parameter $( r_c )$ of the CCVS. By utilizing this fact, we can easily create a negative resistor simply by using a CCVS with a negative gain parameter. An example of this method can be seen in the figure below. Here we implement a resistance of -4 Ohms using the CCVS method.

Example of a negative resistor built using using a CCVS

Return to Top

Creating a Negative Resistor Using a VCVS

At this point, some readers might be wondering “why go any further?” Unfortunately, a current-controlled voltage source isn’t a very practical real world circuit component. In fact, many circuit simulation programs (such as LTspice) don’t even include CCVS models! We can, however, overcome this limitation by using a component which is more readily at our disposal: a voltage-controlled voltage source (VCVS).

By looking at the equation governing the operation of a VCVS, we can see that it looks identical to the equation of a voltage amplifier. In the equation below, $V_{out}$ is the voltage output of the VCVS, $V_{sense}$ is the controlling voltage (i.e., the input voltage to an amplifier), and $G$ is the gain parameter (which is a unitless ratio).

$$V_{out}=G V_{sense}$$

With the help of Ohm’s Law (last time, I promise!), we find that we can make the VCVS mimic a CCVS through the use of a sensing resistor $( R_{sense} )$ in series with the VCVS to measure current. The current flowing through $R_{sense}$ will create a voltage which is proportional to the current, and can then be picked up by $V_{sense}$. The proposed setup can be seen in the figure below.

Example of a negative resistor setup using a VCVS

While the above setup gives us a structure that can be used to create a negative resistor, we continue our analysis by developing a set of analytical equations describing this circuit’s operation. The voltage developed across the sense resistor is written below.

$$V_{sense} = I_{sense} R_{sense}$$

We can now take the equation governing the VCVS, make the following substitutions and regroupings, and make the equation look like the equation governing the CCVS.

$$V_{out}=G V_{sense} = G (I_{sense} R_{sense}) = (G R_{sense}) I_{sense}$$

Here we see that $(G R_{sense})$ takes the place of $r_c$ from the CCVS equation. Also, we know from the previous section that $r_c$ is the resistance of the CCVS negative resistor circuit. However, to find the total resistance $R_{total}$ of VCVS circuit we are building, we need to take into account the added resistance of the current sensing resistor $(R_{sense})$.

$$R_{total} = R_{sense}+r_c$$

Making the substitution $r_c = (G R_{sense})$, we obtain:

$$R_{total}= R_{sense}+G R_{sense} = R_{sense}(1+G)$$

From this equation, we can solve for the gain parameter of the VCVS that we would need to create any desired resistance in our circuit.

$$G = \frac{R_{total}}{R_{sense}} – 1$$

Using the set of equations we have developed, we now have the tools to create a negative resistor of any value by using only a VCVS along with a sensing resistor. As an example, we now create a negative resistor with a value of -4 Ohms. By arbitrarily choosing $R_{sense} = 2 \: Ohms$, we can calculate the required gain parameter of the VCVS by using the previous equation.

$$G= \frac{R_{total}}{R_{sense}} – 1 = \frac{-4}{2} – 1 = -3$$

The completed example circuit can be seen below.

Example of a -4 Ohm resistor built using using a VCVS

Return to Top

Creating a Negative Resistor Using Real Components

Now that we have created a theoretical circuit describing a negative resistor, our final step is to create a practical implementation using real world components. To reiterate from the previous section, a VCVS is nothing more than a voltage amplifier with differential input and differential output. To simplify the circuit design, we will make the assumption that one of the terminals of our negative resistor will always be connected to ground. This assumption allows us to use a voltage amplifier which has differential inputs, but only a single ended output. I’ve attached a schematic for an inverting amplifier like this as a reference in the figure below.

A differential input, single sided output, inverting amplifier

The gain of this amplifier is set by the ratio of resistors $R_f$ and $R_1$.

$$G=-\frac{R_f}{R_1}$$

Therefore the input-output relationship of this amplifier is governed by the following equation.

$$V_{out}=-\frac{R_f}{R_1}(V_{in+}-V_{in-})$$

The similarity to the equation governing the VCVS $(V_{out}=G V_{sense})$ is easy to see if we make the following substitutions.

$$G = -\frac{R_f}{R_1}$$

$$V_{sense} = V_{in+}-V_{in-}$$

This allows us to directly substitute for the VCVS in the negative resistor circuit with our differential amplifier circuit. We can solve for the required ratio of $R_f$ to $R_1$ by using the equation used to calculate the required gain of the VCVS in the previous section. The equation is repeated below.

$$G=\frac{R_{total}}{R_{sense}} – 1$$

$$-\frac{R_f}{R_1}=\frac{R_{total}}{R_{sense}} – 1$$

$$\frac{R_f}{R_1}=-\left( \frac{R_{total}}{R_{sense}} – 1 \right)$$

By directly replacing the VCVS from the previous section with the circuit above, we obtain the final schematic for the negative resistor seen below.

A negative resistor implemented using differential amplifier

We find the overall resistance of the circuit by substituting the gain equation of the differential amplifier circuit into the equation for calculating $R_{total}$ of the VCVS circuit developed in previous section.

$$R_{total} = R_{sense}(1+G) = R_{sense}\left(1+ -\frac{R_f}{R_1} \right) $$

Return to Top

Example Problem

To make sure that everything discussed is correct and checks out, we will work out a single example problem and simulate it.

Example: Create a negative resistor with a value of -4 Ohms. Use $R_{sense}=2\: Ohms$, and keep both $10\: kOhms \leq R_1 \leq 1\: kOhms$ and $10\: kOhms \leq R_f \leq 1\: kOhms$. Using Spice, calculate the equivalent series resistance of the negative resistor in series with an 11 Ohm resistor, using a 5 V DC voltage source as the test voltage. The total equivalent resistance should be equal to 11 – 4 = 7 Ohms.

We start by calculating the required gain of the amplifier.

$$G = \frac{R_{total}}{R_{sense}} – 1$$

$$G = \frac{-4}{2} – 1 = -3$$

Now that we know the gain, we can calculate the values of $R_1$ and $R_f$ to set the gain of the differential amplifier circuit. To make our calculations easy, we will choose $R_1 = 10\: kOhms$.

$$G=-\frac{R_f}{R_1}$$

$$-3=-\frac{R_f}{10,000}$$

$$ R_f = 3 \times 10,000 = 30,000\: Ohms$$

Now that we have the values of all the components, we can plug them into our circuit. Here is what we get!

completed example circuit

To verify our results, we run the simulation and everything checks out. Because the differential amplifier has a finite input resistance, this will slightly affect the operation of our circuit. We can take this into account while we are designing our circuit; but, I will leave that as an exercise for the reader (don’t you always love it when textbooks do that).

Return to Top

Summary

As a summary, I will outline our thought process, the steps we took, and the final result so that we can collect our thoughts.

  1. We notice that a current-controlled voltage source has a similar equation to a resistor.
  2. We realize that we can create any value of resistor (both positive and negative) if we use the current flowing into the positive terminal of the CCVS as the sensing current, and choose a suitable gain parameter value.
  3. We can mimic the CCVS using a voltage-controlled voltage source if we use a current sensing resistor.
  4. We can implement a VCVS by using a differential amplifier.
  5. By substituting the VCVS for the differential amplifier, we obtain a practical method to implement a negative resistor.

The negative resistor circuit can be seen below

A negative resistor implemented using differential amplifier

The resistance of the circuit is given by the following equation.

$$R_{total} = R_{sense}\left( 1-\frac{R_f}{R_1} \right) $$

If you have any questions, feel free to either leave a comment below or shoot me an email.

Return to Top

How to Send a UDP Packet in Python

Recently, I ran across a problem where I wanted to automate the testing of a microcontroller for which I was unable to modify the locked down embedded software. Moreover, the microcontroller could only communicate over an Ethernet network using TCP/IP and UDP. Sending either a TCP or UDP packet onto a network is a very easy thing to do using Python, but takes a little bit of knowledge about networking for it to make sense. In this tutorial I am going to give the most bare-bones and simplest possible way to send a packet of data over a network using UDP.

  1. Sending a UDP Packet
  2. Handling Basic Exceptions

Sending a UDP Packet

So, without beating around the bush, here is how to send a UDP packet.

import socket
# addressing information of target
IPADDR = '8.4.2.1'
PORTNUM = 10000

# enter the data content of the UDP packet as hex
PACKETDATA = 'f1a525da11f6'.decode('hex')

# initialize a socket, think of it as a cable
# SOCK_DGRAM specifies that this is UDP
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)

# connect the socket, think of it as connecting the cable to the address location
s.connect((IPADDR, PORTNUM))

# send the command
s.send(PACKETDATA)

# close the socket
s.close()

Pretty easy. The only things you would need to change are the IP address you are trying to send the data to IPADDR, the port number you are trying to send the data to PORTNUM, and the data you want to put inside the data of the UPD packet, PACKETDATA. Now, you might be wondering what .decode('hex') is used for.

This is necessary if you want to input the data to be transmitted as hex (which is usually the case in networking). If you didn’t include that statement, the data would be sent as a string (in a different encoding) instead. This would mean that if you looked at the data portion of your packet in Wireshark, you would see something different than what you put inside the string for PACKETDATA.

Handling Basic Exceptions

Like I said before, this is the most bare-bones way to send a UDP packet over a network. No fancy stuff involved. There is however, one thing that to add that is very helpful. If the socket fails to connect, you will get an exception. One way you can deal with this is to simply ignore any exceptions. This can be done by modifying your UDP script to include a try and except.

try:
    # code to try
except:
    # do this code if there is any exception, or use 'pass' to do nothing
    pass

So then, your new program will look like the following:

import socket

# addressing information of target
IPADDR = '8.4.2.1'
PORTNUM = 10000

# enter the data content of the UDP packet as hex
PACKETDATA = 'f1a525da11f6'.decode('hex')

# initialize a socket, think of it as a cable
# SOCK_DGRAM specifies that this is UDP
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)

try:
    # connect the socket, think of it as connecting the cable to the address location
    s.connect((IPADDR, PORTNUM))

    # send the command
    s.send(PACKETDATA)
except:
    pass

# close the socket
s.close()

Good luck!

Setting Default Properties for the MathJax Module for Drupal

This is going to be a quick tutorial on how to set default properties and options for the MathJax Module for Drupal. I recently switched my Math (LaTeX) rendering module to MathJax, and I was having a hard time finding information on configuring the default setting with which the math equations would load.

  1. Finding the File with the Default Settings
  2. Where to Find MathJax Options
  3. Clearing Drupal’s Cache

Finding the File with the Default Settings

The problem with LaTeX is that while the equations look great, often times when viewed on the web, the smaller letters and symbols in math equations can be hard to make out. Luckily for us, MathJax has some nice features which are accessible through a menu when you right-click on an equation. You have options such as enlarging equations on mouseover, saving equations as an image, etc. The downside to the right-click menu is it might not be obvious that such a menu even exists for a user visiting your website.

So, I set upon my quest to make this better. I decided that I would change the default behavior of the equations to enlarge on mouseover since I figured that this would be much easier to discover for a person browsing my site. Unfortunately, the documentation for the MathJax module for Drupal is pretty non-existent. What’s more, the information on the official MathJax is not directly applicable to the MathJax module for Drupal since some files have been renamed and some functions moved. So I am just going to tell you right here. If you want to change the default settings for the MathJax module for Drupal, you will need to put your code in the Mathjax.Hub.Config() function in the mathjax.js file located in the /sites/all/modules/mathjax directory.

You can see a picture below which shows you where to put your code. I added two the lines which are highlighted blue, with the big red arrow pointing at them! The two settings I changed were to make the equations would enlarge on mouseover, and set the delay before enlarging to be 50 ms.

MathJax default settings location

Where to Find MathJax Options

If you are wondering what kind of settings you can change and where you can find the code for changing these options, you can find it buried down in the official MathJax page over here. Once you have found what you want to change, add it into the mathjax.js file like I showed in the picture above. Make sure that you put your code as a separate line, surrounded in single quotes with a “+” at the end of the line, and don’t forget the comma on the inside of the right-most quote. Just look at the screenshot and you will see exactly what I mean. A small warning, though, is that the last line inside of the Mathjax.Hub.Config() function shouldn’t include the comma that I just told you about. This will supposedly fix some compatibility issues with certain versions of our beloved ? Internet Explorer ?.

Clearing Drupal’s Cache

Now, before you start telling me that my tutorial is a load of junk and that your changes to the file aren’t taking effect, make sure to clear Drupal’s cache and then refresh the page. Updates to JavaScript files used on a Drupal website won’t take effect until Drupal clears its cache. To do this manually, open up your Drupal administrator menu and go to “administration > configuration > development” and click the “Clear all cahces” button. You can see how it looks in the screenshot below.

Clear Drupal cache button

Here is any example of a math equation with the default settings applied. As you can see, some of the smaller characters are hard to make out, so hovering your mouse over the equation will make it easier to read. I hope this saves you some trial-and-error and frustratingly digging through files!

$cos(t)=\frac{e^{jt}+e^{-jt}}{2}$

A word of warning however. You will have to re-do any changes you made if you ever update the MathJax module.

Configuring Thunderbird to Work and Play Nice with GMail

This tutorial is going to explain how to configure Thunderbird 3 to work the best with GMail. In Thunderbird 3, the account creating wizard makes it easy to connect to GMail, but there are a lot of different settings that need to be adjusted to make the program work even better. This tutorial will explain how to adjust all the settings so that Thunderbird will works as smooth and properly as possible with GMail.
As example of a problem, if you don’t specify your search and folder settings properly, you will get duplicate messages making it hard to find aynthing when you search. Another example is that when you delete items through Thunderbird, it will create an additional Trash label in GMail.

One more thing to note: For security reasons, I will not be using any extensions or plugins for Thunderbird. Let’s get started!

  1. Configuring your GMail Account
  2. Adding your GMail Account to Thunderbird 3
  3. Configuring Thunderbird 3 for the Best Settings

Configuring your GMail Account

The first thing you have to do is configure your actual GMail account. To do this, log into your GMail and then click on the gear icon in the top right corner of your email, then Mail settings. For some reason Google decided to use a nearly identical icon as the settings icon in Internet Explorer 9, so do not confuse the two. You can see where to click in the screenshot below.

settings

Now that you are in the settings, click on the Forwarding and POP/IMAP tab. The settings you want to choose are Enable IMAP, Auto-Expunge on, and Do not limit the number of messages in an IMAP folder. You can see the correct settings in the screenshot below.

Make sure to push Save Changes when you are done with this tab

imap

The last settings we need to change are located under the labels tab. Under System labels you can see your usual GMail labels. In Thunderbird these will show up as folders. For each label that you want to appear in Thunderbird, you need to check the corresponding Show in IMAP checkbox. Under the System labels, check the Inbox, Starred, Sent Mail, Drafts, All Mail, and Spam. Un-check all of the other boxes unless you want them to appear in Thunderbird as a separate folder. I decided to un-check some GMail features like their Important and Chats labels, because part of the reason I use Thunderbird is to get away from all the feature bloat, social networking, and advertising that Google keeps throwing in my face.

Make sure, however, that the all the labels with arrows (except for Starred which is up to you) are checked.

labels

Return to Top

Adding your GMail Account to Thunderbird 3

Now that your GMail account is all set up and ready for Thunderbird, we are ready to add the account in Thunderbird. Click on Tools > Account Settings…

acct_sett

Next click on Account Actions > Add Mail Account…

add_acct

Now type in your gmail settings and push Continue. Thunderbird will automatically configure the server deails, and unless something went wrong, you should see the screenshot below. Make sure that IMAP (remote folders) is selected, and press Create Account.

add_acct_next

Return to Top

Configuring Thunderbird 3 for the Best Settings

Now that your account is created, you could technically start using Thunderbird for your email. But we will make sure that all the settings are set in the best way possible to make work nicely. If you just added your account, the Account Settings window should still be open. If it is not, click on Tools > Account Settings… from the main menu.

Server Settings

To start, click on the Server Settings item. The first thing we will do is make sure that deleting messages is handled properly. Under When I delete a message choose Remove it immediately. If you leave it as Move to this folder: Trash, GMail will remove still get rid of the messages from your Inbox, but it will also create a new label called something like Gmail/Trash and tag all of your deleted messages with it. This won’t ruin anything, but why have an extra label that does nothing.

The other settings under Server Settings like Check for new messages at startup, or Check for new messages ever X minutes don’t matter because in IMAP, everything happens in real time automatically. Here is how I have it set:

server_settings

Copies & Folders

Next, click on Copies & Folders. This page is important. Just look at my settings in the image below and set it exactly the same. What you are doing here is telling Thunderbird not to save copies of sent messages, becaues GMail automatically does that for you, and automatically places it in the Sent folder. I am not sure what Message Archives does, but I know that you don’t need it. By setting the Drafts options, we are telling Thunderbird that to save any unfinished emails in to GMail’s Drafts folder on the web. If we left it as the default settings, when you save an un-finished message, it would store locally on your computer. This means that if you logged into GMail from a different computer, the saved message would not be there. I don’t use Templates, so I just set it to GMail so that if I ever did, they would be synced with the GMail server.

Here are the proper settings:

copies_folders

Here is how you set the Drafts folder:

drafts

Junk Settings

The next thing we have to fix is the spam/junkmail settings. Click on the Junk Settings page and make the settings how I have them in the screenshot below. GMail already has built in spam control which works very well, so we don’t need to use the Thunderbird built in spam control. I have my email posted right on my website, free for anyone to see (including spam-bots crawling the web to harvest emails) and I rarely have a single spam message slip through. Under Move new junk messages to, choose Other and set it to the Spam folder on GMail. This makes any messages marked as Junk (the terminology Thunderbird uses) go into GMail’s spamp folder. This way if a spam message ever slips through, you can mark it as spam simply by clicking the Mark as Junk button within Thunderbird. If you didn’t set this up, marking messages as spam from within Thunderbird has no effect.

Here are the proper settings:

junk_settings

Here is how you set the Spam folder:

spam_folder

Synchronization & Storage

Next open the Synchronization & Storage page. Here we are going to make sure that Thunderbird downloads all the messages, regardless of their age, and stores them forever. This way you will have access to all of your email messages, even if you don’t have an active internet connection. It also means that Thunderbird won’t have to re-download the messages if you try to open something that hasn’t been downloaded before. The last thing this does, is that it makes searching from within Thunderbird work very well, since what would be the point of searching if you were only looking at 10 percent of your messages?

Below are the proper settings:

sync_storage

Now we are done with the Account Settings menu, so click on the OK button.

Options Menu

Next we have to do some finishing touches in the Options menu. Click Tools > Options to open it up. Click on the Security icon, and then the Junk tab. Check the box next to When I mark messages as junk > Move them to the account’s “Junk” folder. For some reason, unless you do this, when you mark a message as spam, it will get marked as spam, and just sit there… This makes it so that if you mark a message, it immediately gets tossed in the Spam folder and it’s gone. Here is a screenshot of the settings:

options_junk

Now while the Options menu is still open, click on the Composition icon, and then the General tab. I left everything here as default for my personal setup, but here is where people might want to change settings. Where it says Auto Save every X minutes, some people like to put it to something more frequent, for example save every minute. The problem with setting it too low is that because Thunderbird is saving the message to the GMail Drafts folder, you will get a message that it is sending something every time it backs up your draft. It can get annoying very fast. Click the OK button to save and exit out of the Options menu.

Search Settings

We are nearly done! The last thing we need to do is make sure that when you are searching for messages, that you don’t have duplicate messages coming up. If you have a message in the Inbox, it will automatically also be in All Mail. So when you search, Thunderbird will actually find both, and show you both. To make sure that this doesn’t happen, one by one, perform the following procedure on every folder except All Mail, Drafts, and Sent Mail.

Right click on the folder located in the bar on the left of the program and select Properties. Un-check the box next to Include messages in this folder in Golabl Search results. Push OK.

no_search

When you are doing the Spam folder, you should also click on the Synchronization tab, and then un-check Select this folder for offline use. This will keep Thunderbird from download hoards of useless Spam and taking up space on your hard drive. Keep in mind that you will still be able to look inside of this folder just like you would any other folder. The only difference is that you might not be able to do it offline, and sometimes it might take a little longer to load.

Favorite Folders

The last thing to do is completely optional, but you can right-click on a folder, and mark it as a Favorite Folder. This way you can mark all the folders you use as favorites, and then you can click the black triangle shaped arrows (I marked it with a red arrow) to change your view.

add_favorite

Keep clicking the arrow until it says Favorites and only shows the folders you marked as a favorite. Doing this lets you hide the Spam folder, which will eventually fill up with hundreds of unread spam messages, and you have to keep right-clicking on it, and then doing Mark Folder Read if you are as compulsive about it as me! Here is how the final setup should look. Nice and neat, and functional.

fav_view

Finishing Touches

The last thing you might want to do is log back into GMail, and delete any of the labels that Thunderbird automatically created before you had it configured like this.

Wow this was long! Hopefully it was worth it and will help you configure Thunderbird to play nice with GMail! If you have any questinos (or if you have some tips that I missed which you would like to share) feel free to leave a comment!

Return to Top