Archive for February, 2014

Share large files

February 27, 2014 2 comments

You want to share a large file (e.g. a 700 MB video) with a friend. How to do it?

Try . With this service you can share files up to 2 GB! The files will be kept for 7 days. After uploading your file(s), you get a link that you can send to your friend.


Sorry, Ubuntu has experienced an internal error

February 24, 2014 Leave a comment

ubuntu-12.04-apport-errorSorry, Ubuntu has experienced an internal error.

Does it sound familiar? Are you tired of these messages? Then let’s get rid of them:

sudo apt-get purge apport

More info here.

On one of my machine the package rapport could be removed easily. However, on another machine the package manager wanted to remove a bunch of other packages too. In this case you can simply disable apport.

Edit the file /etc/default/apport and change enabled=1 to enabled=0. This setting will be taken into account on the next boot.

Categories: ubuntu Tags: , ,

LaTeX: strike through a text

February 17, 2014 Leave a comment

You want to have this effect in LaTeX.



You want to have \st{this effect} in \latex.
Categories: latex Tags:

Linux host, Windows guest, shared Dropbox folder

February 16, 2014 Leave a comment

My primary operating system is Linux but since I need to work with Powerpoint too, I installed Windows 7 in VirtualBox. Under Windows I prepare my presentations but I want them synchronized on all my machines. For the synchronization I was using Dropbox.

I had Dropbox on Linux (host machine) and on Windows (guest machine) too. When I edited a file under Windows, Dropbox synced it to the Linux host too (the Windows client uploads it to the cloud; the Linux client downloads it from the cloud). It worked fine, though it was not not optimal. If I didn’t use the Windows guest for a long time, then after a boot I had to wait some time till Dropbox synced everything and I could start working only after that.

However, something happened to the Windows Dropbox client recently. Maybe it’s a bug, I don’t know, but the Dropbox client in my Windows guest became terribly slow. It keeps syncing but it doesn’t upload the changes, or I need to wait an hour or so to upload a file 1 MB of size. This is ridiculous and unacceptable. Note that I dind’t experience similar issues with the Linux client.

How to have a synchronized folder between a Linux host and a Windows guest without a Dropbox client on the guest?

First I made sure that my Dropbox folders were synced between the host and the guest. After this I uninstalled Dropbox on Windows and removed the C:\Dropbox folder entirely. Since it was synced with the Linux host, I had an exact copy of the Dropbox folder on Linux. Then shut down the Windows guest.

Here ( you can find an excellent post on how to set up a shared folder between a Linux host and a Windows guest. On the Linux host I shared my Dropbox folder ($HOME/Dropbox) that appears now as a new drive in the Windows guest (G:\ in my case). Now, if I modify something under Windows, it will be visible immediately in the Linux file system that the Dropbox client on Linux will notice and sync.

With this I could solve two problems. First, when I boot up the Windows guest, I don’t need to wait for the Dropbox client to sync. Second, if I change something under Windows, it is still synced to the Dropbox cloud, though I have no Dropbox client on Windows anymore.

extract .tar.gz

February 15, 2014 Leave a comment
$ tar xvJf file.tar.xz
# or
$ tar xvf file.tar.xz
# or
$ tar --xz -xvf file.tar.xz

Why is *.tar.gz still much more common than *.tar.xz?

Categories: bash Tags:

Ubuntu, nvidia, projector, screen cloning, 1024×768 resolution

February 14, 2014 2 comments

I have a laptop that I use for teaching. It is connected to a projector. Everything was fine until today. The next semester starts next Monday, so today I checked if the laptop still works well with some projectors. Nope. Of course not! I tried three classrooms. One projector was OK, but two others didn’t recognize my laptop (“no connection”).

In order to avoid problems with the nvidia driver, I used to keep an old driver on my machine that worked well. When the packages were updated, I always left out the nvidia packages. But something happened since December… So I decided to upgrade all the Nvidia packages too. By the way, I have Ubuntu 12.04 LTS on this laptop. The result almost made me cry: after the upgrade I couldn’t change the resolution on my laptop anymore. If I want to use a projector in clone mode, switching to resolution 1024×768 is mandatory. Damn!

This article saved my ass. It explains how to update your Nvidia driver with the newest one directly from Nvidia. The new driver, which came out in January 2014, works well. I can change the resolution and cloning works too. Phew…

Here I sum up the steps from the aforementioned article:

(1) Download the latest driver for your card from .

(2) Blacklist the nouveau driver. “sudo vi /etc/modprobe.d/blacklist.conf” and add this line to the end:

blacklist nouveau

(3) Switch to the virtual terminal (Ctrl+Alt+F1) and execute these steps:

$ sudo apt-get remove --purge nvidia*
$ sudo service lightdm stop
# locate the downloaded driver and run it
# your version probably will be newer
$ sudo sh ./
$ sudo reboot

If something went wrong and you encounter some problems during the reboot, here is how to revert the changes. Switch to the virtual terminal (Ctrl+Alt+F1) and execute these steps:

$ sudo sh ./ --uninstall
$ sudo apt-get install nvidia-current
$ sudo service lightdm restart

Programming in a nutshell

February 14, 2014 Leave a comment

This GIF sums it up:

Found it on reddit.

Categories: fun, programming Tags: