Restart X shortcut for Ubuntu?

Sometimes in you find yourself in the middle of a graphical meltdown, all of a sudden the restart X shortcut for Ubuntu is your best friend! Otherwise you find yourself trying to drop out of graphical mode into a terminal user. Or heading straight for the power button!

So, what is the restart X shortcut for Ubuntu?

For a long time the restart X shortcut was:

This helped many people out of a bad spot. Graphic capabilities were limited in them days and hang ups were more common. Hardware and Linux distributions have improved since and become more stable since then.

Since Ubuntu 10.04 this was changed to the lesser known shortcut:

Gtk-WARNING Default font does not have a positive size

As “Gtk-WARNING Default font does not have a positive size” suggests, this arises from a font size specified incorrectly, or not at all in some cases. This problem annoyed me for a while after using a few different window managers with Linux (Ubuntu in particular). I believe it came about after changing some font settings and changing themes a few times, particularly with LXappearance. I’m guessing if you are looking at this you have also made a few changes and are now also being annoyed by this message!

The Problem

You will see this annoying message, repeated numerous times in the terminal, when launching applications from a terminal:

How to clone a partition or hard drive in Ubuntu (Linux)

Cloning a hard drive can be useful for backing up (byte for byte) or moving data to a new hard drive. In Ubuntu this is pretty simple, though it is important to pay attention!

We’re going to use a few tools:

  • fdisk to create the partition
  • mkfs to create the filesystem
  • dd to clone bytes