How to move window buttons back to right in Ubuntu 10.X

As the Ubuntu’s new tag line says “It’s time for a change.”, indeed a lot of change has been implemented to the operating system, applications and the interface. There are few which you will find it interesting and useful and while few others might annoy you because of a sudden change.

I never liked Ubuntu much, and it seems many people are complaining against it saying that the move to have the buttons at the left hand side (close, maximize, minimize) like we have in Apple OS was a bad one. People find the sudden shift hard to come to terms with.

Tell you what, it’s extremely easy to move the buttons back to the right hand side. All you need is a bit of configuration tweaking from Gnome Configuration Editor and you are done. To begin, open gconf-editor. Either type it in terminal and hit enter or press Alt+F2 and run it from there.

Once you open gconf-editor, navigate to


You can see the top class ‘app‘ in the left hand pane. Now navigate to the path mentioned above. Then, in the right hand pane, change the value of the key button_layout from




You can either right click the key value and edit it, or just double click it and start typing. Once you have changed the value, hit the enter key and that’s it. All the windows will now have buttons on the right.

There is still one problem however, as you can see, the graphics used for the buttons are not the same for all 3 buttons, so they look a bit weird. You can either change the theme, or change the graphics for the buttons to get a smoother blending.

Installing Emacs on Ubuntu 10.04 from Source

Here is how you can compile the mother of all editors on Ubuntu 10.04 from source:

1. Obtain the source archive for Emacs from

2. Open a Terminal in Ubuntu and type:

A. sudo apt-get install build-essential libxpm-dev libgif-dev libtiff4-dev

B. This will install the necessary packages to compile Emacs.

3. Extract the Emacs archive downloaded in step 1 by typing: tar xvzf emacs-major_version-minor_version.tar.gz.

4. Change to the Emacs source directory. a.k.a. cd emacs-major_version-minor_version

5. Type: ./configure

6. Type: make

7. Type: sudo make install


SSH Hardening

Here is some code that will add some security to your /etc/sshd_config file:

  • Enable X11Forwarding
  • Force Version 2 of the protocol
  • Disable all the usual RHosts garbage
  • Disable root logons
  • Disable the use of empty passwords

Copy the code below to a text file and make it executable then run it using the sudo command. Remember to restart your SSH service after the changes have been made.

# unalias cp rm mv
cp ssh_config ssh_config.tmp
cat $SSH_DIR/ssh_config.tmp | grep -v Protocol | sed ‘$a\\nProtocol 2’
> $SSH_DIR/ssh_config
rm ssh_config.tmp
cp sshd_config sshd_config.tmp
awk ‘/^#? *Protocol/ { print “Protocol 2”; next };
/^#? *X11Forwarding/ \
{ print “X11Forwarding yes”; next };
/^#? *IgnoreRhosts/ \
{ print “IgnoreRhosts yes”; next };
/^#? *RhostsAuthentication/ \
{ print ” RhostsAuthentication no”; next };
/^#? *RhostsRSAAuthentication/ \
{ print “RhostsRSAAuthentication no”; next };
/^#? *HostbasedAuthentication/ \
{ print “HostbasedAuthentication no”; next };
/^#? *PermitRootLogin/ \
{ print “PermitRootLogin no”; next };
/^#? *PermitEmptyPasswords/ \
{ print “PermitEmptyPasswords no”; next };
/^#? *Banner/ \
{ print “Banner /etc/”; next };
{print}’ sshd_config.tmp > sshd_config
rm sshd_config.tmp

Turbo Mode SSH Logins

If your like me and have to logon to multiple Linux/UNIX systems by means of SSH, manually entering a password for each logon session can be a pain. The procedure below will enable you to run all of your SSH sessions password free.

We will use what is termed as public-key SSH authentication and the first thing that we need to do is to generate our public/private keypair. Open a shell prompt and type in the command:

$ ssh-keygen -t rsa

This will produce the output of:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/monk/.ssh/id_rsa):

Just press through all of the prompts. This creates two files, ~/.ssh/id_rsa and ~/.ssh/ To use this keypair on a server try this:

$ ssh server “mkdir .ssh; chmod 0700 .ssh”
$ scp .ssh/ server:.ssh/authorized_keys2

You will be prompted for your password after each command and you’ll need to substitute “server” with the actual hostname of the system that you want to connect to. After running these two commands you will not be prompted for a password.

There have been security concerns raised over the safety of this, but you have the same problem with passwords. Someone would have to compromise your account and gain access to your private key. I would also recommend incorporating a mandatory access control system on the private key such as Apparmor or SELinux, but that will be the subject of another post.