Category Archives: Linux

How to change the default operating system to boot with Ubuntu Linux and Windows

In Ubuntu, the boot order is controlled with GRUB. Do the following:

  1. sudo cp /etc/default/grub /etc/default/grub.bak (backup of the conf file, only superuser can do it)
  2. sudo gedit /etc/default/grub (edit the conf file, only superuser can do it)
  3. Replace GRUB_DEFAULT=0 with GRUB_DEFAULT=saved
  4. Save and close the file in gedit.
  5. sudo update-grub
  6. sudo grub-set-default xx, where xx is the number of the boot menu item you want to start be default. The first item has number 0. After doing update-grub, you’ll see a list of all OS’s that will be included in the menu, so you can count them (start with 0 and count all lines starting with found).

Note: memtest, if you have it in the menu, takes two lines in the menu, while update-grub shows only one. Windows is the last item. So add one to the number to start with Windows.

This solution is taken here.


Install TortoiseHg (Mercurial GUI) in Ubuntu

Mercurial is provided (even if old) for Ubuntu, it can be installed with Ubuntu Software Center or using sudo apt-get install mercurial. TortoiseHg, the graphical user interface or the front-end for Mercurial is not.

To install it

  1. sudo add-apt-repository ppa:mercurial-ppa/releases
  2. sudo add-apt-repository ppa:tortoisehg-ppa/releases
  3. sudo apt-get update
  4. sudo apt-get install mercurial
  5. sudo apt-get install tortoisehg*

After this, commands hg and thg are available.

Note that in Ubuntu 10.04 (LTS) thg exits with segmentation error, see here.

Cross-platform dropboxing

I’ve recently had a problem covered here. Basically, the files put to Dropbox on my Mac wouldn’t appear in Linux. Without any warning from Dropbox. Without any visible reason. After many months of successful use of Dropbox on Mac, Windows and Linux. I was hopeless, but was helped by the Dropbox team. The thing was actually mentioned in FAQ, but under such a topic that I have never found it.

The solution was to turn on the extended attributes in Linux. For this, I’ve edited the /etc/fstab file to add the user_xattr attribute to the root partition options.

Of course, this was a Dropbox fault. If it cannot sync some files, it should issue a warning.

Gnome: How to change the sequence of the window control buttons

After changing the theme in Ubuntu, I’ve got the window control buttons (maximize, minimize, close) in the order different from the previous theme and also from the Mac OS I have to live with at home. This is inconvenient, but we’re in Linux, aren’t we? So:

  1. Run gconf-editor (configuration editor).
  2. Go to apps > metacity > general.
  3. Edit button_layout according to your needs.

(Tip found here.)

Wacom Bamboo Pen and Touch 4×5 configuration

Switch touch off:

xsetwacom --set "Wacom BambooPT 2FG 4x5 Finger touch" TOUCH off
xsetwacom --set "Wacom BambooPT 2FG 4x5 Finger pad" TOUCH off

Map to left screen only with dual monitor setup (taken from here):
xinput set-prop "Wacom BambooPT 2FG 4x5 Pen stylus" --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1

For right screen only, it’s
xinput set-prop "Wacom BambooPT 2FG 4x5 Pen stylus" --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1


Wacom Bamboo with Ubuntu 11.04

I’ve borrowed a Wacom Bamboo Fun tablet from a colleague. Connected it. And started searching for how to install the drivers. Took me quite some time to realise, that the tablet was already working! Just like a mouse. Both touch and pen. A few remarks:

  • Multi-touch is not supported as of now.
  • The program to control the device is called xsetwacom, it was installed by default in my Ubuntu distribution.
  • xsetwacom --list devices lists all available devices’ names
  • In my case, xsetwacom --set "Wacom Bamboo 2FG 6x8 Finger pad" touch off switches touch off
  • xsetwacom --get "Wacom Bamboo 2FG 6x8 Finger pad" touch shows the touch status

Update 2011-08: Bought a Wacom Bamboo Pen & Touch (CTH-460). Works without problems as well. I find its size more suitable for drawing small sketches.