Changing the default size of gnome-terminal

Whenever I start gnome-terminal, it opens to 80 columns x 24 rows.  That is too small for my taste.  Henceforth, I want it’s default size to be 80×50.  Install gconf-editor.

sudo apt-get install gconf-editor

Screenshot from 2013-02-19 00:05:02

Start gconf-editor.  In the window on the left, navigate to /apps/gnome-terminal/profiles/Default.  In the window on the right, set default_size_colums to 80 and set default_size_rows to 50.  Be sure to select use_custom_default_size.  You are done.  Close gconf-editor.  Start gnome-terminal and try out its new size.  (ctrl-alt-t, if you are using unity desktop)

Fixing postfix and saslauthd: cannot connect to saslauthd

If you are having issues getting postfix email server to authenticate with saslauthd, your solution might be found in a missing symlink.  Remember that postifx runs in a chroot environment.

I find the following warning message in /var/log/mail.log:

 warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

The warning message tells me that saslauthd can’t be located. The real location is /var/spool/postfix/var/run/saslauthd, but postfix is expecting to find it in /var/run/saslauthd.  Create a symlink as described below and see if that fixes your problem.

sudo ln -s /var/spool/postfix/var/run/saslauthd /var/run
sudo chown root:sasl /var/spool/postfix/var/run/saslauthd
sudo usermod -a -G sasl postfix

Be sure to restart postfix and saslauthd.

sudo /etc/init.d/postfix restart
sudo /etc/init.d/saslauthd restart

After restarting saslauthd, you should see some of the following files in /var/spool/postfix/var/run/saslauthd:

cache.flock cache.mmap mux/ mux.accept

Test using your smtp client and verify that you no long receive the previous warning message in your mail.log file.  Hopefully this was your quick fix.

Fixing minor (compiz) window-manager issues in Ubuntu’s Unity desktop without logging out

I’m currently using Ubuntu 12.04, the Unity desktop and the compiz window-manager.  If you notice that some of your applications stop “behaving normally” on your Ubuntu Unity desktop, it might be the fault of the compiz window manager.    I will use the phrase “behaving normally” loosely to include any of the following symptoms.

  • The nautilus menubar does not appear when the nautilus window has the focus
  • Right-clicking a file in nautilus does not bring up the usual pop-up window
  • The volume control pop-up stops working in totem movie player when selected
  • In nautilus Paste-into-folder is unexpectedly greyed out but still works 

I could go on, but generally the symptoms involve the loss of pop-up windows and menubars.

I have fixed many of these issues by doing Alt+F2, and typing:

compiz –replace

Or if you have a terminal open, then run:

compiz –replace &

I hope you find this useful.  It doesn’t require you to logout/logon and your apps continue to run.

[Solved] Unity desktop and nautilus not recognizing the Calibre application for .mobi and .epub files

Calibre is a great application for managing your ebook collections.  It recognizes many different ebook formats.  I use it as a reader for .mobi, and .epub files.

After installing calibre on my Ubuntu 12.04 box, I was annoyed to find that nautilus on the Unity desktop did not associate the calibre application with .mobi and .epub files.  In other words, when I tried to open a .mobi file, nautilus didn’t know what application to launch.  Furthermore, nautilus no longer gives you the option to right-click a file and add a custom application to handle it.  You are forced to use a static list of already known applications.

Solution 1:

There appears to be an error in the desktop launcher file for calibre.  Edit the file /usr/share/applications/calibre.desktop.



To be

Exec=’/usr/bin/calibre’ %f

and save.

Now nautilus should give you the option of selecting calibre from the list of applications.  Right click on a .mobi or .epub file and select properties.  Select the “Open with” tab and select the calibre application and click either “add” or “set as default”.

Solution 2 (creating a gnome desktop launcher) :

I’m going to show you how to create a desktop “launcher” with the basic contents required.  You can modify the name and contents as needed to suit other applications and file formats.

Create a file named calibre.desktop in your home folder under ~/.local/share/applications/ (to make this available to all uses, you would copy this file to /usr/share/applications)

Add the following to that file and save.

[Desktop Entry]
Exec=’/usr/bin/calibre’ %f
Comment=e-book manager and reader

Now go back to nautilus and right click on any .mobi or .epub file and select properties.  Click the “Open with” tab.  Select show other applications.  You should now see calibre in the list.  Select calibre and click “set as default”.

You are done.  Nautilus should now recognize calibre as the default application for opening .epub or .mobi files.

Further reading:


solved: starting conky on startup under unity (Ubuntu 12.04)

I had issues when starting conky as a startup application under the unity desktop (Ubuntu 12.04 LTS).  The problem is that conky would start in a window that was on top of everything else, rather than on the desktop underneath everything else.


The problem seems to be a timing issue.  I solved this by delaying the start of conky by a few seconds.  Use the -p option when starting conky to set a pause before actually starting conky.  I chose 10 seconds, you can play around with it and find whats works best for you.

Go to the unity dashboard and open Startup Applications, add conky and set a pause using -p.  This should start conky automatically whenever unity starts, and allow time for conky to start correctly on the desktop.


Ubuntu 11.10 getting wireless BCM4311 working

I have an HP laptop model nx6325 with a Broadcom BCM4311 wireless card.  After installing Ubuntu 11.10, I find that my wireless doesn’t work.  The reason, Ubuntu detects the wireless but then loads the incorrect driver for this card.

I use the lspci command to display the details about my hardware. It will display all of your PCI connected hardware. I edited the output to show only the relevant information.  The important information here for  matching your hardware with mine is this indentifier [14e4:4312].

$ sudo lspci -v

30:00.0 Network controller: Broadcom Corporation BCM4311 802.11a/b/g (rev 01)
        Subsystem: Hewlett-Packard Company Broadcom 802.11a/b/g WLAN
        Flags: bus master, fast devsel, latency 0, IRQ 18
        Memory at c8000000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 2
        Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [13c] Virtual Channel
        Kernel driver in use: b43-pci-bridge
        Kernel modules: ssb

$ sudo lspci -nn
30:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11a/b/g [14e4:4312] (rev 01)

The Solution

I am  going to install the correct driver for this wireless card. Then I will remove the “incorrect” driver (bcmwl) which Ubuntu installed by default.

$ sudo apt-get update
$ sudo apt-get install firmware-b43-installer
$ sudo apt-get remove bcmwl-kernel-source
$ sudo reboot

Hopefully you found this useful.

If you have this same type of wireless chip in your laptop, these instructions might also work for you.

Configure Ubuntu to start in text mode

In my previous post I showed you how to add the gnome desktop to your Ubuntu server.   Suppose you want to configure Ubuntu to start in text mode rather then automatically starting the gnome desktop.  It is an easy change to make.  Here is how.

1) Edit /etc/default/grub.  Locate and change the following line.




GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text”

Then save your changes.

2) Run

sudo update-grub

The next time you reboot, Ubuntu will boot to text mode and you will see the console login screen (cmdline).  You can start the gnome desktop manually after loggging on by running “startx“.  When you logoff from the gnome desktop, you will be returned to the cmdline again.

Install a graphical desktop on Ubuntu Server 10.04 (without alot of extras)

Sometimes I find the need to install Ubuntu Server with a gnome desktop like the one that you get with Ubuntu Desktop.  You can install Ubuntu Server and then use apt-get to install the package ubuntu-desktop.  However, if you do that you will end up installing almost everything that comes with a Ubuntu Desktop installation.  This is not what I want.

What I really want is a  gnome graphical desktop running on top of Ubuntu Server and very little else.  Here is what I do.

Step 1:

Install Ubuntu Server

Step 2:

Logon and install the following packages.

$ sudo apt-get update

$ sudo apt-get install ubuntu-desktop –no-install-recommends

You will want the indicator applets.

$ sudo apt-get install indicator-applet-complete indicator-applet

If you want a web browser, a good choice is chromium.

$ sudo apt-get install chromium-browser

Step 3:

Reboot and enjoy.

That is all.