Archive for April, 2013

Force XMind to use Java 7

April 30, 2013 Leave a comment

XMind is the world’s coolest mind mapping software, the best way to brainstorm, the most efficient solution for saving your time, and powering your company.” (source)

Maybe it’s not the best but I like it :) And it has a free version, which is perfect for my needs.

I prefer to use the official Java version that I download directly from Oracle. However, I noticed that XMind tends to use some older versions of Java (OpenJDK, etc.). How to tell XMind which Java to use?

After starting XMind, you can verify which Java it uses. Go to: Help -> About XMind, and click on the button Installation Details. Finally choose the tab Configuration. Here find the line “-vm” and check its value in the next line. This is the virtual machine XMind has found.

Edit xmind.ini and add this line to the top:


In my case “/opt/java/bin/java -version” produces the following output:

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Categories: java Tags:

After waking up from suspend, the keyboard doesn’t work properly

April 29, 2013 4 comments

This is not specific to Ubuntu 13.04; I had this problem before too. That is, after waking up the machine from a suspend, the keyboard doesn’t work properly. Not all key presses are accepted, only about 70% of them. Hitting the keys stronger helps but I don’t want to break the keyboard :)

I’ve found a stupid workaround but it works :) It’s a USB keyboard and pulling out the cable and reconnecting it fixes the issue. If someone has a more elegant solution, please tell me.

Downgrade your Nvidia driver

April 28, 2013 Leave a comment

I have an older laptop that I use to watch movies on my TV. It is connected to the TV and I use the TV as a “projector”. The resolution of our HD-ready TV is 1152×864. I also set this resolution on the laptop and the screen was cloned on the TV. It can be set with nvidia-settings easily. Everything worked fine for years when suddenly…

…I clicked on the “Update” button. And it updated the Nvidia driver. And from then on I couldn’t change the resolution. Aaaarrrrrghhhhh!

The nvidia driver offered one resolution only: the highest one, which is 1900×1200. It would be fine for my laptop but I want to clone the screen on the TV which doesn’t support such high resolution. Damn!

I tried everything. For hours. And finally I found the solution: I managed to downgrade the nvidia driver from 304.88 to 295.33.

nvidia graphics drivers: here

nvidia-settings: here

Note that the version of nvidia-settings must match the version of nvidia graphics driver!

So I downloaded the following files:


I removed the current nvidia packages and then installed the 3 packages above. Here I suppose that the 3 files above are saved in a folder and you entered that folder.

sudo apt-get purge nvidia-*
sudo dpkg -i *

After restarting the machine it worked fine. On this laptop I will never ever update the nvidia driver, that’s sure as hell.

The downgrade tip is from here.

What’s new in Linux kernel 3.8?

April 26, 2013 Leave a comment
Categories: Uncategorized Tags: , ,

Ubuntu 13.04

April 26, 2013 4 comments

So far I’ve upgraded two machines. I like the new Ubuntu (though it looks and feels like 12.10 :)) but the upgrade was not as smooth as before.

First, on my workplace machine the upgrade process stopped at 30% and the machine simply froze down. I could move the mouse but nothing else worked. Even the clock in the top right corner stopped. I gave it a try, restarted the machine and to my greatest surprise it came back alive and I even had a graphical interface. Wow! With my script (it’s the second one) I could continue the upgrade process and it finished in order. After a reboot I had a fully functional Ubuntu 13.04.

Second, my home desktop was upgraded without any freeze :) I brought home the update packages and thus the upgrade process finished in an hour. However, after reboot the X started in low resolution. When I launched “nvidia-settings“, it said that my Nvidia card was not enabled and I should re-generate the xorg.conf file. It told me how to do that so I copied/pasted that line to a terminal. After that I reinstalled the nvidia packages:

sudo apt-get --purge remove nvidia-*
sudo apt-get install nvidia-current nvidia-settings

After restarting the X (“sudo service lightdm restart“) the resolution was fine.

However, the torture was not over yet. The graphical interface (Unity) got messed up: the launcher didn’t appear; the Super key (Windows button) didn’t bring up the Dash; the top panel was covered by a Gnome2-ish panel, etc. Fortunately, I found a script that could reset my Unity: It worked perfectly and my Unity became usable again. With “ubuntu-tweak” I could fine-tune my new Ubuntu and now it looks like my 12.10 :)


  • I read about the unity-reset script here
  • you can install ubuntu-tweak easily with my jabbatron installer script

Update (20130428)
This morning my Ubuntu got f* up completely. I was at the point that I reinstall the whole s* from scratch. Strangely, after some restarts it started to work OK. So, here is what happened.

First, after restart I got a blank screen. No X, nothing. I couldn’t even switch to console with Ctrl+Alt+F1. After a reset I got the graphical interface. But after a restart no X again. It was alternating… I edited the file “/etc/default/grub” and changed this line:


Now at least I could follow the bootup sequence and noticed that the boot stopped after mounting the swap partition. Following this post I could fix the swap partition. I am not 100% sure that it was the problem since I also installed a newer version of the nvidia driver.

Fixing the swap partition:

# run "sudo gparted" and figure out the partition of the swap
# for me it was /dev/sda2
sudo swapoff /dev/sda2
sudo mkswap /dev/sda2
sudo swapon /dev/sda2
sudo update-initramfs -u

Update the nvidia driver:

# previous version: 304.88
sudo apt-get --purge remove nvidia-*
sudo apt-get install nvidia-313 nvidia-settings-313

Now the blank screen problem was solved. However, I couldn’t stop the machine. It displayed “* Will now restart” but nothing happened. Again, I had to poke the “/etc/default/grub” file:


More info here. Now it seems OK. Damn, if I had known that I’d have so many problems, I wouldn’t have upgraded to 13.04…

My “/etc/default/grub” file looks like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

#GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda1)"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

When you edit this config file, run the following command:

sudo update-grub2

Update (20130503)
My upgraded Ubuntu 13.04 continued to behave strangely. I got fed up with that and today I reinstalled it from scratch. Now it works correctly. Something must have happened to it during the upgrade…

Ubuntu distro info

April 24, 2013 Leave a comment

Today I found an Ubuntu-specific command by chance called “ubuntu-distro-info“. Example:

$ ubuntu-distro-info -af
Ubuntu 4.10 "Warty Warthog"
Ubuntu 5.04 "Hoary Hedgehog"
Ubuntu 5.10 "Breezy Badger"
Ubuntu 6.06 LTS "Dapper Drake"
Ubuntu 6.10 "Edgy Eft"
Ubuntu 7.04 "Feisty Fawn"
Ubuntu 7.10 "Gutsy Gibbon"
Ubuntu 8.04 LTS "Hardy Heron"
Ubuntu 8.10 "Intrepid Ibex"
Ubuntu 9.04 "Jaunty Jackalope"
Ubuntu 9.10 "Karmic Koala"
Ubuntu 10.04 LTS "Lucid Lynx"
Ubuntu 10.10 "Maverick Meerkat"
Ubuntu 11.04 "Natty Narwhal"
Ubuntu 11.10 "Oneiric Ocelot"
Ubuntu 12.04 LTS "Precise Pangolin"
Ubuntu 12.10 "Quantal Quetzal"
Ubuntu 13.04 "Raring Ringtail"

This requires the “distro-info” package to be installed.

Update (20130426)
If you want info about your current distro version, use this instead:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 13.04
Release:        13.04
Codename:       raring
Categories: bash, ubuntu Tags: ,

MozRepl is broken in Firefox 20 but there is a patch

April 19, 2013 Leave a comment

I use the MozRepl Firefox add-on a lot but it stopped working with Firefox 20. But there is an updated version available. More info with the patch here.

Categories: firefox Tags: , ,