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)

Advertisements

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 saslauthd.pid

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.

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.

change:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

to:

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.

How to prevent a Debian or Ubuntu package from being upgraded

Recently, I wanted to hold my virtualbox software at version 4.04 and prevent it from being upgraded.  If you use the gnome update-manager, you can always deselect the virtualbox  package in the GUI each time.  If you don’t like having to do that each time, I will show you two additional methods.  The first method using aptitude and the second method using dpkg/apt-get.  Choose one method or the other, the two methods are independent.

Method 1: Aptitude

Use aptitude to place a hold on a package and this will allow aptitude to upgrade everything else except packages that you have “held back”.

I’ll show you how to place a hold on the virtualbox package (virtualbox-4.0).

Start aptitude.

$ sudo aptitude

Your first action should always be to update your repo cache.  Hit the “u” key.

Next, search for virtualbox.  The “/” key will bring up a search box.  Enter virtualbox and hit enter.

If virtualbox is installed, aptitude should find it.

Hit the “=” key to place a hold on the virtualbox package.

You should see the flags “ih” now associated with the virtualbox package.  This means that virtualbox is installed and there is a hold placed on it.  It won’t be upgraded while it is held back.

Whenever you want to clear the hold flag, search and select the virtualbox package again and hit the “:” key.  That will remove the hold.

To upgrade your server.  Use the arrow keys to go to the top of the list and select the Upgradeable Packages.  Then hit the “g” key.

Hit the “q” key to quit aptitude.

Packages that are held back will still show in the Upgradable Package list whenever there are upgrades available for download.  If you try to upgrade it, it will be skipped.  As shown below.

If you prefer to use the cmdline, this is how to do everything that I just talked about, place a hold on virtualbox and upgrade everything (except virtualbox).

$ sudo aptitude update

$ sudo aptitude hold virtualbox-4.0

$ sudo aptitude safe-upgrade

And when you are ready to remove the “hold” placed previously on virtualbox and upgrade everything

$ sudo aptitude update

$ sudo aptitude keep virtualb0x-4.0

$ sudo aptitude safe-upgrade

Method 2: dpkg/apt-get

To place a hold on virtualbox and upgrade everything (except virtualbox).

$ sudo apt-get update

$ echo “virtualbox-4.0 hold” | sudo dpkg –set-selections

$ echo apt-get upgrade

To remove that hold on virtualbox and upgrade everything.

$ sudo apt-get update

$ echo “virtualbox-4.0 install” | sudo dpkg –set-selections

$ sudo apt-get upgrade

Summary

Whichever method you choose, please remember that each method is independent of the other.  In other words, if you use aptitude to place a hold on a package, then apt-get won’t see that hold.  If you place a hold using dpkg, then aptitude won’t see that hold either.   So remember to be consistent with whichever method you choose.  Yeah, it’s a bit nuts.

Ubuntu 10.04 Lucid Lynx and Wacom Bamboo CTL460 (revisited with Q&A)

In my first post on this subject,  I demonstrated how to enable the Wacom Bamboo CTL460 on Ubuntu 10.04.   Since then, I have received a number of questions which gave me the impression that some items need a more thorough explanation.  Following the Q&A, I will repeat my steps from my previous post.  This time with a slightly newer version of the driver.  The steps are the same.

Wacom Bamboo

Wacom Bamboo CTL460

Questions and Answers

Question:  I tried your steps but my Wacom tablet model xxx doesn’t work. Can you help?

Answer:

If you have some other Wacom tablet besides the model CTL460, these instructions may not work for you.  You are welcome to try them.  Since I only have the model CTL460, I am limited in the amount of advice that I can give you for whatever model you have.  If you can’t figure it out and I’m unable to help, you should try contacting the maintainer of the linuxwacom project or the author of the driver.  (modinfo wacom | grep author)

Question:  My Wacom tablet used to work under Ubuntu 9.xx, or 8.xx.  Why won’t it work under 10.04?

Answer:

One myth that needs to be addressed, is that the Wacom CTL460 is supported by Ubuntu 10.04 and will work out-of-the-box.  That is not true. If you had a previous version of Ubuntu and your Wacom CTL460 worked out-of-the-box, you need to realize that it no longer just works out-of-the-box.  There have been some changes to xorg since then.  In addition, if you have been using instructions in the past (previous to 10.04)  which included making changes to /etc/udev/rules.d, you can throw those out.  Those instructions do not apply anymore.  Furthermore, you do not need to install the package xserver-xorg-input-wacom.  That package contains code that does not work for this tablet. You can remove it if you want since it has no impact on the rest of these instructions.

Question:  Your steps worked great but one day I rebooted and my tablet doesn’t work anymore.  Help?

Answer:

You recently ran Update Manager and one of the packages you updated was the kernel image package.  Not a problem.  This is normal and to be expected.  You need to follow the steps again each time the kernel image package is updated to reinstall a new driver.

Question:  I was trying to configure my table in Gimp but I did not see a wacom input device.  Help?

Answer:

Make sure that your tablet is plugged in and working before you start the Gimp application.

Question:   Help?  I was following your steps but I noticed the following message:

Note: this package only supports Xorg server older than 1.6.5.
You are running a newer version.
Please build xf86-input-wacom instead.

Answer:

Simply ignore it.  I did.

Question: When will the Wacom CTL460 be supported out-of-the-box?

Answer:

I don’t know.  Hopefully in the next version.

Instructions

Install the following packages:

sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev xserver-xorg-dev tk8.4-dev tcl8.4-dev libncurses5-dev

Download the source code for the wacom driver from Sourceforge.  The current version as this writing is linuxwacom-0.8.8-3.

tar jxvf linuxwacom-0.8.8-3.tar.bz2
cd linuxwacom-0.8.8-3/
./configure –enable-wacom
make
cd ./src/2.6.30
sudo cp wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet
sudo depmod -a
sudo modprobe wacom

That is all.  You can plug in your Wacom CTL460 Bamboo tablet and begin using it.

If you take anything away from this exercise please remember this

What we did was replace the wacom driver that comes with the kernel package.  We simple copied our newly built wacom driver in its place.  Whenever you update the kernel package, you need to follow these steps again.  Be sure to reboot first so that you are running the new kernel prior to rebuilding a new driver.

If you don’t want to download a new version from Sourceforge, you can keep the folder from above and reuse it.   In that case you just need to do the following steps (don’t overlook the make clean below):

reboot (so that you are running the new kernel)
cd linuxwacom-0.8.8-3/
make clean
make
sudo cp wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet
sudo depmod -a
sudo modprobe -r wacom
sudo modprobe wacom

Additional tips

  • When you run Update Manager, be on the lookout for updates to the kernel image.  After updating the kernel image, you should reboot.  You will then be required to reinstall a new wacom driver.
  • Unplug your Wacom tablet before you rebuild a new module.
  • Plug in your tablet after you are done installing the new driver.
  • Plug in your table before you start Gimp or any other application that will be using your tablet.
  • While your tablet is plugged in, you can verify that your driver is loaded by using lsmod | grep wacom
  • Become familiar with modprobe, udevadm, and /var/log/kernel.log for additional low level troubleshooting