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

Running Android Apps on your linux box

So you want run Android applications on your linux box.  Basically you’ll need three things.  The Android SDK, Java JRE, and 32bit libraries.  If your server is already a 32bit server then you already have 32bit libraries installed.  If you server is a 64bit server then you will need to install the 32bit execution libraries, for Ubuntu that is the  ia32-libs package.


$ sudo apt-get install openjdk-6-jre

$ sudo apt-get install ia32-libs

Download the Android SDK from developer.android.com

Extract and run the Android SDK.


$ tar -zxvf android-sdk_r06-linux_86.tgz

$ cd android-sdk-linux_86

$ cd tools

$ ./android &

Click on “Installed Packages” to update your tools and APIs.  Click the “Update All…” button.

I am going to select the “Android 2.2, API 8” and click Install.  This will download and install several packages.

When it finishes downloading and installing the additional packages, you should see something like the following.

Now lets create a virtual Android device.  Select “Virtual Devices” and click the “New…” button.

Select a name for your Android device.  I chose fakeDroid.  Select an API level, SD card size, and a Skin (screen size).  The Hardware section, lets you outfit your Android with various features.  I’m going to select the following:

  • SD Card support
  • GPS support
  • Accelerometer
  • DPad support
  • Touchscreen support
  • Audo playback support

Then click “Create AVD”.

This will create a virtual android device for you.  You can select your virtual device and click the Start button.

Your virtual Android will then power-on and begin botting.  When it finishes booting you should see something like the following.

Now lets install an Android application.  Click on the button that looks like a globe to start the android web browser.  You should see a web browser like the following.

Enter the URL:  http://www.androidfreeware.org

To zoom in you can double click on the Android touchscreen.  You can pan the display by using your mouse pointer to “drag” the touchscreen.  I’m going to install the application PicSay 1.3.0.7, but you can choose whatever application you want.  You install android applications by downloading the android package files with .apk extension.   You should see a link for downloading the file.

After the download begins, click and drag downward on the top menu bar.  This is where android keeps its notifications.  Soon, you should see that the download has completed.

Click on the downloaded file and it will open the installer program for that application.  Click the Install button.

When the application finishes installing, you can click the home button to go back to your Android home page.  Then click the touch screen button which looks like a grid.  That is the launcher button.  It takes you to the screen where you can launch applications.  You should see the icon for your newly installed application (PicSay).

To start the PicSay application, click its icon.   We are done here.

Have fun experimenting with the android SDK.

Change the login screen background in Ubuntu 10.04

I used to have a custom background setup on my Ubuntu 9.10 system.  My login screen background was reset to the default purple background after upgrading to Ubuntu 10.04.  If you want to setup a custom login screen background there are (at least) two methods.

Method 1

Install Ubuntu Tweak.  Ubuntu Tweak will let you tweak many things including the login screen background.

Ubuntu Tweak

To install Ubuntu Tweak add the third party repository to your list of repositories.

Go to System-Administration-Software Sources, Third-Party Software tab, Add:

 deb  http://archive.getdeb.net/ubuntu lucid-getdeb apps

Add the repository GPG key, open a terminal window and type:

 $ wget -q -O-  http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

Install ubuntu-tweak from the command line.

$ sudo apt-get update
$ sudo apt-get install ubuntu-tweak

Method 2

Copy your favorite background .jpg file to /usr/share/backgrounds


$ sudo cp  my_cool_bg.jpg /usr/share/backgrounds

$ sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow

Logout

You should see an “Appearance Preferences” window, select the Add button and select the .jpg file that you want for your login screen background.  Close the window.

Appearance Preferences

Login again and remove the gnome-appearance-properties.desktop file that you copied in the previous step.  This will prevent you from getting the appearance-properties windows at every gdm login.


$ sudo rm /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

Which method should you use?  If you really enjoy customizing your GUI and changing its behavior, then use Method 1 and install Ubuntu Tweak and enjoy having the control over many settings within easy reach.

Ubuntu 10.04 and Broadcom BCM43xx wireless

After installing Lucid Lynx Ubuntu 10.04 on my laptop, I had no wireless.  The wireless worked find under the previous two versions of Ubuntu.  The solution is to install the Broadcom 802.11 Linux STA wireless driver source.


$ sudo apt-get install bcmwl-kernel-source

$ sudo reboot

After rebooting, wireless works.

Updated: BTW my laptop is an HP Compaq nx6325.

Here are the vendor and device codes for my wireless.


$ sudo lspci -nn

30:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11a/b/g [14e4:4312] (rev 01)